Hello mitk-users,

I try to rotate some objects that are stored in the data storage but I can't 
get it to work.
Here is some code:

mitk::Surface::Pointer surface = dynamic_cast<mitk::Surface*>(node->GetData());
mitk::Point3D newCenter;
newCenter[0] = 0.0; newCenter[1] = 0.0; newCenter[2] = 0.0;
mitk::Vector3D rotationAxis;
rotationAxis[0] = 0.0; rotationAxis[1] = 20.0; rotationAxis[2] = 0.0;
mitk::RotationOperation *op = new mitk::RotationOperation(mitk::OpROTATE, 
newCenter, rotationAxis, 90.0);
surface->ExecuteOperation(op);
delete op;
surface->Update();
node->Modified();

mitk::RenderingManager::GetInstance()->RequestUpdateAll();

>From what I can tell (from what I read in older mitk_users questions) this 
>should rotate the object 90 degrees around the y-axis. I also tried to set a 
>vtkMatrix4x4 with SetIndexToWorldTransformByVtkMatrix with weird results.

Could someone point me in the direction to get to rotation working?

Thanks in advance.

-Nils



--
Nils Ritter
Research Associate | Working Group - TIMMS

Universität Leipzig | Faculty of Medicine
Innovation Center Computer Assisted Surgery (ICCAS)
Semmelweisstr. 14
D - 04103 Leipzig
Germany

phone  +49 (0) 341 97 - 12016
fax         +49 (0) 341 97 - 12009
[email protected]<mailto:[email protected]>
www.iccas.de/iccas/people/personal_pages/ritter.html<http://www.iccas.de/iccas/people/personal_pages/ritter.html>

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to