Page MenuHomePhabricator

Inconsistent methods parameter in Geometry3D
Closed, WontfixPublic

Description

The IndexToWorld(from, to) method accepts only mitk::Point3D ( for both parameters from, to), whereas the GetPixelByIndex( pt ) accepts only mitk::Index3D as parameter ( it has accepted mitk::Point3D until bugfix for T4692).

All transforms ( IndexToWorld, WorldToIndex ) should either take the respective types as parameters, or allow both mitk::Point3D and mitk::Index3D.

Event Timeline

Taking over.

Andreas has our changes so far and coordinates changes on the mitkGeometry3D

wald added a subscriber: wald.May 18 2011, 4:27 PM

Andreas, what is the status of this bug? Can you please comment or commit your changes?

I have done nothing for this bug yet. There were more urgent bugs to work on. If you want to assign this bug to someone else you can do that. I think I won't be able to fix this before Juli.

nolden added a subscriber: nolden.Jul 27 2011, 2:40 PM

Resetting all bugs without active assignee flag to "CONFIRMED". Change status to IN_PROGRESS if you are working on it.

ivo added a subscriber: ivo.Sep 5 2011, 4:39 PM

(In reply to comment #0)

The IndexToWorld(from, to) method accepts only mitk::Point3D ( for both
parameters from, to), whereas the GetPixelByIndex( pt ) accepts only
mitk::Index3D as parameter ( it has accepted mitk::Point3D until bugfix for Bug
#4692).
All transforms ( IndexToWorld, WorldToIndex ) should either take the respective
types as parameters, or allow both mitk::Point3D and mitk::Index3D.

We have to be careful, because there are two types of "index" coordinates: mitk::Index3D is integer, whereas mitk::Point3D (misused as an index) is a floating point type. ITK is more clean by using yet anouther type for the latter case: itk::ContinuousIndex. It would be great to follow this, but not much fun (possibly thousands of changes).

See also the following statement in the documentation of mitk::Geometry3D
(http://docs.mitk.org/nightly-qt4/classmitk_1_1Geometry3D.html#details):

"In case you need integer index coordinates, provide an mitk::Index3D (or itk::Index) as target variable to WorldToIndex, otherwise you will get a continuous index (floating point values)."

ivo added a comment.Sep 5 2011, 5:11 PM

(In reply to comment #6)

(In reply to comment #0)
[...]
See also the following statement in the documentation of mitk::Geometry3D
(http://docs.mitk.org/nightly-qt4/classmitk_1_1Geometry3D.html#details):
"In case you need integer index coordinates, provide an mitk::Index3D (or
itk::Index) as target variable to WorldToIndex, otherwise you will get a
continuous index (floating point values)."

See also: http://docs.mitk.org/nightly-qt4/GeometryOverviewPage.html

kislinsk closed this task as Wontfix.Jun 20 2018, 6:27 AM
kislinsk claimed this task.
kislinsk added a subscriber: kislinsk.
This task was automatically closed because it wasn't updated at least since July 2016 (over 2 years). Please re-open this task if you think that it is still relevant. This most probably means that you will resolve it.