Page MenuHomePhabricator

Develop a plan for replacing calls to Geometry3D::WorldToIndex(point, vec, vec)
Closed, ResolvedPublic

Description

Since the changes in T4455, loading a simple DICOM image issues tons of messages of type

"Call of the deprecated function Geometry3D::IndexToWorld(point, vec, vec). Use Geometry3D::IndexToWorld(vec, vec) instead!"

This is spamming the commandline, potentially removes attention from more important messages, and should be removed. A first step would be to identify all callers of the function and file bugs for each.

Event Timeline

What is the status of this bug? Makes the application feel real slow!!!

Change is ok. Just next time, please try to make the wiki page a little more readable by using wiki markup and do not change the headlines of the change request template but comment on each aspect.

Plus, you could answer questions in Bugzilla. You have written private emails but nobody (e.g. Markus) is able to know that something is happening here.

[bfac38]: Merge branch 'bug-7619-replace-world-to-index-calls'

Merged commits:

2011-04-06 17:00:34 Andreas Fetzer [7494fd]
In the classes

  • Geometry3D
  • PlaneGeometry3D
  • AbstractTransformGeometry

the functions "indexToWorld" and "worldToIndex" had an unused parameter. We declared them as deprecated and created a new version of these functions without the unused parameter.
Deprecated function calls "indexToWorld" and "worldToIndex" with the respective non-deprecated function call.

We also replaced all calls of the deprecated functions with the new ones. Affected classes are:

mitkSlicedGeometry3D, mitkImageMapperGL2D, mitkSurfaceDeformationInteractor, mitkAffineInteractor, mitkSlicesSwiveller, QmitkSegmentationPostProcessing

(In reply to comment #4)

[bfac38]: Merge branch 'bug-7619-replace-world-to-index-calls'

Merged commits:

2011-04-06 17:00:34 Andreas Fetzer [7494fd]
In the classes

  • Geometry3D
  • PlaneGeometry3D
  • AbstractTransformGeometry

the functions "indexToWorld" and "worldToIndex" had an unused parameter. We
declared them as deprecated and created a new version of these functions
without the unused parameter.
Deprecated function calls "indexToWorld" and "worldToIndex" with the respective
non-deprecated function call.

When the deprecated function is called, a warning output is placed to the console.

An email has been sent to the mitk-users list:

Hi mitk-users,

In the classes Geometry3D, PlaneGeometry3D and AbstractTransformGeometry some functions have been marked as deprecated:

void Geometry3D::WorldToIndex(const mitk::Point3D& atPt3d_mm, const mitk::Vector3D& vec_mm, mitk::Vector3D& vec_units) const;

void Geometry3D::IndexToWorld(const mitk::Point3D& atPt3d_units, const mitk::Vector3D& vec_units, mitk::Vector3D& vec_mm) const;

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

virtual void AbstractTransformGeometry::WorldToIndex(const mitk::Point2D &atPt2d_mm, const mitk::Vector2D &vec_mm, mitk::Vector2D &vec_units) const;

virtual void AbstractTransformGeometry::IndexToWorld(const mitk::Point2D &atPt2d_units, const mitk::Vector2D &vec_units, mitk::Vector2D &vec_mm) const;

virtual void PlaneGeometry::IndexToWorld(const mitk::Point2D &atPt2d_untis, const mitk::Vector2D &vec_units, mitk::Vector2D &vec_mm) const;

virtual void PlaneGeometry::WorldToIndex(const mitk::Point2D &atPt2d_mm, const mitk::Vector2D &vec_mm, mitk::Vector2D &vec_units) const;

These functions had an unused parameter. We declared them as deprecated and created a new version of these functions without the unused parameter. The deprecated functions call their non-deprecated pendant and give out a deprecated-warning on the console

If you are using the deprecated function, please switch to the non-deprecated pendant function.

(For more information, please see T7619 in mitk bugzilla http://bugs.mitk.org/show_bug.cgi?id=7619)

Regards,

Fetzer, Graser