Replace the creationg of "s" by instanciating an ImageData:

http://docs.enthought.com/mayavi/mayavi/data.html#imagedata

That should do it,

G

On Tue, Jul 28, 2015 at 06:02:07PM -0500, Christopher Snyder wrote:
> Hi 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)
> mlab.pipeline(volume(s))

> However, I am strapped for memory. Actually forming the indices ix,iy,iz is
> putting a burden on my code. Is there some workaround, perhaps through the
> depths of vtk, that lets me specify this with just the scalar tuple (1,1,2) 
> ???
>  

> Thanks in anticipation,
> Chris Snyder

> ------------------------------------------------------------------------------

> _______________________________________________
> MayaVi-users mailing list
> MayaVi-users@lists.sourceforge.net
> 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

------------------------------------------------------------------------------
_______________________________________________
MayaVi-users mailing list
MayaVi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mayavi-users

Reply via email to