<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
<br>auch! I gottchya! :)<br><br>many thanks!<br><hr id="stopSpelling">Date: Thu, 11 Mar 2010 08:51:11 -0500<br>Subject: Re: [vtkusers] vtkTransformPolydataFilter ... how to get the         transformed results<br>From: daviddoria+vtk@gmail.com<br>To: ilferraresebono@hotmail.it<br>CC: vtkusers@vtk.org<br><br><div class="ecxgmail_quote"><blockquote class="ecxgmail_quote" style="border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div><div class="h5"><div><p style="margin-bottom: 12pt;"><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;">Hello everybody,<br>
<br>
I have a vtkLineSource object L1. I apply a transformation with the
vtkTransformPolyDataFilter tpd.<br>
<br>
so... as L1 is defined by 2 points, I have a transform TT which defines the
TransformPolyDataFilter.<br>
So I need to retrieve those 2 points but after the transform, so I call:<br>
<br>
vtkSmartPointer<vtkLineSource> tmplineDir =
vtkLineSource::SafeDownCast(tpd->GetOutput());<br>
<br>
but the pointer it returns is NULL, causing of course a crash of the software.<br>
what am I missing? :)<br>
<br>
Many thanks.<br>
Giancarlo<br>
</span></font></p><p style="margin-bottom: 12pt;"><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;"><br></span></font></p></div></div></div></div></blockquote><div><br></div><div>You can't cast a polydata as a lineSource, which you are trying to do with </div>
<div><span class="ecxApple-style-span" style="font-family: Verdana; font-size: 16px;">vtkLineSource::SafeDownCast(tpd->GetOutput());</span></div><div><span class="ecxApple-style-span" style="font-family: Verdana; font-size: 16px;"><br>
</span></div><div><span class="ecxApple-style-span" style="font-family: Verdana; font-size: 16px;">The output of tpd is a polydata, so you'd want to do </span></div><div><span class="ecxApple-style-span" style="font-family: Verdana; font-size: 16px;"><span class="ecxApple-style-span" style="font-size: 16px;">vtkSmartPointer<vtkPolyData> output = tpd->GetOutput();</span></span></div>
</div><br><div>~David</div>                                            <br /><hr />Lo spazio su Hotmail aumente con le tue esigenze... <a href='http://www.windowslive.it/hotmail/SpazioDisponibile.aspx' target='_new'>Vai oltre i 5GB</a></body>
</html>