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

Update the GT segmentation file names with the new conventions #300

Open
Nilser3 opened this issue Feb 16, 2024 · 8 comments
Open

Update the GT segmentation file names with the new conventions #300

Nilser3 opened this issue Feb 16, 2024 · 8 comments

Comments

@Nilser3
Copy link

Nilser3 commented Feb 16, 2024

Description

This issue will be used to update the GT segmentation names to be in conformity with the new conventions.

Current arborescence of datasets:

Data MP2RAGE

tree basel-mp2rage

├── sub-C001
│   └── anat
│       └── sub-C001_UNIT1.nii.gz
...
├── sub-P001
│   └── anat
│       ├── sub-P001_UNIT1.nii.gz
...
├── derivatives
│   └── labels
│       ├── sub-C001
│       │   └── anat
│       │       ├── sub-C001_UNIT1_label-SC_seg.json
│       │       └── sub-C001_UNIT1_label-SC_seg.nii.gz
...
│       ├── sub-P001
│       │   └── anat
│       │       ├── sub-P001_UNIT1_label-SC_seg.json
│       │       ├── sub-P001_UNIT1_label-SC_seg.nii.gz
│       │       ├── sub-P001_UNIT1_lesion-manualHaris.json
│       │       ├── sub-P001_UNIT1_lesion-manualHaris.nii.gz
│       │       ├── sub-P001_UNIT1_lesion-manualKatrin.json
│       │       ├── sub-P001_UNIT1_lesion-manualKatrin.nii.gz
│       │       ├── sub-P001_UNIT1_lesion-manualNeuroPoly.json
│       │       └── sub-P001_UNIT1_lesion-manualNeuroPoly.nii.gz

tree marseille-3T-mp2rage

├── sub-MRS00
│   └── ses-M0
│       └── anat
│           └── sub-MRS00_ses-M0_UNIT1.nii.gz
...
├── derivatives
│   └── labels
│       ├── sub-MRS00
│       │   └── ses-M0
│       │       └── anat
│       │           ├── sub-MRS00_ses-M0_UNIT1_label-lesion_desc-rater1.json
│       │           ├── sub-MRS00_ses-M0_UNIT1_label-lesion_desc-rater1.nii.gz
│       │           ├── sub-MRS00_ses-M0_UNIT1_label-lesion_desc-rater2.json
│       │           ├── sub-MRS00_ses-M0_UNIT1_label-lesion_desc-rater2.nii.gz
│       │           ├── sub-MRS00_ses-M0_UNIT1_label-SC_seg.json
│       │           └── sub-MRS00_ses-M0_UNIT1_label-SC_seg.nii.gz

tree nih-ms-mp2rage

├── sub-nih001
│   └── anat
│       ├── sub-nih001_desc-denoised_UNIT1.nii.gz
│       ├── sub-nih001_inv-1_part-mag_MP2RAGE.nii.gz
│       ├── sub-nih001_inv-2_part-mag_MP2RAGE.nii.gz
│       ├── sub-nih001_T1map.nii.gz
│       └── sub-nih001_UNIT1.nii.gz
...
├── derivatives
│   └── labels
│       ├── sub-nih001
│       │   └── anat
│       │       ├── sub-nih001_UNIT1_label-SC_seg.json
│       │       └── sub-nih001_UNIT1_label-SC_seg.nii.gz

@jcohenadad
Copy link
Member

jcohenadad commented Feb 16, 2024

i think "desc-rater1" should not go at the end @NathanMolinier can confirm

image

@NathanMolinier
Copy link

i think "desc-rater1" should not go at the end @NathanMolinier can confirm

Yes, it should not indeed. Also, the suffix _seg is missing (or _dseg if multiple types of lesions are segmented).

See the corrected tree below for marseille-3T-mp2rage:

├── derivatives
│   └── labels
│       ├── sub-MRS00
│       │   └── ses-M0
│       │       └── anat
│       │           ├── sub-MRS00_ses-M0_UNIT1_desc-rater1_label-lesion_seg.json
│       │           ├── sub-MRS00_ses-M0_UNIT1_desc-rater1_label-lesion_seg.nii.gz
│       │           ├── sub-MRS00_ses-M0_UNIT1_desc-rater2_label-lesion_seg.json
│       │           ├── sub-MRS00_ses-M0_UNIT1_desc-rater2_label-lesion_seg.nii.gz

