I've got a tif file which contains a series of images. It is a 3D volume of pixels, produced by a CT-scan.
But after reading the image with simple-itk, there is only a single layer:
reader = sitk.ImageFileReader()
reader.SetFileName("FILENAME.tif")
img = reader.Execute()
img.GetDepth() # 0
arr = sitk.GetArrayFromImage(img)
arr.shape # (512, 512, 4)
How can I configure simple-itk to read the whole sequence of images from the tif file ?
Reading the docs for simple-itk shows how to read sequences of images, from sequences of files. That's not what I need, there is a single tif file for the 3D data.
I am able to read this with the tifffile module, it is able to see the correct number of slices and the plots look good, too. So the data itself seems to be valid.
I'm afraid since this is medical data, it's not possible for me to provide a sample. I'm just interested in the corresponding simple-itk documentation.