[vtkusers] SetCutPlane not working in vtkImageResliceMapper

Debjit Ghosh dghosh at chla.usc.edu
Thu Mar 28 19:07:40 EDT 2013


I have changed the Euler->Rotation Matrix as follows but it still doesn't
work:

double theta = Deg_to_Rad(orientation[1]);
double phi = Deg_to_Rad(orientation[0]);
double psi = Deg_to_Rad(orientation[2]);

//Set the 1st col
matrix->SetElement(0, 0, cos(theta)*cos(phi)*cos(psi) - sin(phi)*sin(psi)); 
matrix->SetElement(0, 1, cos(theta)*cos(psi)*sin(phi) + cos(phi)*sin(psi));
matrix->SetElement(0, 2, -cos(psi)*sin(theta));

//Set the 2nd col
matrix->SetElement(1, 0, -cos(psi)*sin(phi) - cos(theta)*cos(phi)*sin(psi));
matrix->SetElement(1, 1, cos(phi)*cos(psi) - cos(theta)*sin(phi)*sin(psi));
matrix->SetElement(1, 2, sin(theta)*sin(psi));

//Set the 3rd col
matrix->SetElement(2, 0, cos(phi)*sin(theta));
matrix->SetElement(2, 1, sin(theta)*sin(phi));
matrix->SetElement(2, 2, cos(theta));



--
View this message in context: http://vtk.1045678.n5.nabble.com/SetCutPlane-not-working-in-vtkImageResliceMapper-tp5716627p5719710.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list