daducci / AMICO

Accelerated Microstructure Imaging via Convex Optimization (AMICO) from diffusion MRI data
Other
104 stars 62 forks source link

error in AMICO_LoadData #141

Closed Dariodc97 closed 2 years ago

Dariodc97 commented 2 years ago

Hi everyone,

I'm actually having this issue in the step of the loading of the data. I'm going to report here the errors: Error using load_nii_hdr (line 79) Cannot find file "/home/ddelcuore/NoddiTutorial/Tutorial/NoddiTutorial/Tutorial/NODDI_DWI.hdr".

Error in load_untouch_nii (line 81) [nii.hdr,nii.filetype,nii.fileprefix,nii.machine] = load_nii_hdr(filename);

Error in AMICO_LoadData (line 11) niiSIGNAL = load_untouch_nii( CONFIG.dwiFilename );

Error in untitled (line 19) AMICO_LoadData

Do you have any idea of how to solve the issue?

Thank you, Kind Regards.

MarioOcampo commented 2 years ago

Hello @Dariodc97,

Thank you for letting us know about the error.

Could you chek that the path "/home/ddelcuore/NoddiTutorial/Tutorial/NoddiTutorial/Tutorial/" is correct. Maybe "NoddiTutorial/Tutorial/NoddiTutorial/Tutorial" is only "NoddiTutorial/Tutorial/".

In the tutorial the file loaded is "NODDI_DWI.img", do you have that file?

Let us know if these changes solved the issue. Best Mario

Dariodc97 commented 2 years ago

Hi Mario,

I actually transferred the NODDI_example_dataset to the folder NoddiTutorial/Tutorial. There I do have the file NODDI_DWI.img. Actually, I reckon that the program is choosing the path itself.

Maybe I made a mistake related to the AMICO_Setup.m file. In AMICO_data_path, do I have to put the path in which the NODDI_example_dataset folder is? Is it correct?

Thank you again, Cheers. Dario.

MarioOcampo commented 2 years ago

Hello Dario, Yes, if the path is different, the problem can be in the configuration of the paths.

Are you using the Matlab version? I recommend to use the Python version.

Best regards Mario

Dariodc97 commented 2 years ago

Yes, I'm using the Matlab version. To be honest, I'm interested in the application of AMICO in the NDODI toolbox and that's why I'll prefer to keep it on Matlab.

I feel like this part is really confusing:

AMICO_data_path : path to the folder where you store all your datasets. E.g. /home/user/AMICO/data.

The datasets are in the folder NODDI_example_data, right?

Thank you again, Cheers.

daducci commented 2 years ago

Ciao Dario,

indeed the MATLAB version is very outdated and not maintained anymore (I think last commit was 7 years ago), so we strongly suggest you to give the python version a try. What is the problem with the python version? If needed, we could speak one of these days and we can assist you.

Ale

Dariodc97 commented 2 years ago

Hi everyone, I'm trying to use python now as you suggested.

I actually have a problem in the ae.load_data:

ae.load_data( "NODDI_DWI.img", "NODDI_protocol.scheme", mask_filename="roi_mask.img", b0_thr=0 )

-> Loading data:

Here is saying that the file was not found, but actually the file is located in the folder that I called:

ddelcuore@stromboli:~/NODDI_example_dataset$ ls brain_mask.hdr NODDI_DWI.img NODDI_protocol.scheme roi_mask.img brain_mask.img NODDI_protocol.bval output NODDI_DWI.hdr NODDI_protocol.bvec roi_mask.hdr

Do you have any idea of how to debug the error?

Thank you. Cheers.

MarioOcampo commented 2 years ago

Hello Dario, thank you for giving a try to the python version.

How was the object ae created? (ae = amico.Evaluation("Study01", "Subject01")) and in which folder are you executing the script? AMICO requires a specific folder structure. For example:

└── Study01
    └── Subject01
        ├── NODDI_DWI.hdr
        ├── NODDI_DWI.img
         ...

In this case, the script (the example in the Wiki) where you create the object ae and load the data should be in the same folder as Study01.

Let us know if you solve the issue.

Best regards Mario

Dariodc97 commented 2 years ago

Yes, I organized better the data and now it is working. Thank you!