Open jcohenadad opened 1 year ago
Where do we store the discs numbers ?
Where do we store the discs numbers ?
In a file called *_seg_labeled_discs.nii.gz
, see SCT tutorial.
Actually, I was already working with this file, but I figured out the disc number is stored as an intensity parameter in the numpy array.
nifti_labeled_discs = nib.load(FILE_REFERENCE)
print(nifti_labeled_discs.data[np.nonzero(nifti_labeled_discs.data)])
out --> array([10, 9, 8, 7, 6, 5, 3, 2, 1, 4], dtype=uint8)
ah! yes indeed, sorry i didn't get your question in the first place
example: