Hi Li, Every displayable object in MITK (image, surface, pointset, etc.. ) has a geometry. You can access it by calling ->GetGeometry(). To change location, orientation and scaling of an object, you need to change that geometry.
Please have a look at the methods of mitk::Geometry3D http://docs.mitk.org/nightly-qt4/classmitk_1_1Geometry3D.html There you got methods like SetOrigin / GetOrigin: For Translation SetSpacing / GetSpacing: For scaling Unfortunately there is no "SetOrientation / GetOrientation" yet. If you want to change orientation, here are your methods SetIndexToWorldTransform / GetIndexToWorldTransform You can create a mitk::AffineTransform3D object, which contains everything: orientation, spacing and translation. It is basically a 3x3Matrix (for rotation and scaling) and a 3D vector (for translations). Create that object and set it with SetIndexToWorldTransform. Regards, Bastian -----Ursprüngliche Nachricht----- Von: Liu, Li [mailto:[email protected]] Gesendet: Dienstag, 24. Juli 2012 22:33 An: [email protected] Betreff: [mitk-users] How to orient objects in rendering window Hi All, I am using MITK to render two 3D objects in a single renderer and rendering window. The poly data (wavefront format) are loaded into data node and sent to mitk renderer. I am able to see they appear on the screen. Now, I want reorient and relocate one object against another one, but no idea to do that. Does anyone have a clue about it? I think I should set the objects' orientation and origin through the API provided by vtkActor. But I don't know how to access them. Thanks Li ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
