|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Utility functions for plane clipping calculations. More...
Functions | |
| static bool | LineIntersectZero (vtkPoints *points, int p1, int p2, double *bounds) |
| Internal helper method for intersection testing used only in CalculateClippedPlaneBounds(). More... | |
| static bool | CalculateClippedPlaneBounds (const BaseGeometry *boundingGeometry, const PlaneGeometry *planeGeometry, double *bounds) |
| Calculate the bounding box of the resliced image. More... | |
Utility functions for plane clipping calculations.
|
static |
Calculate the bounding box of the resliced image.
This is necessary for arbitrarily rotated planes in an image volume. A rotated plane (e.g. in swivel mode) will have a new bounding box, which needs to be calculated by clipping the bounding geometry edges against the plane.
| [in] | boundingGeometry | The geometry defining the volume bounding box. |
| [in] | planeGeometry | The plane geometry to clip against. |
| [out] | bounds | Array of 6 doubles receiving [xmin, xmax, ymin, ymax, zmin, zmax] in physical coordinates (mm), adjusted by plane spacing. |
Definition at line 87 of file mitkPlaneClipping.h.
References mitk::BaseGeometry::GetBoundingBox(), mitk::BaseGeometry::GetImageGeometry(), mitk::BaseGeometry::GetSpacing(), mitk::BaseGeometry::GetVtkTransform(), and LineIntersectZero().
|
static |
Internal helper method for intersection testing used only in CalculateClippedPlaneBounds().
Tests whether the line segment between two points crosses the z=0 plane, and if so, updates the bounds with the intersection coordinates.
| [in] | points | VTK point set containing the coordinates. |
| [in] | p1 | Index of the first point in the point set. |
| [in] | p2 | Index of the second point in the point set. |
| [in,out] | bounds | Array of 6 doubles [xmin, xmax, ymin, ymax, zmin, zmax] updated with the intersection point if found. |
Definition at line 39 of file mitkPlaneClipping.h.
Referenced by CalculateClippedPlaneBounds().