davidssmith / dcemri.jl Goto Github PK
View Code? Open in Web Editor NEWDCE MRI analysis in Julia
License: Other
DCE MRI analysis in Julia
License: Other
When I run the software, with or without specifying a mask, my Ktrans map is almost all 0 except for a handful of voxels, hard to tell what area it is but I'm pretty sure it's not in any ROIs defined by the mask.
Any idea what the problem could be?
Not sure if this is affecting the calculations, but I got some warnings during validation.
Here they are, with repeat offenders omitted.
WARNING: ifloor(x) is deprecated, use floor(Integer,x) instead.
in depwarn at deprecated.jl:73
in ifloor at deprecated.jl:50
in makeplots6 at /home/users/elijah/.julia/v0.4/DCEMRI/src/validate.jl:18
WARNING: [a] concatenation is deprecated; use collect(a) instead
in depwarn at deprecated.jl:73
in oldstyle_vcat_warning at ./abstractarray.jl:29
in makeplots6 at /home/users/elijah/.julia/v0.4/DCEMRI/src/validate.jl:18
WARNING: [a,b,...] concatenation is deprecated; use [a;b;...] instead
in depwarn at deprecated.jl:73
in oldstyle_vcat_warning at ./abstractarray.jl:29
in makeplots6 at /home/users/elijah/.julia/v0.4/DCEMRI/src/validate.jl:81
Trying to set up DCEMRI on linux box for testing. Previously, I received PyPlot not installed warnings, which led to results not being stored. After adding PyPlot Pkg.add("PyPlot")
and using PyPlot
, I run
validate(6, "/home/ubuntu/temp/")
, but then get the following error:
Noisy data saved to /home/ubuntu/.julia/packages/DCEMRI/IqKLJ/src/../test/q6/qiba6noisy.mat
Running analysis of noise-free QIBA v6 data ...
running models
found existing R1 map
computing signal enhancement ratios
converting DCE signal to effective R1
converting effective R1 to tracer tissue concentration Ct
fitting DCE data
attempting Standard Tofts-Kety model
running 1321 x 30 points on one CPU core
processed 30 voxels in 1.1 s (26.9 vox/s)
Kt
RMSE: 0.06905821162552696 %
errmax: 0.12117793868366653
CCC: 0.9999992183735924
ve
RMSE: 0.08534905045247793 %
errmax: 0.23374109637539464
CCC: 0.9999993737058641
Plotting results ...
UndefVarError: figure not defined
Stacktrace:
[1] #analyzer#15(::Int64, ::Bool, ::Bool, ::Function, ::Dict{Any,Any}, ::String) at /home/ubuntu/.julia/packages/DCEMRI/IqKLJ/src/validate.jl:87
[2] #analyzer at /home/ubuntu/.julia/packages/DCEMRI/IqKLJ/src/validate.jl:0 [inlined]
[3] #analyze#16 at /home/ubuntu/.julia/packages/DCEMRI/IqKLJ/src/validate.jl:200 [inlined]
[4] #analyze at ./none:0 [inlined]
[5] #validate#17(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Int64, ::String) at /home/ubuntu/.julia/packages/DCEMRI/IqKLJ/src/validate.jl:215
[6] validate(::Int64, ::String) at /home/ubuntu/.julia/packages/DCEMRI/IqKLJ/src/validate.jl:206
[7] top-level scope at In[22]:1```
Line 87 of validate.jl:
`figure(figsize=(4.5,4.5))`
seems to be throwing the error
However, in julia repl, after `using PyPlot`,
```>>> figure(figsize=(4.5,4.5))```
`Figure(PyObject <Figure size 450x450 with 0 Axes>)`
Thanks for your help!
A bitmask is too confusing for casual users.
The latest master is a huge improvement, but it is no longer v0.4
compatible. Not sure if we should just drop support for it, or use Compat.jl
to try to make it work.
One I work this out, I'll issue a new release of the official package.
Completed installation steps as per readme. Got the below error when running validate()
Plotting results ...
ERROR: UndefVarError: figure not defined
Stacktrace:
[1] analyzer(::Dict{Any,Any}, ::String; dx::Int64, makeplots::Bool, isExt::Bool) at /Users/ravi/.julia/packages/DCEMRI/IqKLJ/src/validate.jl:87
[2] #analyze#16 at /Users/ravi/.julia/packages/DCEMRI/IqKLJ/src/validate.jl:198 [inlined]
[3] validate(::Int64, ::String; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /Users/ravi/.julia/packages/DCEMRI/IqKLJ/src/validate.jl:215
[4] validate at /Users/ravi/.julia/packages/DCEMRI/IqKLJ/src/validate.jl:206 [inlined]
[5] #validate#18 at /Users/ravi/.julia/packages/DCEMRI/IqKLJ/src/validate.jl:226 [inlined]
[6] validate(::Int64) at /Users/ravi/.julia/packages/DCEMRI/IqKLJ/src/validate.jl:226
[7] top-level scope at REPL[31]:1
figure seems to be a function in PyPlot.jl but some how validate does not seem to find it.
Any help resolving this would be greatly appreciated.
This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml
to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix
on this issue.
I'll open a PR within a few hours, please be patient!
A PkgEval run for a PR which changes the generated numbers for randn!
indicates that the tests of this package might fail in Julia 1.5 (and on Julia current master). Apologies if this is a false positive.
cf. https://github.com/JuliaCI/NanosoldierReports/blob/7de24e455342298cbef56826b5827f0d7640d2c1/pkgeval/by_hash/b89e35c_vs_098ef24/logs/DCEMRI/1.5.0-DEV-71a4a114c2.log
Validation fails on v0.6 with a ton of error messages. Also some other deprecations to deal with.
Probably can be handled with judicious use of something like
if VERSION >= "v0.6.0"
stuff
end
Is there any particular reason to restrict the upper version of Color.jl?
It would be nice if validate()
produced some consolidated numbers that could be checked before and after patching.
What's the best way to test different revisions of the code?
Like, how do I uninstall DCEMRI.jl and replace it with a different version?
hello,
i am wondering if i can use julia and your code in linux platform?
thanks
When PyPlot is not installed, the code should still run, just not plot.
Not sure if this is related to the new fitting methods or some breaking of the parallel environment across versions.
Package https://github.com/rfourquet/StableRNGs.jl might prevent future problems like the recent RNG issue.
See JuliaLang/METADATA.jl#3769; we're about to make Color uninstallable on julia 0.4.
Hi. I really don't understand what I am doing wrong here. My DCE data is of size (53,256,256), my T1data is size (2,256,256) my T1flip is an array of two flip angles . I have tried to reshape these such that the dynamic dimension is last in DCEdata, or that the flip angle dimension in T1data is either first or last but I keep getting this error resulting from line 219 in science.jl after fitrl has been called. Why oh why.
Thank you,
Maria
Hi,
could someone point me to the download location of the QIBA phantom DICOM data? The linked address in the README is out of date and also at https://qidw.rsna.org/ I cannot find anything like MRI Perfusion data.
thanks,
Victor
julia> results = fitdata(datafile="/space/bic/subjects/tau_gadolinium/old/antinarcotic/dceMRIWorking/DCEMRI.jl/antinarcotic.mat")
running models
adding 4 workers
WARNING: `require` is deprecated, use `using` or `import` instead
in depwarn at deprecated.jl:73
[inlined code] from deprecated.jl:694
in require at no file:0
in fitdata at /home/users/elijah/.julia/v0.4/DCEMRI/src/science.jl:166
while loading no file, in expression starting on line 0
WARNING: replacing module DCEMRI
found multi-flip data
fitting R1 relaxation rate to multi-flip data
fitting 5 x 46212 points on each of 4 workers
processed 184850 voxels in 7.9 s (23420.3 vox/s)
ERROR: MethodError: `ser` has no method matching ser(::Array{Float32,4})
in fitdata at /home/users/elijah/.julia/v0.4/DCEMRI/src/science.jl:189
Not sure, might be something on my end, though, looking for advice.
julia> Pkg.add("DCEMRI")
INFO: Initializing package repository /home/users/elijah/.julia/v0.4
INFO: Cloning METADATA from git://github.com/JuliaLang/METADATA.jl
fatal: unable to connect to github.com:
github.com[0: 192.30.252.128]: errno=Connection timed out
ERROR: failed process: Process(git clone -q -b metadata-v2 git://github.com/JuliaLang/METADATA.jl METADATA
, ProcessExited(128)) [128]
in run at ./process.jl:531
in anonymous at pkg/dir.jl:52
in cd at ./file.jl:22
in init at pkg/dir.jl:50
in cd at pkg/dir.jl:28
in add at pkg.jl:23
julia> demo()
Processing in vivo data ...
running models
found multi-flip data
fitting R1 relaxation rate to multi-flip data
running 10 x 18327 points on one CPU core
processed 18327 voxels in 0.8 s (23198.4 vox/s)
computing signal enhancement ratios
converting DCE signal to effective R1
converting effective R1 to tracer tissue concentration Ct
fitting DCE data
attempting Standard Tofts-Kety model
running 25 x 6774 points on one CPU core
processed 6774 voxels in 1.0 s (7065.6 vox/s)
saving results to results/results.mat
┌ Warning: Pkg.installed() is deprecated
└ @ Pkg C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Pkg.jl:566****
Plotting results ...
ERROR: ArgumentError: indexed assignment with a single value to many locations is not supported; perhaps use broadcasting `.=` instead?
Stacktrace:
[1] setindex_shape_check(::Float64, ::Int64)
@ Base .\indices.jl:261
[2] _unsafe_setindex!(#unused#::IndexLinear, A::Matrix{Float64}, x::Float64, I::Base.LogicalIndex{Int64, BitMatrix})
@ Base .\multidimensional.jl:896
[3] _setindex!
@ .\multidimensional.jl:887 [inlined]
[4] setindex!(A::Matrix{Float64}, v::Float64, I::BitMatrix)
@ Base .\abstractarray.jl:1267
[5] makeplots(mat::Dict{Any, Any}; outdir::String)
@ DCEMRI C:\Users\zmx95\.julia\packages\DCEMRI\IqKLJ\src\plotting.jl:87
[6] demo(outdir::String)
@ DCEMRI C:\Users\zmx95\.julia\packages\DCEMRI\IqKLJ\src\demo.jl:15
[7] demo()
@ DCEMRI C:\Users\zmx95\.julia\packages\DCEMRI\IqKLJ\src\demo.jl:2
[8] top-level scope
@ REPL[6]:1
julia>
Is this because of newer version of Julia or is there anything I did wrong. Thank you very much!
I see in the README that the data is required to be a 3D matrix, 1 time and 2 space...
Is there any possibility of using 4D matrices, i.e., a time series of volumes?
require
was removed, and now the validate()
method fails.
I'm not entirely happy with the number of dependencies and helper functions for what is essentially a glorified non-linear least squares fitting code. I would be happier if it were distilled to its essential functions and all of those functions were unit tested on small, known data sets, rather than the QIBA phantom.
To start the discussion, I propose removing:
demo
and validate
to test/
jacobian
from Calculus.jl
with a simpler, inline expressionUnicodePlots
These are just ideas. I'll think about it for a while and take any comments the community has.
So, one thing I have tried to see if I can get reasonable Kt map is to change my TR value from .00314 seconds to 3.14 ms.
However the program asserts that 0 < TR < 1 "TR must be in units of ms"
So which is it, ms or s?
Hi,
I would like to use this software to analyse preclinical DCE data, where I don't have the data regarding Cp (Arterial input function), so a different model would be required. Is this possible?
Thanks,
Maria.
function currently only accepts 2D images.
consider using reshape instead of squeeze perhaps? also one for loop may have to be recursive to account for varying dimensionality
julia> fitdata("invivo.mat";models=3)
ERROR: `fitdata` has no method matching fitdata(::ASCIIString)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.