Page MenuHomePhabricator

BugFix: When the input mitk::PointSet has no points, the computation of the bounding box is taking the 0,0,0 point
Closed, ResolvedPublic

Assigned To
None
Authored By
riccobene
Dec 22 2009, 10:33 AM
Referenced Files
F424: OnlyPointSet.patch
Jan 20 2010, 4:03 PM
F423: bug3209.diff
Jan 20 2010, 2:11 PM

Description

three patches

Event Timeline

Could you please describe the problem and the solution a bit more detailed?

The input data is a 3D+T mitk::PointSet and a 3D+T mitk::Image, both of 4 time steps.

  • mitk::PointSet: All time steps empty except time step 3 that contains 1 point at position (300,300,300).
  • mitk::Image: origin is (300,300,300) and size (10,10,10).

When the image and the pointset are rendered at the same time, the function mitk::DataStorage::ComputeBoundingGeometry3D( ) is called and it includes the point (0,0,0). So the bounding box is not correctly computed because it should start at (300,300,300) and finish at (310,310,310).

This is because there are empty time steps at the mitk::PointSet.

The patch is applied when computing the boundig box. Checks if the computed bounding box is 0,0,0,0,0,0, and if it is, this points are not taked into account.

@Tobi: can you please have a look?

mitk::PointSet is Mathias' baby...
Mathias, could you adapt BB creation? Works for mitk::Surface::CalculateBoundungBox(), maybe can be just done parallel?

The solution in the patch should work, too.
Anyhow, I would not suggest the BB = 0 checks in the geometries, because these are not the normal cases.

Patch for PointSet only

Okay, have fixed it already; reclaiming bug...

[SVN revision 21184]
FIX (#3209): Check if time steps contain data before considering them for BoundingBox calculation. (Empty time steps have a zero bounding box).