[vtkusers] Problem rotating vtkImageSlice

Ang ysa0829 at gmail.com
Tue Apr 18 03:50:47 EDT 2017


Hi David,

I would like to flip around X axis for vtkImageSlice (not original pixel
data ,just flip actor),below is my code.

//***********************************************//
double *tranlate = imageSlice->GetCenter(); 

vtkTransform *trans = vtkTransform::New();
trans->PostMultiply();

trans->Translate(-tranlate[0], -tranlate[1], -tranlate[2]);
trans->RotateY(180);
trans->Translate(tranlate[0], tranlate[1], tranlate[2]);

imageSlice->PokeMatrix(trans->GetMatrix());
//***********************************************//

As your mentioned in the thread, I cant rotate the vtkImageSlice by using
vtkMatrix so I got wrong result.

Would you have some suggestion to  flip around X axis for vtkImageSlice?





--
View this message in context: http://vtk.1045678.n5.nabble.com/Re-Problem-rotating-vtkImageSlice-tp5740005p5742906.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list