spinalcordtoolbox / PAM50

https://github.com/neuropoly/spinalcordtoolbox
2 stars 1 forks source link

Resample all histological images to 0.2x0.2x0.5 resolution #9

Closed valosekj closed 1 year ago

valosekj commented 1 year ago

Description

This PR updates histological atlas to 0.2x0.2x0.5 resolution.

Note: The real resolution is 0.199074x0.198795x0.5 due to rounding. Context: https://github.com/spinalcordtoolbox/spinalcordtoolbox/issues/4077

Resulting dim and pixdim for all histological images:

valosek@macbook-pro:~/code/PAM50/histology$ for file in *.gz;do echo ${file};sct_image -i ${file} -header | grep dim | head -3;echo "";done
PAM50_200um_AVF.nii.gz
dim     [3, 108, 83, 205, 1, 1, 1, 1]
pixdim      [-1.0, 0.199074, 0.198795, 0.5, 0.0, 0.0, 0.0, 0.0]
phase_dim   0

PAM50_200um_Eccentricity.nii.gz
dim     [3, 108, 83, 205, 1, 1, 1, 1]
pixdim      [-1.0, 0.199074, 0.198795, 0.5, 0.0, 0.0, 0.0, 0.0]
phase_dim   0

PAM50_200um_EquivDiameter.nii.gz
dim     [3, 108, 83, 205, 1, 1, 1, 1]
pixdim      [-1.0, 0.199074, 0.198795, 0.5, 0.0, 0.0, 0.0, 0.0]
phase_dim   0

PAM50_200um_EquivDiameter14.nii.gz
dim     [3, 108, 83, 205, 1, 1, 1, 1]
pixdim      [-1.0, 0.199074, 0.198795, 0.5, 0.0, 0.0, 0.0, 0.0]
phase_dim   0

PAM50_200um_EquivDiameter48.nii.gz
dim     [3, 108, 83, 205, 1, 1, 1, 1]
pixdim      [-1.0, 0.199074, 0.198795, 0.5, 0.0, 0.0, 0.0, 0.0]
phase_dim   0

PAM50_200um_MVF.nii.gz
dim     [3, 108, 83, 205, 1, 1, 1, 1]
pixdim      [-1.0, 0.199074, 0.198795, 0.5, 0.0, 0.0, 0.0, 0.0]
phase_dim   0

PAM50_200um_Naxons.nii.gz
dim     [3, 108, 83, 205, 1, 1, 1, 1]
pixdim      [-1.0, 0.199074, 0.198795, 0.5, 0.0, 0.0, 0.0, 0.0]
phase_dim   0

Note that a modified version of resampling.py was used to set img.header["pixdim"][4:] = 0; context here.

The size is 31M, which is under the 50M threshold proposed by Julien in #7.

valosek@macbook-pro:~/code/PAM50/histology$ du -h
 31M    .

Related issues/PRs

Fixes #7 Fixes https://github.com/spinalcordtoolbox/PAM50/issues/8