<div>Hello Goodwin,</div>
<div>&nbsp;</div>
<div>&nbsp;&nbsp;&nbsp; thank you very much for your answer. I have used vtkDoubleArray instead of vtkFloatArray. Well, it doesn't crash anymore, but all I get is a black screen, there is nothing inside... no surface, no points, nothing. Am I doing something wrong? 
</div>
<div>Moreover, I think I have to assume that using vtkDoubleArray instead of vtkFloatArray will somewhat double my RAM usage during rendering, zooming, panning, whatever. Am I right? It will also affect the data, because originally the were simple Float8 (real(4) for those that know Fortran) and occupied much less memory than plain double numbers...
</div>
<div><br>Thank you very much for your suggestions.</div>
<div>&nbsp;</div>
<div>Andrea.<br>&nbsp;</div>
<div><span class="gmail_quote">On 3/23/06, <b class="gmail_sendername">Goodwin Lawlor</b> &lt;<a href="mailto:goodwin.lawlor@ucd.ie">goodwin.lawlor@ucd.ie</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi Andrea,<br><br>Andrea Gavana wrote:<br>&lt;snip&gt;<br>&gt;<br>&gt; This line says:<br>&gt;<br>&gt;&nbsp;&nbsp; for(int j=0; j &lt; this-&gt;NumberOfComponents; ++j)
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; this-&gt;Tuple[j] = static_cast&lt;double&gt;(t[j]);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&gt;&nbsp;&nbsp; return this-&gt;Tuple;<br>&gt;<br>&gt;<br>&gt; 2) Doing the 2-steps method:<br>&gt;<br>&gt; a) vtks = pyvtk.VtkData(pyvtk.StructuredGrid
([nx, ny, nz], MyMatrix))<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; vtks.tofile(&quot;MyFile.vtk&quot;, &quot;ascii&quot;)<br>&gt;<br>&gt; b) grid = vtk.vtkStructuredGridReader()<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; grid.SetFileName(&quot;MyFile.vtk&quot;)<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; surfaceMapper = 
vtk.vtkDataSetMapper()<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; surfaceMapper.SetInput(grid.GetOutput())<br>&gt;<br>&gt; works: VTK doesn't crash. But this method may become very slow if I<br>&gt; have, say, 200,000 cells or more (and I have them)...
<br>&gt;<br>&gt; Is there other things I could try?<br><br>Try your scripts using doubles (vtkDoubleArray) instead of floats...<br>worth a go. I see the exception is happening when the array value is<br>getting cast.<br><br>
hth<br><br>Goodwin<br><br>_______________________________________________<br>This is the private VTK discussion list.<br>Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ
</a><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br></blockquote></div><br><br clear="all"><br>-- <br>&quot;Imagination Is The Only Weapon In The War Against Reality.&quot;
<br><br><a href="http://xoomer.virgilio.it/infinity77/">http://xoomer.virgilio.it/infinity77/</a><br>