<div>Hello Goodwin,</div>
<div> </div>
<div> 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> </div>
<div>Andrea.<br> </div>
<div><span class="gmail_quote">On 3/23/06, <b class="gmail_sendername">Goodwin Lawlor</b> <<a href="mailto:goodwin.lawlor@ucd.ie">goodwin.lawlor@ucd.ie</a>> 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><snip><br>><br>> This line says:<br>><br>> for(int j=0; j < this->NumberOfComponents; ++j)
<br>> {<br>> this->Tuple[j] = static_cast<double>(t[j]);<br>> }<br>> return this->Tuple;<br>><br>><br>> 2) Doing the 2-steps method:<br>><br>> a) vtks = pyvtk.VtkData(pyvtk.StructuredGrid
([nx, ny, nz], MyMatrix))<br>> vtks.tofile("MyFile.vtk", "ascii")<br>><br>> b) grid = vtk.vtkStructuredGridReader()<br>> grid.SetFileName("MyFile.vtk")<br>> surfaceMapper =
vtk.vtkDataSetMapper()<br>> surfaceMapper.SetInput(grid.GetOutput())<br>><br>> works: VTK doesn't crash. But this method may become very slow if I<br>> have, say, 200,000 cells or more (and I have them)...
<br>><br>> 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>"Imagination Is The Only Weapon In The War Against Reality."
<br><br><a href="http://xoomer.virgilio.it/infinity77/">http://xoomer.virgilio.it/infinity77/</a><br>