Page MenuHomePhabricator

Geometry2D Project function causes deprecated warning
Closed, ResolvedPublic

Description

The function

virtual bool mitk::Geometry2D::Project(const mitk::Point3D & atPt3d_mm, 
  const mitk::Vector3D &vec3d_mm, mitk::Vector3D &projectedVec3d_mm) const;

calls

virtual void mitk::Geometry3D::BackTransform(const mitk::Point3D& at, const mitk::Vector3D& in, mitk::Vector3D& out) const;

which causes a depreacted warning!

However there is no "non-depreacted" pendant function.

Project(vector,vector) should just work Project(point,point). However, in this version an additional point is given. This was useful for curved planes to determine at which location the vector is projected on the plane.

We need a Project function that accepts (vector,vector).

Event Timeline

New remote branch pushed: bug-13568-Geo2DProjectFunction

Have you talked about this with the people who deprecated the old version? I am not sure why this has been done. Would your version make sense for curved planes? If not, is there an alternative place to put the function (e.g. PlaneGeometry)?

We did some research. According to the history books of MITK the function

void mitk::Geometry3D::BackTransform(const mitk::Point3D &at, const mitk::Vector3D &in, mitk::Vector3D& out) const

exists since the early ages. we did a checkout from April 2005. However, the point parameter was not used even back then. At some point later, people found out that about this false point and commented it out. Some time later the function was called depreacted and a function without that paramter was made.

Our assumption is that this point parameter was created in the good will to support projection functions of curved planes sometime in the future. But until now this has not been implemented. ( I am actually not quite sure how exactly that project function would work for curved planes with an additional point as paramter).

Our function would not make sense for curved planes. But A LOT functions in Geometry2D do not make sense for curved planes. Curved Plane support is not really existing. If anyone wants to use curved planes, we need a big update there. But since nobody here is working with curved planes, i do not see a point in spending too much time for that at the moment.

(In reply to comment #3)

Our function would not make sense for curved planes. But A LOT functions in
Geometry2D do not make sense for curved planes. Curved Plane support is not
really existing. If anyone wants to use curved planes, we need a big update
there. But since nobody here is working with curved planes, i do not see a
point in spending too much time for that at the moment.

Ok, your change doesn't break anything, but do you know of the curved plane things Jasmin did? I don't know what happened to this "Coronary Planes" module but this also made use of the feature. So curved planes do exist (also in MITK) and do work (if you figure out how).

[632f83]: Merge branch 'bug-13568-Geo2DProjectFunction'

Merged commits:

2012-11-21 15:20:59 Bastian Graser [db680b]
Added new function for projection

New remote branch pushed: bug-13568-GeoProjectFuncNEW

[6ac612]: Merge branch 'bug-13568-GeoProjectFuncNEW'

Merged commits:

2012-11-28 15:01:38 Bastian Graser [3680e8]
COMP put comments around unused paramter


2012-11-28 14:55:19 Bastian Graser [3c3eae]
COMP Created new function project(vec,vec)