Thanks Stefan, for your mail. Indeed using the translate method and taking
into account the difference between center and corner oriented geometries
did the trick!

Best,

Mario

On 12 November 2015 at 19:45, Kislinskiy, Stefan <
s.kislins...@dkfz-heidelberg.de> wrote:

> 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
>
>


-- 
Mario Ceresa, PhD Ing.
SIMBioSys group
Universidad Pompeu Fabra
55.107 - DTIC Building
c/Roc Boronat, 138
08018 Barcelona
Web: http://simbiosys.upf.edu/
Ln:  <http://es.linkedin.com/in/>http://es.linkedin.com/in/marioceresa
Tel.: (+34) 93 542 13 48
Fax: (+34) 93 542 25 17
------------------------------------------------------------------------------
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to