<br>Hi Darshan,<br><br>I hope you remember few days back i had posted the remove cell filter class which i had written.<br>when i use this filter, i get a new unstructured grid as the output from this filter(new grid which has one cell less<br>compared to the previous grid).. <br><br>So instead of creating a new mapper and actor for this grid, i need to insert this grid into the same old actor..<br>I mean update the grid existing in the actor in question.<br><br>so, <br><br>vtkUnstructuredGrid *uGrid = vtkUnstructuredGrid::SafeDownCast(sel_actor->GetMapper()->GetInput());<br><br>MyRemoveFilter *rmfil = MyRemoveFilter::New();<br>rmfil->setInput(uGrid);<br>rmfil->RemoveCell(2);<br>rmfil->Update();<br><br>vtkUnstructuredGrid *gd = rmfil->GetOutput();<br><br>sel_actor->GetMapper()->GetInput()->ShallowCopy(gd);<br>sel_actor->Modified();<br><br>pRenderer->Refresh();<br><br>So will this block of code work..??<br><br>Thanks<br><br>Regards<br>Rakesh
Patil<br><br><blockquote><br>---------- Original message ----------<br>From:Darshan Pai< darshanpai@gmail.com ><br>Date: 06 Apr 10 20:31:08<br>Subject: Re: [vtkusers] How to change data through Actor<br>To: Rakesh Patil <rakeshthp@in.com><br><br>Actually you are not supposed to do the ShallowCopy unless you are creating a entirely new grid. Can you post your code here so can get a idea what exactly are you doing .<br><br>Regards<br>Darshan<br><br><div class="gmail_quote">
On Tue, Apr 6, 2010 at 5:08 AM, Rakesh Patil <span dir="ltr"><<a target=\"_blank\" target="\"_blank\"" href="mailto:rakeshthp@in.com">rakeshthp@in.com</a>></span> wrote:<br><font color="#000000"></font><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im"><font color="#000000"> <a></a><br>Hi Darshan,<br><br>That i have done.. But how do i set the updated data
to the actor..??<br><br>I mean, for example, I get the Unstructured grid
from the actor as follows:<br><br>vtkUnstructuredGrid *grid =
vtkUnstructuredGrid::SafeCast( actor->GetMapper()->GetInput() );<br><br>vtkPoints
*pts = grid->GetPoints();<br><br>// Assign new values to pts<br><br>Next
how do I connect this pts to actor "actor" so that the actor clears the
old display and renders new display..??<br><br>I mean after i set pts
to grid, how do i set this grid to actor..? I tried doing this...<br><br>actor->GetMapper()->GetInput()->ShallowCopy(grid);<br>actor->Modified();<br><br>But
i found no change.. It is showing same old display.. <br><br>Any
suggestions..??<br><br>Thanks<br><br>Regards<br>Rakesh Patil<br><font color="#000000"><br></font><br></font></div><font color="#000000"><font color="#000000"></font></font><blockquote><div class="im"><font color="#000000"><font color="#000000"><br>---------- Original message ----------<br>From:Darshan Pai< <a target=\"_blank\" href="mailto:darshanpai@gmail.com" target="\"_blank\"">darshanpai@gmail.com</a> ><br>
Date: 04 Apr 10 01:22:24<br></font></font></div><div class="im"><font color="#000000"><font color="#000000">Subject: Re: [vtkusers] How to change data through Actor<br>To: Rakesh Patil <br><br>You can always get your data back from the actor using Actor->GetMapper()->GetInput(). Then you can change your data .<br>
<br></font></font><div class="gmail_quote"><font color="#000000"><font color="#000000">On Sat, Apr 3, 2010 at 5:30 AM, Rakesh Patil <span dir="ltr"><<a target=\"_blank\" href="mailto:rakeshthp@in.com" target="\"_blank\"">rakeshthp@in.com</a>></span> wrote:<br>
<font color="#000000"></font><font color="#000000"></font></font></font><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><font color="#000000"><font color="#000000"><font color="#000000"><font color="#000000">Hello Users,<br><br>I came to know that it is possible to change the data of a grid using actors. for example, I have already displayed a polyline. Now using this polyline actor, is it possible to change the number of points in this polyline..?? <br>
<br>Changing means i want it to reflect back on the render window..<br><br>Any idea how to do this..??<br><br>Thanks<br>Rakesh Patil<br><br><br></font></font></font></font><div style="border-top: 1px dashed rgb(204, 204, 204); border-bottom: 1px dashed rgb(204, 204, 204); padding: 5px;">
<font color="#000000"><font color="#000000"><font color="#000000"><font color="#000000"><a target=\"_blank\" href="http://mail.in.com/mails/new_reg.php?utm_source=invite&utm_medium=outgoing" style="font: 13px arial; color: rgb(30, 86, 161); text-decoration: none;" target="\"_blank\"">Dear <b>vtkusers !</b> Get Yourself a cool, short <b>@in.com</b> Email ID now!</a></font></font></font></font></div>
<font color="#000000"><font color="#000000"><font color="#000000"><font color="#000000"><br>_______________________________________________<br>
Powered by <a target=\"_blank\" href="http://www.kitware.com" target="\"_blank\"">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a target=\"_blank\" href="http://www.kitware.com/opensource/opensource.html" target="\"_blank\"">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a target=\"_blank\" href="http://www.vtk.org/Wiki/VTK_FAQ" target="\"_blank\"">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a target=\"_blank\" href="http://www.vtk.org/mailman/listinfo/vtkusers" target="\"_blank\"">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></font></font></font></font></blockquote></div><font color="#000000"><font color="#000000"><br>
</font></font></div><font color="#000000"><font color="#000000"></font></font></blockquote><font color="#000000">
</font></blockquote></div><br>
</rakeshthp@in.com></blockquote>