The ClippedSurfaceBoundsCalculator needs to be enhanced so that the intersection points of 2 Geometry3D can be determined. Also the class should be renamed, because the class don't even use a surface!
Description
Related Objects
Event Timeline
Added attachement with a quick solution. If a Geometry3D is given as input instead of a PlaneGeometry, the intersection points of each slice are determined. This way is not very good because this is not needed to be done for all slices.
A better way could be to get the 8 corner points of the Geometry3D and initialize 8 planes with them which define the border of the geometry.
easier instead of taking all just take first and last slice. All corner points of geometry are included. Added another patch
another change: widened range of variable t (which is used to verify if there is an intersection between the line segment and the plane) by mitk::sqrteps
This is done because in some cases, the value for t is slightly over 1, but the correct intersection point has been determined.
Another change: In cases where there is only one slice the geometry3D has the same geometry as the plane geometry. In those cases we take the corner points of the geometry3D and check if they are on the plane. In some cases the distance of the point to the plane is a little bit bigger than mitk::eps. Changed so that the check controls whether the distance is smaller than mitk::sqrteps.
See attachment.
[6700aa]: Merge branch 'bug-9607-enhance-clippedsurfaceboundscalculator'
Merged commits:
2012-02-20 14:08:34 Danial Saruji [5a3ba4]
added test for 2 geometry3Ds
2012-02-17 14:35:31 Markus Engel [c546a9]
using correct variable, fixing rebase conflict
2011-10-07 09:40:23 Mathias Seitel [ec16d0]
Fix possible numerical issues in calculating intersection points
2011-10-05 16:03:18 Mathias Seitel [a9b567]
Extend calculator for surface bounds to account for 3D geometries...