On Tue, Aug 18, 2009 at 7:57 PM, Gael
Varoquaux<[email protected]> wrote:
> I don't know if it is in 3.1.0, but in recent versions of Mayavi, you can
> do:
>
> src = mlab.pipeline.array2d_source(data, figure=False)
> src.save_output('foo.vtk')
Very nice! This saves the data directly (using version 3.1.0), without
forcing me to create the XML by hand. That's much more than what I was
looking for. :)
> Could you give me a minimal example to reproduce the problem (code
> please, so that I can run it). It is quite hard to track down what that
> might be.
Sure! When I load the XML file that I posted in my first mail form
Maya Vi, it generates the following problems:
* When I add IsoSurface: Error prompt: "Cannot countour: No scalars
in input data!"
* When I add GridPlane: Error prompt: "The 'position' trait of a
GridPlane instance must be 0 <= a number <= -1, but a value of 0 <type
'int'> was specified."
* On the command line: ERROR: In
/build/buildd/vtk-5.0.4/IO/vtkXMLStructuredDataReader.cxx, line 80
vtkXMLImageDataReader (0xc6f4db0): ImageData element has no WholeExtent.
By error, I also tried with the same XML file, but corrupted. I.e.,
all spaces between data points were removed (see file below). Maya Vi
doesn't complain at all about corrupt data, when I import this.
I hope this helps!
Thank you very much for your interest and kind help!
Cheers,
Jerzy
<?xml version="1.0"?>
<VTKFile type="ImageData" version="0.1" byte_order="BigEndian">
<ImageData WholeExtent="0 7 0 5" Origin="0 0" Spacing="1 1">
<Piece Extent="0 7 0 5">
<PointData Scalars="vertexData">
<DataArray type="Float32" Name="scalarData" format="ascii">
1.583630593261.125120896760.798843640020.6263847444730.4960872297640.389619133684
-12.182051282051.325746606330.9789529914530.7243960316220.532223435793
4.132478632483.587669683262.78751.744934640521.153393665160.766131221719
-1-1-13.599145299152.413034188031.2274729547
4.20972222222-14.97692307692-1-11.85458144796
1.857434640522.958823529413.95-13.133173076921.32910236748
1.116068376072.1014957265-12.892445952741.51379195330.860490196078
0.7340799396681.134587358851.723246606331.249079939670.8383974358970.578347007351
</DataArray>
</PointData>
</Piece>
</ImageData>
</VTKFile>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
MayaVi-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mayavi-users