[vtkusers] vtkTransformPolyDataFilter and Scalars

Frank Conradie frank at qfin.net
Sat Oct 11 19:18:42 EDT 2003


Oops - please ignore this request for help...

It's obvious of course - I have to call Update before the scalars will be
passed through!

I think I might need some sleep...
Frank


----- Original Message -----
From: "Frank Conradie" <frank at qfin.net>
To: "vtkusers" <vtkusers at www.vtk.org>
Sent: Saturday, October 11, 2003 4:14 PM
Subject: [vtkusers] vtkTransformPolyDataFilter and Scalars


> Hi there
>
> In the vtk docs it says: "vtkTransformPolyDataFilter is a filter to
> transform point coordinates and associated point and cell normals and
> vectors. Other point and cell data is passed through the filter
unchanged."
>
> However, in my app, scalars that I set in a vtkPolyData's points are lost
> after filtering through a vtkTransformPolyDataFilter:
>
>          polydata = vtkPolyData()
>          polydata.SetPoints(points)
>          polydata.SetPolys(polys)
>          polydata.GetPointData().SetScalars(scalars)
>
>          transform_filter = vtkTransformPolyDataFilter()
>          transform = self._CalcCoordSysTransform()
>          transform_filter.SetTransform(transform)
>          transform_filter.SetInput(polydata)
>
>          # The following returns None
>          scalars =
transform_filter.GetOutput().GetPointData().GetScalars()
>
> Can anybody tell me why this is happening?
>
> Regards,
> Frank Conradie
>
> _______________________________________________
> 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://www.vtk.org/mailman/listinfo/vtkusers
>




More information about the vtkusers mailing list