<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
That's what I do:<br><br>void setDataset(vtkPolyData *pd) {<br> _dataset = vtkPolyData::SafeDownCast(pd);<br> _dataset->Update();<br> }<br><br>vtkSmartPointer<vtkActor> tmpAct = mv_actors.front();<br><br> if (tmpAct->GetMapper()->IsA("vtkPolyDataMapper")) {<br> vtkPolyDataMapper *tmpPD = vtkPolyDataMapper::SafeDownCast(tmpAct->GetMapper());<br> mp_windImg->setDataset(tmpPD->GetInput());<br> }<br><br>where setData is member function of mp_windImg.<br><br>GC.<br><br><hr id="stopSpelling">From: robbie.banks@gmail.com<br>To: darshanpai@gmail.com<br>Date: Tue, 22 Jun 2010 09:01:14 -0700<br>CC: vtkusers@vtk.org<br>Subject: Re: [vtkusers] recovering the Polydata<br><br><div>To get polydata you will have to safe downcast, I,e.</div><div><br></div><div>Vtkploydata::safedowncast(actor->GetMapper()->GetInput())</div><div><br></div><div>I think<br><br>On Jun 22, 2010, at 8:20 AM, Darshan Pai <<a href="mailto:darshanpai@gmail.com">darshanpai@gmail.com</a>> wrote:<br><br></div><div><span></span></div><blockquote><div>I am just wondering , maybe I am wrong, but if you delete the Input then Actor->GetMapper()->GetInput() should fail . Maybe that is your error here ?<br><br><div class="ecxgmail_quote">On Tue, Jun 22, 2010 at 10:59 AM, Jothy <span dir="ltr"><<a href="mailto:jothybasu@gmail.com"></a><a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a>></span> wrote:<br>
<blockquote class="ecxgmail_quote" style="padding-left: 1ex;"><div dir="ltr">Actor.Getmapper()->GetInput() work well for me.<br><br>Verify your input<br>
<font color="#888888"><br>Jothy<br><br></font><div class="ecxgmail_quote"><div><div></div><div class="h5">On Tue, Jun 22, 2010 at 3:44 PM, Giancarlo Amati <span dir="ltr"><<a href="mailto:ilferraresebono@hotmail.it"></a><a href="mailto:ilferraresebono@hotmail.it">ilferraresebono@hotmail.it</a>></span> wrote:<br>
</div></div><blockquote class="ecxgmail_quote" style="padding-left: 1ex;"><div><div></div><div class="h5">
<div>
Hello everybody,<br><br>I am trying to retrieve the polydata linked to a particular actor. I have my actor saved in a list<br>I used the "GetMapper" function to get the pointer to a vtkMapper * and the I used<br>
the function "IsA" to test if it is a vtkPolyDataMapper.<br>The IsA function returns true and I used<br><br>vtkPolyData *pd = mapper->GetInput();<br><br>to retrieve the polydata, but somehow I don't get anything reasonable and the number of vertices is 0.<br>
<br>is that the right way to retrieve a polydata from the pipeline?<br><br>Many thanks.<br>Giancarlo<br>                                            <br><hr>Un mondo di personalizzazioni per Messenger, PC e cellulare, <a href="http://www.pimpit.it/">scaricale gratis!</a></div>
<br></div></div><div class="ecxim">_______________________________________________<br>
Powered by <a href="http://www.kitware.com"></a><a href="http://www.kitware.com">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html"></a><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ"></a><a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers"></a><a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></div></blockquote></div><br></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com"></a><a href="http://www.kitware.com">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html"></a><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ"></a><a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers"></a><a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br>
</div></blockquote><blockquote><div><span>_______________________________________________</span><br><span>Powered by <a href="http://www.kitware.com"></a><a href="http://www.kitware.com">www.kitware.com</a></span><br><span></span><br><span>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html"></a><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a></span><br><span></span><br><span>Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ"></a><a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a></span><br><span></span><br><span>Follow this link to subscribe/unsubscribe:</span><br><span><a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a></span><br></div></blockquote>                                            <br /><hr />Un mondo di personalizzazioni per Messenger, PC e cellulare, <a href='http://www.pimpit.it/' target='_new'>scaricale gratis!</a></body>
</html>