brainweb icon indicating copy to clipboard operation
brainweb copied to clipboard

brainweb "index" values do not match

Open KrisThielemans opened this issue 3 years ago • 0 comments

the imported label image has different values than expected, leading to aroundFat, dura and marrow being empty

>>> import sirf.STIR
>>> im=sirf.STIR.ImageData('brainweb_labels.nii')
>>> arr=im.as_array()
>>> numpy.unique(arr)
array([  0.,  16.,  32.,  48.,  64.,  80.,  96., 112., 128., 145., 161., 177.], dtype=float32)
>>> import brainweb
>>> brainweb.Act.aroundFat
144
>>> brainweb.Act.dura
160
>>> brainweb.Act.marrow
176

It seems safer to use the 8bit valued images, in which case we wouldn't have this problem

KrisThielemans avatar Mar 09 '22 18:03 KrisThielemans