[vtkusers] Does vtkTransformPolyDataFilter affect original data?

Wenlong Wang scc.wwl at gmail.com
Thu Nov 10 11:25:11 EST 2011


Hi, David

Thank you for your reply. I have a followup question.

I do transformation on my polydata object "face" like this

*transform->Scale(2, 2, 2);
transformfilter->SetInput(polydata);
transformfilter->SetTransform(transform);
transformfilter->Update();
polydatamapper->SetInput(transformfilter->GetOutput());
actor->SetMapper->(polydatamapper);

/*------- Few other operatioins, no relative objects changed during
this-----------------*/

transform->Scale(3, 3, 3);
transformfilter->SetInput(polydata);
transformfilter->SetTransform(transform);
transformfilter->Update();*
*polydatamapper->SetInput(transformfilter->GetOutput());
actor->SetMapper->(polydatamapper);*

So, after two operations, I think the actor show on the screen should be
triple size of the original one. Am I right?

Thank you very much.

Long

2011/11/10 David Doria <daviddoria at gmail.com>

> On Thu, Nov 10, 2011 at 10:41 AM, Wenlong Wang <scc.wwl at gmail.com> wrote:
> > Dear all,
> >
> > I'm using vtkTransformPolydataFilter in my app. According to the
> documents,
> > the filter returns a new polydata object with different world coordinates
> > from the original one.
> >
> > My question is, is the filter changes the original data as well? And for
> the
> > result of the filter, is it being replaced if another transformation is
> > passed to the filter?
> >
> > Thank you very much.
> >
> > Long
>
> This filter should follow the standard VTK pipeline concepts. It
> should not modify the input data, and it if you call Update() a second
> time with a different transformation, the output would indeed be
> replaced. I'd suggest you make a small demo to convince yourself of
> these facts.
>
> David
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111110/74d768c2/attachment.htm>


More information about the vtkusers mailing list