I've just noticed now, in addition to rendering what looks to be a correct
Post by Christopher SnyderHi Gael,
Thanks for your helpful comments. That method didn't work directly, but I
was able to work around. For some reason, it would like me to report the
x-dimension last to get a coherent image.
#Image.shape=(34,74,74)
s=tvtk.ImageData(dimensions=(34,74,74), spacing=(1,1,1),origin=(0,0,0)
#Volume filter creates nonsense
s=tvtk.ImageData(dimensions=(74,74,34), spacing=(1,1,1),origin=(0,0,0)
#Looks reasonable, may be rotated?
s.point_data.scalars=Image.ravel()
For those reading along, I follow this with
mlab.pipeline.volume(s)
or
self.scene.mlab.pipeline.volume(s) #in an object oriented script
Do you know what's going on? This reminds me of how when I call
skimage.io.imread(image_file), the 'x' coordinate of Image is usually what
I would think of as the 'z' coordinate in other viewers like imagej.
Thanks,
Chris
On Wed, Jul 29, 2015 at 12:59 AM, Gael Varoquaux <
Post by Gael Varoquauxhttp://docs.enthought.com/mayavi/mayavi/data.html#imagedata
That should do it,
G
Post by Christopher SnyderHi there,
My usual routine involves
ix,iy,iz=np.indices(Image)
s=mlab.pipeline.scalar_field(spacing[0]*ix,spacing[1]*iy,spacing[2]*iz,Image)
Post by Christopher Snydermlab.pipeline(volume(s))
However, I am strapped for memory. Actually forming the indices
ix,iy,iz is
Post by Christopher Snyderputting a burden on my code. Is there some workaround, perhaps through
the
Post by Christopher Snyderdepths of vtk, that lets me specify this with just the scalar tuple
(1,1,2) ???
Post by Christopher SnyderThanks in anticipation,
Chris Snyder
------------------------------------------------------------------------------
Post by Christopher Snyder_______________________________________________
MayaVi-users mailing list
https://lists.sourceforge.net/lists/listinfo/mayavi-users
--
Gael Varoquaux
Researcher, INRIA Parietal
NeuroSpin/CEA Saclay , Bat 145, 91191 Gif-sur-Yvette France
Phone: ++ 33-1-69-08-79-68
http://gael-varoquaux.info
http://twitter.com/GaelVaroquaux