[vtkusers] Re: What's Wrong With This?!?

Andrea Gavana andrea.gavana at gmail.com
Fri Mar 24 06:27:05 EST 2006


Hello Goodwin,

    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?
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...

Thank you very much for your suggestions.

Andrea.

On 3/23/06, Goodwin Lawlor <goodwin.lawlor at ucd.ie> wrote:
>
> Hi Andrea,
>
> Andrea Gavana wrote:
> <snip>
> >
> > This line says:
> >
> >   for(int j=0; j < this->NumberOfComponents; ++j)
> >     {
> >     this->Tuple[j] = static_cast<double>(t[j]);
> >     }
> >   return this->Tuple;
> >
> >
> > 2) Doing the 2-steps method:
> >
> > a) vtks = pyvtk.VtkData(pyvtk.StructuredGrid([nx, ny, nz], MyMatrix))
> >     vtks.tofile("MyFile.vtk", "ascii")
> >
> > b) grid = vtk.vtkStructuredGridReader()
> >     grid.SetFileName("MyFile.vtk")
> >     surfaceMapper = vtk.vtkDataSetMapper()
> >     surfaceMapper.SetInput(grid.GetOutput())
> >
> > works: VTK doesn't crash. But this method may become very slow if I
> > have, say, 200,000 cells or more (and I have them)...
> >
> > Is there other things I could try?
>
> Try your scripts using doubles (vtkDoubleArray) instead of floats...
> worth a go. I see the exception is happening when the array value is
> getting cast.
>
> hth
>
> Goodwin
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



--
"Imagination Is The Only Weapon In The War Against Reality."

http://xoomer.virgilio.it/infinity77/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060324/495039f8/attachment.htm>


More information about the vtkusers mailing list