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

Correcting header segmentation files #301

Closed
plbenveniste opened this issue Feb 16, 2024 · 7 comments
Closed

Correcting header segmentation files #301

plbenveniste opened this issue Feb 16, 2024 · 7 comments

Comments

@plbenveniste
Copy link

plbenveniste commented Feb 16, 2024

Opening this issue to reference the changes done on the following dataset:

  • Canproco
  • Basel (could I be given the writing rights, pls)
  • SCT-testing-large
  • Bavaria-quebec (Could I be given the writing rights pls)

For the above dataset, I fix the header of segmentation/label files (as mentionned in this issue: #1 ) using the file dataset_correction.py.

What this file does is the following for each label/segmentation which has been identified to be corrected:

  1. Change the orientation of the mask to match image orientation
  2. Replace the header of the mask by the header of the image

Tagging @mguaypaq for giving me the writing rights.

@plbenveniste
Copy link
Author

plbenveniste commented Feb 16, 2024

As detailed in this comment, the following modifications were done :

  • Canproco : 1511 files corrected (pushed to branch plb/correct_header_2): this includes SC seg, lesion seg and disc labels.
  • Basel : 272 files corrected (pushed on local branch plb/correct_header; waiting for pushing rights): this includes SC seg and lesion seg
  • Sct-testing-large: 1241 files corrected (pushed to branch plb/correct_header) : this only includes lesion segmentations
  • Bavaria-quebec : 213 files corrected (pushed to local branch plb/correct_header) : this only includes lesion segmentations

@mguaypaq mguaypaq self-assigned this Feb 19, 2024
@mguaypaq
Copy link
Member

Alright, I gave W permissions to pierrelouisbenveniste for basel-mp2rage and bavaria-quebec-spine-ms. You can re-assign this issue to me when it's time to review and/or merge into master.

@mguaypaq mguaypaq removed their assignment Feb 19, 2024
@plbenveniste
Copy link
Author

Everything was pushed to git annex.
Ready for review now ! 😃

@mguaypaq
Copy link
Member

In all four cases, it's only .nii.gz files that changed, so I only checked that they're properly git-annexed, then I merged into master:

  • basel-mp2rage
  • bavaria-quebec-spine-ms
  • canproco
  • sct-testing-large

@plbenveniste
Copy link
Author

plbenveniste commented Apr 4, 2024

Re-opening this issue because it seems to have caused some issues #305 (thanks @NathanMolinier for pointing this out).
I am therefore reviewing changes in each repo.
To do so, the strategy is to look at the segmentations and their respective images. If the image and the seg have the same dimension, but different resolution, then there is something problematic.

Here is what I will do :

  • for canproco : I will verify the entirety of the dataset and add a new commit if I need to correct some images
  • for sct-testing-large : same as canproco
  • for basel-mp2rage : weirdly, I cannot find the log in git. It seems that the modifications hasn't been passed through. Therefore, nothing needs to be done. @mguaypaq Do you have any idea why that is ?
  • for bavaria-quebec-spine-ms : if problematic, cancel the last commit

@plbenveniste plbenveniste reopened this Apr 4, 2024
@valosekj
Copy link
Member

valosekj commented Apr 4, 2024

To do so, the strategy is to look at the segmentations and their respective images. If the image and the seg have the same dimension, but different resolution, then there is something problematic.

This sounds good! Maybe you could also check for orientation (especially RL vs LR). Because at least for canproco, reorientation and resampling were done before T2w SC segmentation.

@plbenveniste
Copy link
Author

Regarding CanProCo, Nathan has done the modifications on the 93 problematic images. Thanks again @NathanMolinier.

Regarding sct-testing-large: no problems were identified -> No change required.

Regarding bavaria quebec : no problems were identified -> No change required

However, I do not recommend using the script used before, as it can cause problems when image and labels have not been ressampled to the same resolution. The problem was caused by the function sct_image ... -copy-header.

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

3 participants