[vtkusers] Getting a float OR double array

David Doria daviddoria+vtk at gmail.com
Sun Aug 22 16:34:31 EDT 2010


On Sun, Aug 22, 2010 at 1:43 PM, Darshan Pai <darshanpai at gmail.com> wrote:

> I don't know why GetTuple is pure virtual in vtkDataArray . Though yeah I
> agree it should theoretically work the same way .
>
> Darshan
>


I saw that there is vtkDataArray::GetTuple(vtkIdType, double*) that is
implemented from vtkDataArrayTemplate:

  vtkDataArray* dataNormals =

 vtkDataArray::SafeDownCast(polyDataNormals->GetOutput()->GetPointData()->GetNormals());

  double dataN[3];
  dataNormals->GetTuple(0,dataN);

This seems to do exactly what we want.

Thanks,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100822/752bc9c9/attachment.htm>


More information about the vtkusers mailing list