[vtkusers] How to change data through Actor

Darshan Pai darshanpai at gmail.com
Tue Apr 6 11:01:08 EDT 2010


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 .

Regards
Darshan

On Tue, Apr 6, 2010 at 5:08 AM, Rakesh Patil <rakeshthp at in.com> wrote:

>
> Hi Darshan,
>
> That i have done.. But how do i set the updated data to the actor..??
>
> I mean, for example, I get the Unstructured grid from the actor as follows:
>
> vtkUnstructuredGrid *grid = vtkUnstructuredGrid::SafeCast(
> actor->GetMapper()->GetInput() );
>
> vtkPoints *pts = grid->GetPoints();
>
> // Assign new values to pts
>
> Next how do I connect this pts to actor "actor" so that the actor clears
> the old display and renders new display..??
>
> I mean after i set pts to grid, how do i set this grid to actor..? I tried
> doing this...
>
> actor->GetMapper()->GetInput()->ShallowCopy(grid);
> actor->Modified();
>
> But i found no change.. It is showing same old display..
>
> Any suggestions..??
>
> Thanks
>
> Regards
> Rakesh Patil
>
>
>
> ---------- Original message ----------
> From:Darshan Pai< darshanpai at gmail.com >
> Date: 04 Apr 10 01:22:24
> Subject: Re: [vtkusers] How to change data through Actor
> To: Rakesh Patil
>
> You can always get your data back from the actor using
> Actor->GetMapper()->GetInput(). Then you can change your data .
>
> On Sat, Apr 3, 2010 at 5:30 AM, Rakesh Patil <rakeshthp at in.com> wrote:
>
>> Hello Users,
>>
>> 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..??
>>
>> Changing means i want it to reflect back on the render window..
>>
>> Any idea how to do this..??
>>
>> Thanks
>> Rakesh Patil
>>
>>
>> Dear *vtkusers !* Get Yourself a cool, short *@in.com* Email ID now!<http://mail.in.com/mails/new_reg.php?utm_source=invite&utm_medium=outgoing>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100406/020d85d2/attachment.htm>


More information about the vtkusers mailing list