neheller / kits21

The official repository of the 2021 Kidney and Kidney Tumor Segmentation Challenge
MIT License
174 stars 47 forks source link

meta data in KiTS nii #57

Open nohalloween opened 1 year ago

nohalloween commented 1 year ago

Hello, recently I tried to add some clinical CTs from hosipitals into KiTS. However I noticed KiTS nii fomat shape be like (num_slices, height, width) , which can be described as (z, x ,y) and origin be like(0,0,0). But my CTs get (x, y ,z) shape and have none-zero origins. One way to solve this problem is that I transposed the dims, pixdims. But how to deal with the qform/sform , origin and srow_x/y/z in the metadata still confuse me.

neheller commented 1 year ago

Regarding the origins, as far as I know they are arbitrary as long as they match in the corresponding segmentation files.

Regarding the rest of the affine matrix in the Nifti format, you might find this reference helpful: https://nipy.org/nibabel/coordinate_systems.html

nohalloween commented 1 year ago

Thanks for your reply and it's very helpful!