[vtkusers] Does vtkTransformPolyDataFilter affect original data?
David Doria
daviddoria at gmail.com
Thu Nov 10 11:27:52 EST 2011
On Thu, Nov 10, 2011 at 11:25 AM, Wenlong Wang <scc.wwl at gmail.com> wrote:
> 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
Yes, that'd be my guess.
Also, the preferred method (though I don't believe it does anything
different) is:
transformfilter->SetInputConnection(polydata->GetProducerPort());
(versus transformfilter->SetInput(polydata); )
and
polydatamapper->SetInputConnection(transformfilter->GetOutputPort());
(versus polydatamapper->SetInput(transformfilter->GetOutput());)
David
More information about the vtkusers
mailing list