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

Testing contrast-agnostic model on GRE magnitude data #108

Open
jcohenadad opened this issue Jun 5, 2024 · 1 comment
Open

Testing contrast-agnostic model on GRE magnitude data #108

jcohenadad opened this issue Jun 5, 2024 · 1 comment

Comments

@jcohenadad
Copy link
Member

jcohenadad commented Jun 5, 2024

As of SCT version spinalcordtoolbox/spinalcordtoolbox@bb479d8 (install dev version until SCT v6.4 is released)

Syntax:

# Cord segmentation
sct_deepseg -i sub-test5_magnitude1.nii.gz -task seg_sc_contrast_agnostic -qc qc
# And then to dilate
sct_maths -i sub-test5_magnitude1_seg.nii.gz -dilate 5 -shape disk -dim 1 -o sub-test5_magnitude1_seg_dil.nii.gz

Red: contrast-agnostic (release https://github.com/sct-pipeline/contrast-agnostic-softseg-spinalcord/releases/tag/v2.4), Green: sct_deepseg_sc:

image

With the mask:
image

@chaigner

@jcohenadad
Copy link
Member Author

jcohenadad commented Jun 5, 2024

Trying with a lumbar data:

image

First thing to do is to reorient the image (bc AP and SI are swapped):

sct_image -i 109_Rekos_magnitude1.nii -transpose y,x,z -o 109_Rekos_magnitude1_transposed.nii.gz
sct_image -i 109_Rekos_magnitude1_transposed.nii.gz -flip x -o 109_Rekos_magnitude1_transposed.nii.gz

Which gives:

image

Now we can run the inference:

sct_deepseg -i 109_Rekos_magnitude1_transposed.nii.gz -task seg_sc_contrast_agnostic -qc qc

Result (room for improvement 😅):
image

QC report: qc.zip

Note

For creating the mask for shimming, binary segmentation will suffice. However, for precise evaluation of shimming methods, e.g., computing B0 inside the spinal cord, then the soft segmentation should be used (see entry "2024-06-05 10:26:01" in the QC report).

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

1 participant