neuropoly / data-management

Repo that deals with datalad aspects for internal use
4 stars 0 forks source link

Correcting header segmentation files #301

Closed plbenveniste closed 3 months ago

plbenveniste commented 7 months ago

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

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 commented 7 months ago

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

mguaypaq commented 7 months ago

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.

plbenveniste commented 7 months ago

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

mguaypaq commented 7 months ago

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:

plbenveniste commented 5 months ago

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 :

valosekj commented 5 months ago

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 commented 5 months ago

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.