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

NIFTI file to define "MNI152" space? #5

Open
zhenglukai opened this issue Feb 12, 2024 · 2 comments
Open

NIFTI file to define "MNI152" space? #5

zhenglukai opened this issue Feb 12, 2024 · 2 comments

Comments

@zhenglukai
Copy link

Dear Developers,

Thank you for providing this very useful package. While trying coldcuts with my own segmentation files, I noticed that the "MNI152" reference space defined in seg_draw() is different from the template "MNI152_T1_1mm.nii.gz" shipped with FSL.

See below for an example. The upper image shows my segmentation superimposed on "MNI152_T1_1mm.nii.gz", while the lower image shows the output of seg_plot() with "show_outline=T".

snapshot0001
Rplot

Could you please share the NIFTI file you used to define "MNI152" reference space in coldcuts, so that I can resample my segmentation to get it in the correct position in the plot?

Thanks in advance.

Kind regards,
Lukai

@gdagstn
Copy link
Collaborator

gdagstn commented Feb 15, 2024

Hi Lukai,

thanks for reaching out. This may be a limitation of coldcuts that I am happy to address.

The MNI152 template you use does not change in coldcuts: in fact, the "outline" you see is just the maximal projection of all slices from your volume on either axis (sagittal in your case), and it does not necessarily represent the original template volume - imagine if your segmentation only looks at some specific subcortical structures you would see a much smaller outline. This may be one of the reasons why you see a different overall shape compared to FSL. This is also why I think the same slices do not appear at the same index (the counting starts at the first non-empty slice rather than at a distance from the template).

For coldcuts to match the shape that you see in FSL there would be two changes needed:

  1. the outline should be drawn on the template rather than on the maximal projection of the slices. I'm not sure how I would do this but there must be a simple way (probably using the ABA segmentation for the outline?)
  2. the indices should align to the actual distance from either side of the template rather than the simple ordering of slices

This would require some reworking of the package but I believe they're important modifications.

If you don't mind sharing your segmentation with me I can use it to adjust the plotting so that it matches what you see in FSL; otherwise I can use any other segmentation on the same template and make the adjustments.

Let me know and thanks for reporting!

@zhenglukai
Copy link
Author

Dear Giuseppe,

Thank you for your explanation! Enclosed, please find my segmentation and ontology file. I've also ventured into creating a new segmentation with the brain outline. Yet, I've encountered an issue: when plotting the new segmentation using seg_plot(new_seg, s_slice=102, show_outline=F), label 1 (red) fails to display.

I would be grateful for your guidance on adjusting my segmentation.

Rplot01

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

2 participants