[vtkusers] vtkTransformPolydataFilter ... how to get the transformed results

Giancarlo Amati ilferraresebono at hotmail.it
Thu Mar 11 10:29:19 EST 2010



auch! I gottchya! :)

many thanks!
Date: Thu, 11 Mar 2010 08:51:11 -0500
Subject: Re: [vtkusers] vtkTransformPolydataFilter ... how to get the 	transformed results
From: daviddoria+vtk at gmail.com
To: ilferraresebono at hotmail.it
CC: vtkusers at vtk.org

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 		 	   		  
_________________________________________________________________
Più spazio per le tue esigenze. Hotmail va oltre i 5GB
http://www.windowslive.it/hotmail/SpazioDisponibile.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100311/125e2b20/attachment.htm>


More information about the vtkusers mailing list