Hi again...
Still having (causing) trouble...So in trying to retrieve the data set from the
field object I get...
from enthought.mayavi import mlab
src = mlab.pipeline.open('star.vtk')
mlab.pipeline.probe_data(src, .5, .5, .5)
array([ 0.], dtype=float32)
mlab.pipeline.probe_data(src, -.5, -.5, -.5)
array([ 0.19322599], dtype=float32)
dataset = src.outputs[0]
dataset.points
Traceback (most recent call last):
File "<input>", line 1, in <module>
AttributeError: 'StructuredPoints' object has no attribute 'points'
Eventually will
points = dataset.points.to_array()
be what I need for volume_slicer.py instead of data = Array()?
Thanks a lot,
Roseanne
________________________________________
From: Gael Varoquaux [[email protected]]
Sent: Wednesday, May 04, 2011 12:07 PM
To: Cheng, Roseanne
Cc: [email protected]
Subject: Re: [MayaVi-users] volume_slicer.py
OK,
It seems that StructuredPoints is an old equivalaent of ImageData. I had
forgotten.
Don't apply Delaunay3D on it, it shouldn't be necessary, as it's already
a continuous field.
HTH,
G
PS: let's try to stay on the list.
On Wed, May 04, 2011 at 03:59:15PM +0000, Cheng, Roseanne wrote:
> >>> mlab.pipeline.get_vtk_src(src)
> [<enthought.tvtk.tvtk_classes.structured_points.StructuredPoints object at
> 0x788da70>]
> Is that what I do to get the object?
> ________________________________________
> From: Gael Varoquaux [[email protected]]
> Sent: Wednesday, May 04, 2011 11:45 AM
> To: Cheng, Roseanne
> Subject: Re: [MayaVi-users] volume_slicer.py
> On Wed, May 04, 2011 at 03:17:43PM +0000, Cheng, Roseanne wrote:
> > from enthought.mayavi import mlab
> > src = mlab.pipeline.open('file.vtk')
> > field = mlab.pipeline.delaunay3d(src)
> > but when I probe the data with
> > mlab.pipeline.probe_data(field, .5, .5, .5)
> > I get
> > ValueError: The object given has no points data of type scalars
> > Also with dataset = field.outputs[0] and dataset.points it returns nothing.
> > Am I doing this right? The header of my VTK file is
> What's the type of the dataset object?
> G
--
Gael Varoquaux
Research Fellow, INSERM
Associate researcher, INRIA
Laboratoire de Neuro-Imagerie Assistee par Ordinateur
NeuroSpin/CEA Saclay , Bat 145, 91191 Gif-sur-Yvette France
Phone: ++ 33-1-69-08-78-35
Mobile: ++ 33-6-28-25-64-62
http://gael-varoquaux.info
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
MayaVi-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mayavi-users