NYU-DiffusionMRI / DESIGNER-v2

Diffusion parameter EStImation with Gibbs and NoisE Removal pipeline Version 2
https://nyu-diffusionmri.github.io/DESIGNER-v2/
Other
18 stars 2 forks source link

Issues with complex denoising #11

Open HertanuAndreea opened 4 months ago

HertanuAndreea commented 4 months ago

Hello,

Thank you so much for sharing this package, it is extremely useful. I successfully used it for Gibbs correction on partial FT data and to estimate DTI/DKI metrics. Concerning the complex MP-PCA denoising I ran into some issues:

I would be very grateful for your help. Thank you, Andreea

badesar1 commented 4 months ago

Hi Andreea, Thanks for reaching out.

A minor issue would be that the bval and bvec files are also required as inputs either through the -fslbvec and -fslbval arguments, either as .mif along with the diffusion volumes, contrary to what is written in the documentation (this is also true for the Gibbs correction). If I don’t input them, than I receive the error in error_1.png

In order to input DWIs without using the -fslbvec/-fslbval args, two conditions need to be met. 1) the image volume must be in .nii or .nii.gz format. 2) The corresponding .bvec and .bval files must have an identical file names and be located in the same directory as the DWIs.

The path toward the phase is not updated from the input user path. By default, when denoising starts, the phase is searched in the temporary folder, but the phase cannot be copied, so it sends out an error with ‘file not found’, see error_2.png

This is a bug that has been fixed in the most recent version of the designer code. You should be able to pull the most recent version from GitHub and get the phase correction working properly. Alternatively you can pull the docker image here: docker pull nyudiffusionmri/designer2:main.

Please let us know if you continue to have issues or recommended changes you would like to see implemented.

Regards, Ben

HertanuAndreea commented 4 months ago

Hi Ben,

Thank you very much for your answer.

Yes, indeed I was using a .nii volume and the .bvec and .bal files were in the same folder. I pulled the docker image as you advised, and tried to launch denoising by following the documentation of designer. Unfortunately, I ran into a new issue. I tried both the 'main' and the 'latest' tags, and I get the same error from below: image

I am not very used to docker. Do you think this is a local issue on my side? Am I missing something? Let me know if you have any advice or if you ran into a similar issue.

Thank you. Regards, Andreea

jchen33344 commented 4 months ago

Hi Andreea,

It looks like the issue is with the path to your files. Your folder is mounted to the container, so you would refer to dwi.mif like this: /data/dwi.mif

Please let me know if you encounter any other issues. Thank you.

Best, Jenny

HertanuAndreea commented 4 months ago

Hello Jenny,

Oh, I see now what I was doing wrong... I understand a bit better now how docker is working. Thank you both for your help and your quick answer! :)

Best, Andreea

HertanuAndreea commented 2 months ago

Hello designer2 developers, I’m coming back with a different issue, but still regarding complex denoising. I tried it on different datasets usually combining multiple diffusion times and directions. In some cases, in the 4th dimension, I can have as many as 936 volumes. I noticed that when the 4th dimension goes beyond around 400 volumes, I start getting this error (here is an example with 624 volumes in the 4th dimension). This only happens when phase data is included, the denoising works for any number of volumes in the 4th dimension. Do you have any idea where this might be coming from? The dimension of the phase nifti is exactly the same as the dimension of the dwi. Thank you, Andreea

image

badesar1 commented 2 months ago

Hi Andreea, You are in fairly untested territory with such a large size in the 4th dimension. The largest dataset I have tested on has 330 measurements and the complex denoising runs as expected. If you can share a link with us to an anonymous example of such data that is causing this bug we are happy to dig into it further. Running the complex denoising without the -adaptive_patch flag might help, if the issue is memory related (which is my initial suspicion).

Best, Ben

jchen33344 commented 2 months ago

If it is a memory issue, you may also try to increase memory resources from the Docker desktop under Settings>Resources>Advanced