daducci / AMICO

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

Noticeable steps (lack of smoothness) in ICVF/ODI #183

Closed AbAstris closed 7 months ago

AbAstris commented 8 months ago

Apologies if this has already been answered, I hadn't seen another thread on this.

I'm new to NODDI, but I have been running AMICO NODDI to speed up the process on paediatric healthy controls (ages 7-17 yrs) and paediatric patients with tumours in the cerebellum/brain stem. One thing I've noticed is that the ICVF image in particular seems to have noticeable steps in the data and looks slightly artificial, i.e. there aren't smooth transitions between voxels nor is there a lot of variation between voxel values.

Here is an example (values set at min 0.2 to max 0.8):

Screenshot 2024-04-03 at 11 20 37

The ODI map seems better, but there are still areas where multiple voxels have values at 0.3 (i.e. in the corpus callosum). Here is an example (values set at min -0.1 to max 0.9):

Screenshot 2024-04-03 at 11 31 01

Here is an example of the python code that I use to run the model:

import_ amico

ae = amico.Evaluation("Study01", "Subject03")
amico.util.fsl2scheme("/dir/Study01/Subject19/NODDI_protocol.bvals", "/dir/Study01/Subject19/NODDI_protocol.bvecs")
ae.load_data(dwi_filename="/dir/Study01/Subject19/NODDI_DWI.nii.gz", scheme_filename="/dir/Study01/Subject19/NODDI_protocol.scheme", mask_filename="/dir/Study01/Subject19/brain_mask.nii.gz", b0_thr=0)

ae.set_model("NODDI")
ae.generate_kernels(regenerate=True)
ae.load_kernels()
ae.fit()
ae.save_results()

Do these results seem correct or is there something I'm doing wrong?

Best wishes,

Emily

daducci commented 8 months ago

Dear Emily,

Can you try setting ae.set_config( 'doSaveModulatedMaps', True ) right after ae = amico.Evaluation(...) and inspect the maps with the suffix _modulated? The white voxels you are referring to are mostly due to degeneracy of the NODDI model in locations where there are are little to no neurites, e.g. in voxels with partial volume with CSF. You can find more details here.

AbAstris commented 8 months ago

Hi @daducci,

Thank you for your quick response! I really appreciate it.

I was more referring to blocks of grey voxels with the same value (not on the edge of the brain). As an example, if I focus on the axial slice of the ICVF map, there are large areas where the values are all the same (this is also found in the coronal and sagittal slices).

Steps

I've circled some of the areas in the above image - the red circle corresponds to a cluster of voxels with the same value of 0.42363637 and the blue circle corresponds to a cluster of voxels with the same value at 0.34272727.

I also ran the original version of NODDI on MATLAB for comparison - below, on the left is the MATLAB version of NODDI and on the right is the AMICO version of NODDI. The MATLAB version doesn't have clusters of voxels with the same values.

Comparison_NODDIM_Amico

I just wanted to check to see if this was expected from the AMICO version of NODDI?

daducci commented 8 months ago

Ops, sorry, I didn't zoom in into the images and didn't notice the flat areas. This usually means the L1 regularization might be too high. You can try lowering lambda1 using the function set_solver(...) before the fit. If, by chance you can share privately some data, we can have a look.

PS: did you use the very same diffusivity values in both NODDI and AMICO?

AbAstris commented 8 months ago

Thank you @daducci. I've now sent you an email.

AbAstris commented 7 months ago

To close this issue (just in case anyone else runs into the problem), the solution was to increase the lambda2 parameter in set_solver(...) before the fit.

For example: ae = amico.Evaluation("StudyXX", "SubjectXX") ae.set_solver(lambda1=5e-1, lambda2=1e-2)

The default values for NODDI: lambda1 = 5e-1, lambda2 = 1e-3

Best wishes and thank you!