I'm having trouble importing an image read through VTK into the Mayavi pipeline. I would like to use the Mayavi volume rendering tools to render the VTK image, but I can't figure out how to feed the image into Mayavi. I am able to read the image without a problem:
from tvtk.api import tvtk
reader = tvtk.MetaImageReader()
reader.file_name = "image.mhd"
reader.update()
But now I can't figure out how to get the output from the reader into Mayavi. I'd like to use the data from the image as input to the Mayavi volume renderer, as in this example, but I haven't been able to get the raw data from the VTK image and pipe that through to Mayavi.