Closed Rajalakshmi-Palaniappan closed 2 years ago
You need to create a 3D stack out of them first, like x = np.stack([tifffile.imread(f) for f in files])
.
Hey! Thanks for replying. I tried creating a stack, but even then it's showing up only the slices. I attached the code and the output in viewer along with this showing one of the slices in the stack
img = np.stack([tifffile.imread("/home/rajalakshmi/Segmentation/mv_heart/tiff/%s" %f) for f in sorted(os.listdir(files))]) volshow(img)
Please find the image here: https://i.imgur.com/ZifgmZv.png
Looks like there is a extra dimension somewhere, what is img.shape
? Maybe img = np.squeeze(img)
already fixes this.
Hi,
The img.shape was (1502, 2688, 2744, 3). Even after performing np.squeeze also I get the same output (as slices)
spimagine only supports single channel images, and the order has to be (T,ZY,X)
, so your last dimension will be interpreted as x dimension. So either:
1) volhow(img[...,0])
to only show a single channel, or
2) volshow(np.moveaxis(img,-1,0))
Hi,
I just needed a single channel and so this worked. Thank you very much for your support!
Hi, My data is a folder of tiff files (microCT of Heart-1500slices). I'm able to load the tiff folder in spimagine and view the individual slices. May I know how to the render the 3D view from these 2D slices.