samuelstjean / nlsam Goto Github PK
View Code? Open in Web Editor NEWThe reference implementation for the Non Local Spatial and Angular Matching (NLSAM) denoising algorithm for diffusion MRI
License: GNU General Public License v3.0
The reference implementation for the Non Local Spatial and Angular Matching (NLSAM) denoising algorithm for diffusion MRI
License: GNU General Public License v3.0
I used autodmri to estimate N and sigma from my noisy data , as a result I have sigma.nii.gz and N.nii.gz images. How do I use them in order to denoise my dataset given the noise distribution previously estimated? thank you,
Rosella
For having a simpler format for scilpy, move some code from the script to the main core nlsam, so that way the script should only be a thin wrapper over a function instead of doing some setup/type checking like now.
If possible, can you "quiet" nlsam by default and/or add a verbose option.
Well, once everything for the stabilization is merged in scilpy proper, use this version in the repo since it will be the one with all the fancy features.
Note to self : seems like it could be lighter to use and easier than multiprocessing, as it removes the need for unpacking functions and huge arglist variables like currently used.
Sorry, never mind
Seems like it's not recommended anymore pypa/setuptools#581
Plus it was probably never really used since setuptools is a fairly basic to have package.
Hi
is it possible to obtain noise maps resulting from nlsam denoising?
best,
Rosella
Seems like it disappeared between 0.3 and 0.5 during the big refactor, but the rejection branch might help bring it back.
Since I only use a few functions, no need to install the whole thing, especially for people using their own fork. Might as well bundle the 2-3 functions in a separate file to prevent building the whole thing,
rosella@vivi:nlsam_denoising unproc_3T.nii.gz denoised.nii.gz auto bval bvec 5 -m mask_noise.nii.gz --load_sigma sigma.nii.gz --fix_implausible --verbose
2020-01-10 15:59 - nlsam - INFO - Verbosity is on
2020-01-10 15:59 - nlsam - WARNING - Option --implausible_signal_fix has been deprecated
2020-01-10 15:59 - nlsam - INFO - Loading data /media/rosella/TOSHIBA EXT/dkeTest/115825/Diffusion_3T/unproc_3T.nii.gz
2020-01-10 15:59 - nlsam - INFO - Loading mask /media/rosella/TOSHIBA EXT/dkeTest/115825/Diffusion_3T/mask_noise.nii.gz
2020-01-10 15:59 - nlsam - INFO - Loading sigma /media/rosella/TOSHIBA EXT/dkeTest/115825/Diffusion_3T/sigma.nii.gz
2020-01-10 15:59 - nlsam - INFO - Now performing stabilization
[Parallel(n_jobs=8)]: Using backend LokyBackend with 8 concurrent workers.
[Parallel(n_jobs=8)]: Done 34 tasks | elapsed: 2.5s
[Parallel(n_jobs=8)]: Done 111 out of 111 | elapsed: 7.5s finished
2020-01-10 15:59 - nlsam - INFO - Now denoising
2020-01-10 15:59 - nlsam - INFO - Found 6 b0s at position [ 0 16 32 48 64 80]
2020-01-10 15:59 - nlsam - INFO - Now denoising volumes (0, 1, 47, 38, 30, 85) / block 1 out of 24.
Floating point exception
### What is this error due to?
thanks
Currently we enforce symmetry on the bvecs file, the user should be able to disable this behavior in case his data is already symmetrized (DSI grid for example).
When running nlsam on CentOS server,
nlsam_denoising data.nii.gz denoised.nii.gz auto bvals bvecs 3 -m mask.nii.gz --noise_est auto --cores 15 -v
during performing of stabilization the following warning starts iteratively appear in loop
OMP: Info #274: omp_set_nested routine deprecated, please use omp_set_max_active_levels instead.
How can this be solved? Is it just a warning? Can I let the code go despite this message appearing in loop?
My OS features are:
lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.8.2003 (Core)
Release: 7.8.2003
Codename: Core
thank you
Rosella
They are in my dev_stuff branch from scilpy, so once the scilpy version is up to date with this one, merge my personal fixes.
it currently output the total number of volumes including b0s, change it also in scilpy for good measure.
While we are able to use nlsam_denoise on linux (and I've managed to get it working on Compute Canada as well, which is a cloud cluster we can take advantage of), I'll be interested in making it working on Windows as well (some of our users use ExploreDTI on Matlab and this would allow them to run this pre-processing all on one platform).
The pre-compiled version available on GitHub seems to be from previous iteration of work, so it doesn't support the automated estimation. I have so far not been able to install (and make things work) under Python on Windows - it seems that despite no errors during installing packages, spams/spams_wrap is missing some DLLs (?)
Is there any trick you would be to recommend to get this installed, or, even better, any chance you might be able to generate updated version of pre-compiled exe file?
We have successfully integrated your NLSAM method into processing of our DTI data. Especially your recent addition of automating of estimating all parameters helps a great deal, and we are very grateful your work is available!
Apparently JC mentioned we should use something like nipy/nibabel#434 for proper packaging with setuptools.
-m, --mask, -o, --output and such.
Will break all user scripts, but at least it will be more consistent with scilpy currently.
Currently, the 4D array are always overlapping but the padding factor is still computed nevertheless if no padding is required, thus enlarging arrays without any need to.
Either re-put the non overlap 4D function or make the naming consistent that overlap is actually happening to less confuse people looking at the code.
Currently one has to pass --load_sigma along with --no_stabilization. Would be simple enough to still allow this computation in the main script by just moving some stuff around.
I currently disable openblas threading for linear algebra, but it seems like mkl is doing the same thing.
Compare if it is slower by setting export MKL_NUM_THREADS=1 or if it would not be needed (I read that mkl took care of that, maybe they just spawn unused threads), as the binaries are built with mkl.
Currently, the check is only with data and mask, so checking the size of sigma also would be accurate in case people come up with their own estimated volume and just want to run the denoising purely.
Currently, for a system Ax = b with a solution x_star, convergence is reached when ||x_star - x||_inf < eps.
Check if it would be attained faster by checking ||b - b_star||_inf < eps, which would be identical for all practical purpose.
Hi I have just download and installed 6.0.1 nlsam version but the option "auto" for N does not work. I would like to know which version has this feature.
Thanks
Rosella
It would be nice to have a --fast option that turns on the greedy_subsampler True.
Should it be True by default?
when trying to install nlsam on Centos the following error appears:
pip install nlsam_0.6.1_centos6_x64.zip --user rosella
Processing ./nlsam_0.6.1_centos6_x64.zip
ERROR: Command errored out with exit status 1:
command: /home/rosella/anaconda3/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-p5dlbqnh/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-p5dlbqnh/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-e5y0g4co
cwd: /tmp/pip-req-build-p5dlbqnh/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/rosella/anaconda3/lib/python3.7/tokenize.py", line 447, in open
buffer = _builtin_open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-req-build-p5dlbqnh/setup.py'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
what shoud it be due to? I have python 3.7.3 installed with conda package.
My OS features are:
lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.8.2003 (Core)
Release: 7.8.2003
Codename: Core
Thanks,
Rosella
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.