Page MenuHomePhabricator

mitkBoundingObject geometry is weird
Closed, WontfixPublic

Description

have a look at the function
mitkBoundingObject::FitGeometry(Geometry3D* a)
This function is for example used by the image cropper

One would think that writing "setGeometry(aGeometry3D)" is enough to make the bounding object fit the underlying image/geometry. But apparently the boundingObject can only be handled correctly, when it's indexBounds are from -1 to 1 in all axis (so it is only 2x2x2 Pixels big) and the spacing specifies it's actual bounds. This behavior needs to be analyzed and maybe changed.

Event Timeline

When bug is fixed, mitkBoundingObjectCutterTest should be enabled again.

At the line

size[i] = (aGeometry3D->GetExtentInMM(i)/2.0) - 1;

in mitkBoundingObject.cpp, what is the purpose of the -1? This will not work if the ExtentInMM / 2.0 is < 1.0. I have 4D data where it happens.

The bounding box doesn't display if tool compiled in release. In debug, there is an assertion in mitkGeometry3D. Removing the -1 made the bounding box to appear again.

Please uncomment the excluded test cases in the unit test and check if the unit test works.

Current release is finished. Reseting target milestone...

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.