[vtkusers] vtkPoints
John Biddiscombe
jbiddiscombe at skippingmouse.co.uk
Tue Nov 19 04:53:21 EST 2002
It's a known bug. Do SetDataTypeToDouble and then set the components back to
3, I think it may have been fixed in recent releases (let me know if you're
using a recent cvs snapshot)
JB
----- Original Message -----
From: "David Thompson" <dcthomp at sandia.gov>
To: "Kitware VTK List" <vtkusers at public.kitware.com>
Sent: Tuesday, November 19, 2002 12:51 AM
Subject: [vtkusers] vtkPoints
> Hi,
> When I call vtkPoints::SetDataTypeToDouble(), it
> appears to be changing the NumberOfComponents of the underlying
> DataArray to 1 (from 3). Is this intentional? It seems kind of
> counterintuitive. Here's an example using vtkpython (same problem
> in C++, too):
>
> from vtk.required import *
> pt = vtkPoints()
> pt.SetDataTypeToDouble()
> pt.InsertNextPoint( 1., 0.3, 0. )
> pt.InsertNextPoint( .2, 0.3, 0. )
> pt.GetPoint(0)
> # You should get garbage for the y & z coordinates here
>
> print "Coords are %d-D" % pt.GetData().GetNumberOfComponents()
> # Prints "Coords are 1-D"
>
> Everything works as expected without the call to SetDataTypeToDouble.
> It seems to me that vtkPoints::SetDataType() should call
> this->Data->SetNumberOfComponents(3);
> and perhaps reset the bounds at some, err, point...
>
> David
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list