Hi Mario, using the mitk::BaseGeometry::SetOrigin() method or the mitk::BaseGeometry::Translate() method seems be sufficient in your case. Please note that you most probably will be surprised in a first attempt to adjust a non-image object to an image object or vice versa "voxel-perfect", as there is a difference in the behavior of a geometry when it is attached to an image. Geometries are corner-based, while image geometries are center-based. [1]
Best, Stefan [1] http://docs.mitk.org/2015.05/GeometryOverviewPage.html ________________________________________ Von: Ceresa, Mario [mario.cer...@upf.edu] Gesendet: Donnerstag, 12. November 2015 18:36 An: MITK Betreff: [mitk-users] How to move an image? Dear MITK users, I have two nodes in my datastorage, a cube and an image (see Image1). Now, I'd like to align the center of the two objects so that they overlap. I tried the approach used in rigidregistration plugin, i.e. setting the translation matrix and then calling compose on the image's geometry: m_MovingNode->GetData()->GetGeometry()->Compose( translationMatrix ); but the image moves *inside* the bounding box and is eventually clipped at the border (see Image2) . It is like I'm moving the image in its own coordinate space, but I would like to move it in the global one instead. Is that possible? Thanks and regards, Mario ------------------------------------------------------------------------------ _______________________________________________ mitk-users mailing list mitk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mitk-users