[vtkusers] urgent help needed !

Leila Baghdadi baghdadi at sickkids.ca
Mon Jul 19 17:17:57 EDT 2004


Pallavi,

I am not an expert in this but check page 48 of vtk User's guide,

The order of rotation is important 
i.e rotate x -> rotate y != rotate y -> rotate x 
according to the book the order of your operations is not correct,

HTH

Leila

On Mon, 2004-07-19 at 14:32, Pallavi Joshi wrote:
>         Hi,
>         I am trying to deform a mesh but not able to get right
>         results. Here is the code I am using:
>         vtkTransform *t1 = vtkTransform::New();
>             t1-> Translate(0.0170560,    3.7819819,    7.8705144);
>             t1-> RotateX(10.5782137); //In degrees?
>             t1-> RotateY(0.0050671);
>             t1-> RotateZ(-0.1541998);
>             t1-> Scale(0.9086602,    0.9558412,    0.9022964);
>         vtkTransformPolyDataFilter *finalmesh1 =
>         vtkTransformPolyDataFilter::New();
>             finalmesh1->SetInput ( mesh->GetOutput() );
>             finalmesh1->SetTransform ( t1 );
>          
>         Please let me know what is wrong in this. I am not able to
>         figure out why I can't get right results with this. 
>         Please help......
>         --Pallavi
>          
>          
>         -------------------------------------------------------------------
>         Pallavi Joshi
>         Graduate Student
>         Medical Image Processing Lab
>         Vanderbilt University
>         
> 
> 
> ______________________________________________________________________
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers




More information about the vtkusers mailing list