I have come across this issue, where some .tif files that I read into SimpleITK load as “8-but unsigned int”, but others load as “vector of 8-bit unsigned int”.
I have been reading in the .tif images using sitk.ReadImage(img) function, and then casting to sitkFloat32 type. But when the images load initially as vector of 8-bit unsigned int, this casting function errors out.
I have attached two images - one that loads as a vector and other that loads normally as 8-bit unsigned int.
searchArea.tif (vector of 8-bit unsigned int):
searchArea0.tif (210.0 KB)
SUB0.tif (8-bit unsigned int):
SUB0.tif (10.6 KB)
I really am just unsure as to why there is a difference loading certain .tif images. I think it has to do with the RGB factor, but how can I change this to load only one channel?