Hi Cristoph,
yes, that would be more clear, thanks. Could you also rename the argument
from "worldIndex" to "worldInMM" please? (Big relief that the documentation
is wrong, not the semantics. :-) )
Also, there is a WorldToDisplay and DisplayToPlane function and their
inverses, but no WorldToPlane and PlaneToWorld. These could be the
equivalents of removed Map functions, and I think they would be useful.
E.g. you could write one line instead of three because you would not need
to introduce an extra variable for the display coordinates. I like the new
functions, as they allow more concise coding usually, except this case.
And if I can suggest, the functions of the camera controller to set / get
the camera position could have simpler and matching name. So, instead of
"MoveCameraToPoint" / "GetCameraPositionOnPlane", it might be enough to
call them "SetCenter" and "GetCenter", simply. This would be similar to
mitk::BaseGeometry::GetCenter(), except that that one returns 3D position.
Cheers,
Miklos
On 29 June 2016 at 09:13, Kolb, Christoph <c.k...@dkfz-heidelberg.de> wrote:
> Hi Miklos,
>
> something does not fit, you are right. But I think that our Documentation
> of the DisplayToWorld and
> WorldToDisplay methods are wrong, because they translate from and to the
> world coordinates (with
> offset). Is everything clear if I just change "world index" to "world
> coordinate" in the
> documentation?
>
> Regards
> Christoph
>
> On Mon, 2016-06-27 at 15:34 +0200, Miklos Espak wrote:
> > Hi,
> >
> > I want to upgrade to MITK 2016.03.0 and I need to update our code that
> used the
> > mitk::DisplayGeometry functions to translate coordinates.
> >
> > From the documentation I see that the Map functions have been removed
> and the new WorldToDisplay
> > and DisplayToWorld functions work with continuous index, but the
> PlaneToDisplay and DisplayToPlane
> > functions work with millimetre positions.
> >
> > Is it intentional, or is it a mistake in the documentation? The geometry
> functions, e.g.
> > GetCenter(), GetOrigin() all returns mm position, so I would find it
> more consistent if the
> > WorldToDisplay and DisplayToWorld functions would handle mm arguments as
> well.
> >
> > Moreover, the naming of the WorldToIndex and IndexToWorld functions of
> mitk::BaseGeometry() also
> > suggest that "World" means millimetre, and "Index" means continuous
> index.
> >
> > In my opinion, if the documentation is right, the
> WorldToDisplay/DisplayToWorld functions should
> > be named IndexToDisplay/DisplayToIndex, respectively, but it would be
> even more useful to have
> > WorldToDisplay/DisplayToWorld functions that convert from/to mm
> coordinates.
> >
> > Shall I use renderer->GetCurrentWorldGeometry()->WorldToIndex(...) to
> get the continuous index
> > that I can pass to WorldToDisplay()? (And the other way around...)
> >
> > Cheers,
> > Miklos
> >
>
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users