MCPcopy Create free account
hub / github.com/MITK/MITK / IsAbove

Method IsAbove

Modules/Core/src/DataManagement/mitkPlaneGeometry.cpp:580–590  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

578 ScalarType PlaneGeometry::DistanceFromPlane(const Point3D &pt3d_mm) const { return fabs(SignedDistance(pt3d_mm)); }
579 ScalarType PlaneGeometry::SignedDistance(const Point3D &pt3d_mm) const { return SignedDistanceFromPlane(pt3d_mm); }
580 bool PlaneGeometry::IsAbove(const Point3D &pt3d_mm, bool considerBoundingBox) const
581 {
582 if (considerBoundingBox)
583 {
584 Point3D pt3d_units;
585 BaseGeometry::WorldToIndex(pt3d_mm, pt3d_units);
586 return (pt3d_units[2] > this->GetBoundingBox()->GetBounds()[4]);
587 }
588 else
589 return SignedDistanceFromPlane(pt3d_mm) > 0;
590 }
591
592 bool PlaneGeometry::IntersectionLine(const PlaneGeometry* plane, Line3D& crossline) const
593 {

Callers 1

Calls 4

WorldToIndexFunction · 0.85
SignedDistanceFromPlaneFunction · 0.85
GetBoundsMethod · 0.45
GetBoundingBoxMethod · 0.45

Tested by

no test coverage detected