Conversation
…part of the training dataset D5. For details; see https://github.com/ivadomed/model-spinal-rootlets/tree/main/training
… 4 manual raters and the STAPLE algorithm and were part of the testing dataset D5. For details; see https://github.com/ivadomed/model-spinal-rootlets/tree/main/training and ivadomed/model-spinal-rootlets#17
|
Hold on with merging. According to this comment, $ tree derivatives/labels/sub-amu02/anat/
...
├── sub-amu02_T2w_label-rootlets_dseg_desc-rater1.json
├── sub-amu02_T2w_label-rootlets_dseg_desc-rater1.nii.gz
├── sub-amu02_T2w_label-rootlets_dseg_desc-rater2.json
├── sub-amu02_T2w_label-rootlets_dseg_desc-rater2.nii.gz
├── sub-amu02_T2w_label-rootlets_dseg_desc-rater3.json
├── sub-amu02_T2w_label-rootlets_dseg_desc-rater3.nii.gz
├── sub-amu02_T2w_label-rootlets_dseg_desc-rater4.json
├── sub-amu02_T2w_label-rootlets_dseg_desc-rater4.nii.gz
├── sub-amu02_T2w_label-rootlets_dseg_desc-staple.json
├── sub-amu02_T2w_label-rootlets_dseg_desc-staple.nii.gz
... |
|
it would be good if @NathanMolinier can vet this (sorry Nathan, you are now our internal BIDS consultant 😅) |
Yes indeed, doing this will help us all when trying to identify data for a given dataset. I did not add any specific rules in our intranet to follow a specific order when using entities, but the least we should do is to append the entity |
Okay! Thanks for the confirmation; I will update the filenames in this branch. Just a side note:
I wrote this function fetching individual BIDS entities using regular expressions based on their keys (e.g., |
Great ! That's how BIDS should be used indeed ! Entities are using keys to allow automation ! That's why, for me, BIDS should not use suffixes at all, they're basically just random values not attached to any keys. |
|
I updated the filenames to NOT go with For example: @NathanMolinier, could you please confirm, that the rootlets labels are now okay? |
|
Hey @valosekj ! This new naming version is indeed better ! Also, I would like to add a small comment: I see that you are using the suffix |
Great, thanks for taking the look!
Exactly! Rootlet labels have values from 2 to 8.
Good point! Currently, the mapping is avaialble, for example, in the GIF in the rootlets README. But yes, adding a section/tutorial about rootlets to https://spinalcordtoolbox.com is a good idea. I've put it on my to-do list (ivadomed/model-spinal-rootlets#39). @mguaypaq, can you please merge? |
mguaypaq
left a comment
There was a problem hiding this comment.
Looks fine from my end, in terms of git annex get.
|
Ah, the dataset validator is failing because it's too old and doesn't run properly, not because it identified a real issue. I'll have to fix it before merging this PR. |
Hey @mguaypaq! What's the status of the dataset validator? |
|
Maybe we should wait before merging this PR we are completely updating the filenames and tree with @sandrinebedard in #176 |
Sorry, I haven't worked on this yet. And sadly, I think there's been negative progress: in December 2024, the bids-validator project switched to a completely new version 2.0, using Deno rather than NodeJS as their runtime, so I have to figure out how to upgrade that too. |
|
Okay, after an in-person discussion with @mguaypaq and @NathanMolinier, I did the following steps to make the rootlets masks from this PR compatible with the latest TL;DR: I reoriented the rootlets labels from LPI to RPI to match the corresponding T2w images.
git checkout master
git checkout - -- ./derivatives/labels/sub-mgh01/anat/sub-mgh01_T2w_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-ucdavis03/anat/sub-ucdavis03_T2w_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-stanford05/anat/sub-stanford05_T2w_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-stanford02/anat/sub-stanford02_T2w_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-barcelona02/anat/sub-barcelona02_T2w_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-amu01/anat/sub-amu01_T2w_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-balgrist03/anat/sub-balgrist03_T2w_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-balgrist04/anat/sub-balgrist04_T2w_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-barcelona03/anat/sub-barcelona03_T2w_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-balgrist02/anat/sub-balgrist02_T2w_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-brnoUhb01/anat/sub-brnoUhb01_T2w_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-cmrra02/anat/sub-cmrra02_T2w_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-mgh02/anat/sub-mgh02_T2w_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-cmrra04/anat/sub-cmrra04_T2w_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-cardiff04/anat/sub-cardiff04_T2w_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-cardiff02/anat/sub-cardiff02_T2w_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-brnoUhb03/anat/sub-brnoUhb03_T2w_desc-rater4_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-brnoUhb03/anat/sub-brnoUhb03_T2w_desc-rater3_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-brnoUhb03/anat/sub-brnoUhb03_T2w_desc-rater2_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-brnoUhb03/anat/sub-brnoUhb03_T2w_desc-staple_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-brnoUhb03/anat/sub-brnoUhb03_T2w_desc-rater1_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-barcelona01/anat/sub-barcelona01_T2w_desc-rater2_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-barcelona01/anat/sub-barcelona01_T2w_desc-rater4_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-barcelona01/anat/sub-barcelona01_T2w_desc-rater3_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-barcelona01/anat/sub-barcelona01_T2w_desc-rater1_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-barcelona01/anat/sub-barcelona01_T2w_desc-staple_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-barcelona06/anat/sub-barcelona06_T2w_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-amu02/anat/sub-amu02_T2w_desc-rater4_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-amu02/anat/sub-amu02_T2w_desc-rater3_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-amu02/anat/sub-amu02_T2w_desc-rater2_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-amu02/anat/sub-amu02_T2w_desc-staple_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-amu02/anat/sub-amu02_T2w_desc-rater1_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-amu05/anat/sub-amu05_T2w_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-balgrist01/anat/sub-balgrist01_T2w_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-balgrist06/anat/sub-balgrist06_T2w_label-rootlets_dseg.nii.gz ./derivatives/labels/sub-geneva01/anat/sub-geneva01_T2w_label-rootlets_dseg.nii.gz
for f in $(find . -name "*rootlets*.nii.gz"); do (master|…36)
label=$f
image=$(echo "$f" | sed 's|^./derivatives/labels/||; s/_label-rootlets_dseg//')
echo ""
echo "$label"
pixdim "$label"
orientation "$label"
echo ""
# Check if $image contains "desc" and skip if it does
if [[ $image != *desc* ]]; then
echo "$image"
pixdim "$image"
orientation "$image"
fi
doneTL;DR: resolution is the same; orientation is different (RPI vs LPI) details./derivatives/labels/sub-mgh01/anat/sub-mgh01_T2w_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.8, 0.8, 0.8, 0.0, 0.0, 0.0, 0.0]
LPI
sub-mgh01/anat/sub-mgh01_T2w.nii.gz
pixdim [-1.0, 0.800001, 0.8, 0.8, 1.0, 1.0, 1.0, 1.0]
RPI
./derivatives/labels/sub-ucdavis03/anat/sub-ucdavis03_T2w_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.8, 0.8, 0.8, 0.0, 0.0, 0.0, 0.0]
LPI
sub-ucdavis03/anat/sub-ucdavis03_T2w.nii.gz
pixdim [-1.0, 0.8, 0.8, 0.8, 1.0, 1.0, 1.0, 1.0]
RPI
./derivatives/labels/sub-stanford05/anat/sub-stanford05_T2w_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.800036, 0.8, 0.8, 0.0, 0.0, 0.0, 0.0]
LPI
sub-stanford05/anat/sub-stanford05_T2w.nii.gz
pixdim [-1.0, 0.800036, 0.8, 0.8, 1.0, 1.0, 1.0, 1.0]
RPI
./derivatives/labels/sub-stanford02/anat/sub-stanford02_T2w_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.799971, 0.8, 0.8, 0.0, 0.0, 0.0, 0.0]
LPI
sub-stanford02/anat/sub-stanford02_T2w.nii.gz
pixdim [-1.0, 0.799971, 0.8, 0.8, 1.0, 1.0, 1.0, 1.0]
RPI
./derivatives/labels/sub-barcelona02/anat/sub-barcelona02_T2w_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.799999, 0.8, 0.8, 0.0, 0.0, 0.0, 0.0]
LPI
sub-barcelona02/anat/sub-barcelona02_T2w.nii.gz
pixdim [-1.0, 0.799999, 0.8, 0.8, 1.0, 1.0, 1.0, 1.0]
RPI
./derivatives/labels/sub-amu01/anat/sub-amu01_T2w_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.800001, 0.8, 0.8, 0.0, 0.0, 0.0, 0.0]
LPI
sub-amu01/anat/sub-amu01_T2w.nii.gz
pixdim [-1.0, 0.800001, 0.8, 0.8, 1.0, 1.0, 1.0, 1.0]
RPI
./derivatives/labels/sub-balgrist03/anat/sub-balgrist03_T2w_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.799999, 0.8, 0.8, 0.0, 0.0, 0.0, 0.0]
LPI
sub-balgrist03/anat/sub-balgrist03_T2w.nii.gz
pixdim [-1.0, 0.799999, 0.8, 0.8, 1.0, 1.0, 1.0, 1.0]
RPI
./derivatives/labels/sub-balgrist04/anat/sub-balgrist04_T2w_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.8, 0.8, 0.8, 0.0, 0.0, 0.0, 0.0]
LPI
sub-balgrist04/anat/sub-balgrist04_T2w.nii.gz
pixdim [-1.0, 0.8, 0.8, 0.8, 1.0, 1.0, 1.0, 1.0]
RPI
./derivatives/labels/sub-barcelona03/anat/sub-barcelona03_T2w_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.799999, 0.8, 0.8, 0.0, 0.0, 0.0, 0.0]
LPI
sub-barcelona03/anat/sub-barcelona03_T2w.nii.gz
pixdim [-1.0, 0.799999, 0.8, 0.8, 1.0, 1.0, 1.0, 1.0]
RPI
./derivatives/labels/sub-balgrist02/anat/sub-balgrist02_T2w_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.799999, 0.8, 0.8, 0.0, 0.0, 0.0, 0.0]
LPI
sub-balgrist02/anat/sub-balgrist02_T2w.nii.gz
pixdim [-1.0, 0.799999, 0.8, 0.8, 1.0, 1.0, 1.0, 1.0]
RPI
./derivatives/labels/sub-brnoUhb01/anat/sub-brnoUhb01_T2w_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.799976, 0.5, 0.5, 0.0, 0.0, 0.0, 0.0]
LPI
sub-brnoUhb01/anat/sub-brnoUhb01_T2w.nii.gz
pixdim [-1.0, 0.799976, 0.8, 0.8, 1.0, 1.0, 1.0, 1.0]
RPI
./derivatives/labels/sub-cmrra02/anat/sub-cmrra02_T2w_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.8, 0.8, 0.8, 0.0, 0.0, 0.0, 0.0]
LPI
sub-cmrra02/anat/sub-cmrra02_T2w.nii.gz
pixdim [-1.0, 0.799999, 0.8, 0.8, 1.0, 1.0, 1.0, 1.0]
RPI
./derivatives/labels/sub-mgh02/anat/sub-mgh02_T2w_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.8, 0.8, 0.8, 0.0, 0.0, 0.0, 0.0]
LPI
sub-mgh02/anat/sub-mgh02_T2w.nii.gz
pixdim [-1.0, 0.799999, 0.8, 0.8, 1.0, 1.0, 1.0, 1.0]
RPI
./derivatives/labels/sub-cmrra04/anat/sub-cmrra04_T2w_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.799999, 0.8, 0.8, 0.0, 0.0, 0.0, 0.0]
LPI
sub-cmrra04/anat/sub-cmrra04_T2w.nii.gz
pixdim [-1.0, 0.799999, 0.8, 0.8, 1.0, 1.0, 1.0, 1.0]
RPI
./derivatives/labels/sub-cardiff04/anat/sub-cardiff04_T2w_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.8, 0.8, 0.8, 0.0, 0.0, 0.0, 0.0]
LPI
sub-cardiff04/anat/sub-cardiff04_T2w.nii.gz
pixdim [-1.0, 0.800002, 0.8, 0.8, 1.0, 1.0, 1.0, 1.0]
RPI
./derivatives/labels/sub-cardiff02/anat/sub-cardiff02_T2w_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.8, 0.8, 0.8, 0.0, 0.0, 0.0, 0.0]
LPI
sub-cardiff02/anat/sub-cardiff02_T2w.nii.gz
pixdim [-1.0, 0.799999, 0.8, 0.8, 1.0, 1.0, 1.0, 1.0]
RPI
./derivatives/labels/sub-brnoUhb03/anat/sub-brnoUhb03_T2w_desc-rater4_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.800042, 0.5, 0.5, 0.0, 0.0, 0.0, 0.0]
LPI
./derivatives/labels/sub-brnoUhb03/anat/sub-brnoUhb03_T2w_desc-rater3_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.800042, 0.5, 0.5, 0.0, 0.0, 0.0, 0.0]
LPI
./derivatives/labels/sub-brnoUhb03/anat/sub-brnoUhb03_T2w_desc-rater2_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.800042, 0.5, 0.5, 0.0, 0.0, 0.0, 0.0]
LPI
./derivatives/labels/sub-brnoUhb03/anat/sub-brnoUhb03_T2w_desc-staple_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.800042, 0.5, 0.5, 0.0, 0.0, 0.0, 0.0]
LPI
./derivatives/labels/sub-brnoUhb03/anat/sub-brnoUhb03_T2w_desc-rater1_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.800042, 0.5, 0.5, 0.0, 0.0, 0.0, 0.0]
LPI
./derivatives/labels/sub-barcelona01/anat/sub-barcelona01_T2w_desc-rater2_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.799999, 0.8, 0.8, 0.0, 0.0, 0.0, 0.0]
LPI
./derivatives/labels/sub-barcelona01/anat/sub-barcelona01_T2w_desc-rater4_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.799999, 0.8, 0.8, 0.0, 0.0, 0.0, 0.0]
LPI
./derivatives/labels/sub-barcelona01/anat/sub-barcelona01_T2w_desc-rater3_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.799999, 0.8, 0.8, 0.0, 0.0, 0.0, 0.0]
LPI
./derivatives/labels/sub-barcelona01/anat/sub-barcelona01_T2w_desc-rater1_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.799999, 0.8, 0.8, 0.0, 0.0, 0.0, 0.0]
LPI
./derivatives/labels/sub-barcelona01/anat/sub-barcelona01_T2w_desc-staple_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.799999, 0.8, 0.8, 0.0, 0.0, 0.0, 0.0]
LPI
./derivatives/labels/sub-barcelona06/anat/sub-barcelona06_T2w_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.799999, 0.8, 0.8, 0.0, 0.0, 0.0, 0.0]
LPI
sub-barcelona06/anat/sub-barcelona06_T2w.nii.gz
pixdim [-1.0, 0.799999, 0.8, 0.8, 1.0, 1.0, 1.0, 1.0]
RPI
./derivatives/labels/sub-amu02/anat/sub-amu02_T2w_desc-rater4_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.800001, 0.8, 0.8, 0.0, 0.0, 0.0, 0.0]
LPI
./derivatives/labels/sub-amu02/anat/sub-amu02_T2w_desc-rater3_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.800001, 0.8, 0.8, 0.0, 0.0, 0.0, 0.0]
LPI
./derivatives/labels/sub-amu02/anat/sub-amu02_T2w_desc-rater2_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.800001, 0.8, 0.8, 0.0, 0.0, 0.0, 0.0]
LPI
./derivatives/labels/sub-amu02/anat/sub-amu02_T2w_desc-staple_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.800001, 0.8, 0.8, 0.0, 0.0, 0.0, 0.0]
LPI
./derivatives/labels/sub-amu02/anat/sub-amu02_T2w_desc-rater1_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.800001, 0.8, 0.8, 0.0, 0.0, 0.0, 0.0]
LPI
./derivatives/labels/sub-amu05/anat/sub-amu05_T2w_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.799999, 0.8, 0.8, 0.0, 0.0, 0.0, 0.0]
LPI
sub-amu05/anat/sub-amu05_T2w.nii.gz
pixdim [-1.0, 0.799999, 0.8, 0.8, 1.0, 1.0, 1.0, 1.0]
RPI
./derivatives/labels/sub-balgrist01/anat/sub-balgrist01_T2w_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.799999, 0.8, 0.8, 0.0, 0.0, 0.0, 0.0]
LPI
sub-balgrist01/anat/sub-balgrist01_T2w.nii.gz
pixdim [-1.0, 0.799999, 0.8, 0.8, 1.0, 1.0, 1.0, 1.0]
RPI
./derivatives/labels/sub-balgrist06/anat/sub-balgrist06_T2w_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.799999, 0.8, 0.8, 0.0, 0.0, 0.0, 0.0]
LPI
sub-balgrist06/anat/sub-balgrist06_T2w.nii.gz
pixdim [-1.0, 0.799999, 0.8, 0.8, 1.0, 1.0, 1.0, 1.0]
RPI
./derivatives/labels/sub-geneva01/anat/sub-geneva01_T2w_label-rootlets_dseg.nii.gz
pixdim [1.0, 0.8, 0.8, 0.8, 0.0, 0.0, 0.0, 0.0]
LPI
sub-geneva01/anat/sub-geneva01_T2w.nii.gz
pixdim [-1.0, 0.8, 0.8, 0.8, 1.0, 1.0, 1.0, 1.0]
RPI
for f in $(find . -name "*rootlets*.nii.gz"); do sct_image -i $f -setorient RPI -o $f;done
|
mguaypaq
left a comment
There was a problem hiding this comment.
Everything is fine with git-annex.
This PR adds dorsal C2-C8 rootlets labels for T2w images of 24 subjects. The labels were part of the "D5 dataset" used for training and testing of the "M5 model":
Based on this discussion, I chose the following suffixes according our intranet:
sub-amu01_T2w_label-rootlets_dseg.nii.gz- training label (one label per image)sub-amu02_T2w_label-rootlets_dseg_desc-rater1.nii.gz- testing label (5 labels per image --> usingdesc-to distinguish between raters)The rootlets labels were created from the raw T2w images (i.e., no reorientation or resampling was done) --> I included
"SpatialReference": "orig"into JSON sidecars.@mguaypaq, could you please check the PR and merge? Thanks!