Skip to content
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

Issues with complex denoising #11

Open
HertanuAndreea opened this issue Jul 5, 2024 · 7 comments
Open

Issues with complex denoising #11

HertanuAndreea opened this issue Jul 5, 2024 · 7 comments

Comments

@HertanuAndreea
Copy link

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:

  • 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
    error_1

  • 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
    error_2

  • After replacing the phasepath variable at line 137 in designer.py with phasepath = path.from_user(app.ARGS.phase, True), it looks like the denoising process is starting, but after a few seconds it ends with the error_3.png
    I have no clue to what this might be linked. Is this something you already encounter?
    error_3

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

@badesar1
Copy link
Collaborator

badesar1 commented Jul 8, 2024

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
Copy link
Author

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
Copy link
Collaborator

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
Copy link
Author

HertanuAndreea commented Jul 23, 2024

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

@badesar1 badesar1 closed this as completed Aug 7, 2024
@HertanuAndreea
Copy link
Author

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

@jchen33344 jchen33344 reopened this Sep 5, 2024
@badesar1
Copy link
Collaborator

badesar1 commented Sep 5, 2024

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
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants