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

New dataset hc-lumbar-shanghai #340

Open
Nilser3 opened this issue Dec 17, 2024 · 8 comments
Open

New dataset hc-lumbar-shanghai #340

Nilser3 opened this issue Dec 17, 2024 · 8 comments
Assignees

Comments

@Nilser3
Copy link

Nilser3 commented Dec 17, 2024

Description

I would like to push a new dataset hc-lumbar-shanghai to git-annex.

Is a Open Dataset available here, from this paper: An open-access lumbosacral spine MRI dataset with enhanced spinal nerve root structure resolution

Content:

anat: using constructive interference in steady state (CISS) sequence and double echo steady state (DESS) sequence for lumbar images, and T2-weight turbo spin echo (T2-TSE) sequence for whole-spine.

Image
Tagging @NathanMolinier

GT: .stl and .json files for lumbar-rootlets annotations

@Nilser3 Nilser3 self-assigned this Dec 17, 2024
@Nilser3 Nilser3 changed the title New dataset shangai-lumbar New dataset hc-lumbar-shangai Dec 17, 2024
@mguaypaq mguaypaq changed the title New dataset hc-lumbar-shangai New dataset hc-lumbar-shanghai Dec 19, 2024
@mguaypaq
Copy link
Member

I created the dataset, and gave write access to @Nilser3:
https://data.neuro.polymtl.ca/datasets/hc-lumbar-shanghai

@valosekj
Copy link
Member

@Nilser3, thank you for pushing the dataset to git-annex!

GT: .stl and .json files for lumbar-rootlets annotations

In the long term, it would be great if we find a way to convert stl GTs to nii so that they can used for DL models training.

@Nilser3
Copy link
Author

Nilser3 commented Dec 20, 2024

The .stl files was converted to .nii.gz files @valosekj

PR was created ! @mguaypaq

@valosekj
Copy link
Member

Note

This comment was originally posted on data.neuro.polymtl.ca. I'm copy-pasting it here for more visibility.


Hey @nilaia, thanks for pushing the dataset and converting .stl files to .nii! 💯

It seems that the labels under derivatives/labels correspond to acq-axCISS3d_T2w.nii.gz images, right?

screenshot Image

Perhaps we could add this BIDS tag to labels names. For example:
sub-02_label-canal_seg.nii.gz --> sub-02_acq-axCISS3d_T2w_label-canal_seg.nii.gz

What do you think?


I also noticed that label files have different dimensions than the source acq-axCISS3d_T2w.nii.gz files. Might it caused by the .stl to .nii conversion?

GIF

Image


Also, the rootlets masks are now binary. But based on Fig 1 in the dataset publication, it seems that .stl files are "rootlets-specific" (i.e., each rootlet level has its own annotation). Do you know if it is possible to keep this "rootlets-specific" information when converting .stl to .nii?

@Nilser3
Copy link
Author

Nilser3 commented Jan 20, 2025

Note

This comment was originally posted by @Nilser3 on data.neuro.polymtl.ca. I'm copy-pasting it here for more visibility.


Hi @valosekj

I apologize for my late response,

Perhaps we could add this BIDS tag to labels names. For example:
sub-02_label-canal_seg.nii.gz --> sub-02_acq-axCISS3d_T2w_label-canal_seg.nii.gz

What do you think?

The acq-axCISS3d_T2w.nii.gz image has a resolution of 0.3x0.3x2.0 and label-canal_seg.nii.gz 0.1945x0.1945x0.1945x0.1945, so I wanted to keep a segmentation at a fine resolution, so I didnt use the anat file suffix for not assume that they are at the same resolution and dimension (same with the other masks)
What do you think?

I also noticed that label files have different dimensions than the source acq-axCISS3d_T2w.nii.gz files. Might it caused by the .stl to .nii conversion?

It is possible, since when converting .stl to .nii.gz (using Slicer), I didn't need any .nii.gz image reference, so it was converted to the same resolution saved in the .stl header.

Also, the rootlets masks are now binary. But based on Fig 1 in the dataset publication, it seems that .stl files are "rootlets-specific" (i.e., each rootlet level has its own annotation). Do you know if it is possible to keep this "rootlets-specific" information when converting .stl to .nii?