There is also a problem here with the basel-mp2rage dataset:

├── derivatives
│   └── labels
│       ├── sub-C001
│       │   └── anat
│       │       ├── sub-C001_UNIT1_label-SC_seg.json
│       │       └── sub-C001_UNIT1_label-SC_seg.nii.gz
...
│       ├── sub-P001
│       │   └── anat
│       │       ├── sub-P001_UNIT1_label-SC_seg.json
│       │       ├── sub-P001_UNIT1_label-SC_seg.nii.gz 
│       │       ├── sub-P001_UNIT1_desc-rater1_label-lesion_seg.json                 <-----------
│       │       ├── sub-P001_UNIT1_desc-rater1_label-lesion_seg.nii.gz                 <-----------
│       │       ├── sub-P001_UNIT1_desc-rater2_label-lesion_seg.json                 <-----------
│       │       ├── sub-P001_UNIT1_desc-rater2_label-lesion_seg.nii.gz                 <-----------
│       │       ├── sub-P001_UNIT1_desc-rater3_label-lesion_seg.json                 <-----------
│       │       └── sub-P001_UNIT1_desc-rater3_label-lesion_seg.nii.gz                 <-----------

The name of the rater should be added instead to the .json sidecar.

@Nilser3
Copy link
Author

Nilser3 commented Feb 21, 2024

Thanks you @NathanMolinier

Following the new conventions, here is the modifications for basel-mp2rage

I have no details to fill in the JSON files for Haris nor Katrin segmentations:

Previous JSON sidecar : sub-P001_UNIT1_lesion-manualHaris.json

{
  "Authors": [
    "USB",
    "Nilser Laines Medina"
  ],
  "Label": "lesion-manual"
}

New JSON sidecar : sub-P001_UNIT1_desc-rater1_label-lesion_seg.json

{
    "SpatialReference": "orig",
    "GeneratedBy": [
        {
            "Name": "Manual",
            "Author": "Haris",
            "Date": ""
        }
    ]
}

Previous JSON sidecar : sub-P001_UNIT1_lesion-manualNeuroPolyjson

{
    "SpatialReference": "orig",
    "GeneratedBy": [
        {
            "Name": "Manual",
            "Author": "Katrin",
            "Date": ""
        }
    ]
}

New JSON sidecar : sub-P001_UNIT1_desc-rater3_label-lesion_seg.json

{
    "SpatialReference": "orig",
    "GeneratedBy": [
        {
            "Name": "Manual",
            "Author": "Katrin",
            "Date": ""
        }
        {
            "Name": "Manual",
            "Author": "Michelle Chen",
            "Date": "2023-01-23"
        }
    ]
}

Feedback please @mguaypaq
branch: nlm/update_gt_names
commit: 0177d5dcbfb15cd1ba808c7671b8b8a6de675901

@NathanMolinier
Copy link

NathanMolinier commented Feb 21, 2024

Regarding the format for JSON sidecars, please check our intranet.

These are the fields which are needed:

{
    "SpatialReference": "orig",
    "GeneratedBy": [
        {
            "Name": "Manual",
            "Author": "Nathan Molinier",
            "Date": "2023-07-14 13:43:10"
        }
    ]
}

@Nilser3
Copy link
Author

Nilser3 commented Feb 21, 2024

Update for dataset: marseille-3T-mp2rage

branch: nlm/update_gt_names
commit: afd8282a1ee8d468fd4ab8769e82d4ffdd7acb67

@Nilser3
Copy link
Author

Nilser3 commented Feb 21, 2024

Regarding the format for JSON sidecars, please check our intranet.

Thanks you @NathanMolinier , I have updated the JSON sidecars

@mguaypaq
Copy link
Member

For basel-mp2rage: some of the json sidecars were missing a comma, so I added a commit to fix this, and merged into master.

For marseille-3T-mp2rage: some of the json sidecars had a extra commas, so I added a commit to fix this, and merged into master.

For nih-ms-mp2rage: I don't see any branches to merge on the server. @Nilser3, did you push your changes to this repo?

@Nilser3
Copy link
Author

Nilser3 commented Feb 27, 2024

Oh, my bad,
Thanks you @mguaypaq

For nih-ms-mp2rage we don't have masks yet (so nothing to modify), but as soon as we have them I will send them to the git-annex respecting these new conventions.

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

No branches or pull requests

4 participants