[vtkusers] vtkTransformPolydataFilter ... how to get the transformed results
David Doria
daviddoria+vtk at gmail.com
Thu Mar 11 08:51:11 EST 2010
>
> Hello everybody,
>
> I have a vtkLineSource object L1. I apply a transformation with the
> vtkTransformPolyDataFilter tpd.
>
> so... as L1 is defined by 2 points, I have a transform TT which defines the
> TransformPolyDataFilter.
> So I need to retrieve those 2 points but after the transform, so I call:
>
> vtkSmartPointer<vtkLineSource> tmplineDir =
> vtkLineSource::SafeDownCast(tpd->GetOutput());
>
> but the pointer it returns is NULL, causing of course a crash of the
> software.
> what am I missing? :)
>
> Many thanks.
> Giancarlo
>
>
>
You can't cast a polydata as a lineSource, which you are trying to do with
vtkLineSource::SafeDownCast(tpd->GetOutput());
The output of tpd is a polydata, so you'd want to do
vtkSmartPointer<vtkPolyData> output = tpd->GetOutput();
~David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100311/407af717/attachment.htm>
More information about the vtkusers
mailing list