The shared .stl belong to a single class (binaries), but I think we could make a rootlets-specific with the .json information that we have in derivatives/markers/sub-02/sub-02/sub-02_nerveroots_L1_L.json.

For example here I have loaded the raw .stl (as model) and the .json (as markerks) using Slicer and I manage to have the specific rootlet.

screenshot

Image

I think I can make rootlet-specific masks using this information.
However what intensity do I give to each rootlet?

L1 left = 1 , L1 right = 2 ,L2 left = 3 , L2 right = 4 ?

@valosekj
Copy link
Member

The acq-axCISS3d_T2w.nii.gz image has a resolution of 0.3x0.3x2.0 and label-canal_seg.nii.gz 0.1945x0.1945x0.1945x0.1945, so I wanted to keep a segmentation at a fine resolution, so I didnt use the anat file suffix for not assume that they are at the same resolution and dimension (same with the other masks)
What do you think?

I see! Indeed, you're right -- although derivatives/labels/sub-02/anat/sub-02_label-canal_seg.nii.gz visually corresponds to sub-02/anat/sub-02_acq-axCISS3d_T2w.nii.gz, their resolution (and also image size) is different:

$ header derivatives/labels/sub-02/anat/sub-02_label-canal_seg.nii.gz | grep pixdim
pixdim		[-1.0, 0.194471, 0.194471, 0.194471, 1.0, 1.0, 1.0, 1.0]
$ header sub-02/anat/sub-02_acq-axCISS3d_T2w.nii.gz | grep pixdim
pixdim		[-1.0, 0.3, 0.3, 1.999984, 1.0, 1.0, 1.0, 1.0]

There seems to be no anatomical image with pixdim of 0.194471, 0.194471, 0.194471 corresponding to sub-02_label-canal_seg.nii.gz, so I'm wondering whether we will actually be able to effectively use this "fine" resolution as we do not any corresponding image for the label file. Maybe we could try to resample sub-02_acq-axCISS3d_T2w.nii.gz to the "fine" resolution when training a model.

anatomical images mixdim
$ hc-lumbar-shanghai/sub-02/anat$ for f in *.nii.gz; do echo $f;pixdim $f;done
sub-02_acq-axCISS3d_T2w.nii.gz
pixdim		[-1.0, 0.3, 0.3, 1.999984, 1.0, 1.0, 1.0, 1.0]
sub-02_acq-corDE3d_T2w.nii.gz
pixdim		[-1.0, 1.265625, 1.27, 1.265625, 1.0, 1.0, 1.0, 1.0]
sub-02_acq-sag_T2w.nii.gz
pixdim		[-1.0, 3.300003, 0.625, 0.625, 1.0, 1.0, 1.0, 1.0]

It is possible, since when converting .stl to .nii.gz (using Slicer), I didn't need any .nii.gz image reference, so it was converted to the same resolution saved in the .stl header.

I see! But again, this is not ideal for future analysis, model training, etc., as most of the tools expect corresponding dim and pixdim between the image and the label file.


For example here I have loaded the raw .stl (as model) and the .json (as markerks) using Slicer and I manage to have the specific rootlet.

I think I can make rootlet-specific masks using this information.

This would be great!

However what intensity do I give to each rootlet?
L1 left = 1 , L1 right = 2 ,L2 left = 3 , L2 right = 4 ?

I would suggest the following to be consistent with lumbar-marseille and cervical rootlets.

{"C1": 1, "C2": 2, "C3": 3, "C4": 4, "C5": 5, "C6": 6, "C7": 7, "C8": 8, 
"T1": 9, "T2": 10, "T3": 11, "T4": 12, "T5": 13, "T6": 14, "T7": 15, "T8": 16, "T9": 17, "T10": 18, "T11": 19, "T12": 20, 
"L1": 21, "L2": 22, "L3": 23, "L4": 24,"L5": 25, "S1": 26, "S2": 27, "S3": 28, "S4": 29,"S5": 30}

@Nilser3
Copy link
Author

Nilser3 commented Jan 22, 2025

Thanks for your feedback @valosekj
I am working on it:
Image

@valosekj
Copy link
Member

valosekj commented Jan 22, 2025

This is amazing, Nilser! Would you mind recording your screen when doing this encoding in Slicer? (we can then put the recording to our G Drive)

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

3 participants