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

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

Closed
AbAstris opened this issue Apr 3, 2024 · 5 comments
Closed

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

AbAstris opened this issue Apr 3, 2024 · 5 comments
Assignees
Labels

Comments

@AbAstris
Copy link

AbAstris commented Apr 3, 2024

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 daducci self-assigned this Apr 4, 2024
@daducci
Copy link
Owner

daducci commented Apr 4, 2024

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

AbAstris commented Apr 4, 2024

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

daducci commented Apr 4, 2024

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

AbAstris commented Apr 4, 2024

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

@AbAstris
Copy link
Author

AbAstris commented Apr 9, 2024

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!

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

No branches or pull requests

2 participants