[vtkusers] problems with transformation loop

Marcel van Straten m.van.straten at solstitium.net
Mon Sep 9 02:54:57 EDT 2002


> I have an array of transformations, I want to apply successively to an
> actor.
First make one new transformation with the method vtkTransform::Concatenate
and use this new transform in your warp filter.


> //****NEW
> vtkTransformPolyDataFilter* warp =
> vtkTransformPolyDataFilter::New();
>    warp->SetInput(reader->GetOutput());
>    warp->SetTransform(mytpstArray[1]);
>
> //LOOP here
> for (int i=mystartframe; i<=myfinalframe-1; i++)
> {
>
> vtkTransformPolyDataFilter* warp =
> vtkTransformPolyDataFilter::New();
>    warp->SetInput(reader->GetOutput());
>    warp->SetTransform(mytpstArray[i]);
> //**I THINK THE ABOVE BIT IS WRONG
Creating a new warp filter IN the loop is wrong. Use this loop to
concatenate the transforms in mytpstArray

Good luck!
Marcel van Straten
PhD. student Medical Physics
AMC - Amsterdam




More information about the vtkusers mailing list