2

I am trying to stack a set of .TIFF images (obtained from x-ray micro-tomography) into a 3D volume using mayavi, but i am not able get it.

I tried using mayavi.mlab.imshow(), but it just shows one image over another by some distance apart. How to get an actual 3D volume?

from mayavi import mlab
import numpy as np
import cv2

path = "code\\NAC-IS-90D0"
mlab.clf()
arr = np.array([cv2.imread(path+str(i)+'.tif',0) for i in 
np.arange(15,20,1)])
j = 0
for i in range(5):
    obj = mlab.imshow(arr[i][:][:])
    obj.actor.position = [0, 0, j]      
    j+=5

This code only stacks one image file over another. Is there any way to visualize it as 3D volume, somehow making these images connected to one another??

Felipe Lema
  • 2,700
  • 12
  • 19
Sdw
  • 21
  • 1

0 Answers0