-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation on using empirical noise scans with NORDIC #4
Comments
Hi again, If you look closely at the NORDIC MATLAB code, they have routines to estimate the noise level per patch in the absence of g-map (I tried to reproduce this in G-map estimation goes beyond the scope of this package indeed, but our team is tackling this challenge in another repository with https://github.com/mbertrait/ggrappa (cc @mbertrait) |
Actually, the maths are not that hard. I will soon write my thesis, and patch-denoise will be a chapter of it, I will take this opportunity to detail the maths more (and add it here in the documentation) |
That would be amazing. For context, I would really like to get NORDIC added to fMRIPrep, but using the MATLAB version would dramatically increase the size of the container per @bpinsard, and there are also license and code quality issues. Being able to use the noise scans within patch-denoise or having solid documentation so we could write an interface to do that on fMRIPrep's side would be awesome. |
Turns out, I have some code in place to estimate the noise statistics from noisy scans 🥳 ! https://github.com/paquiteau/patch-denoising/blob/master/src/patch_denoise/space_time/utils.py#L206 And even better, I have nipype bindings (which fMRIprep uses IIRC) for it https://github.com/paquiteau/patch-denoising/blob/master/src/patch_denoise/bindings/nipype.py For the documentation, I have no ETA yet, but contributions are welcome to improve it ;) |
Amazing, thanks for the nice package! I am glad that this interesting MRI filtering technique won't die as an old, barely-readable MATLAB code with restrictive license. |
I've been reviewing the MATLAB code in detail and it turns out that the measured noise is a single scalar, not something calculated on a patch-wise basis. Also, in the MATLAB code they only use the first noise scan. It's clearly a bug, but the author doesn't think it merits fixing. |
I don't think the bug (using just the first noise volume) will have much of an effect, but it is definitely a bug that should be fixed. Even if only so that people aren't acquiring multiple noise volumes for no reason. I have a line-by-line Python translation that seems to work pretty well. I still need to write unit tests for it, but I'm optimistic. My ultimate goal is to incorporate it into dwidenoise, but I'd love to do what I can to bring the patch-denoising implementation in line with the MATLAB implementation. |
The actual math goes way over my head, but it doesn't seem like patch-denoising includes a way to use noise scans with the NORDIC denoiser. The documentation mentions "pre processing the image and dividing it by an externally available g-map". Does that mean that calculating the g-map is outside the scope of this package?
The text was updated successfully, but these errors were encountered: