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

Method IsInside

Modules/DataTypesExt/src/mitkEllipsoid.cpp:32–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32bool mitk::Ellipsoid::IsInside(const Point3D &worldPoint) const
33{
34 // transform point from world to object coordinates
35 ScalarType p[4];
36 p[0] = worldPoint[0];
37 p[1] = worldPoint[1];
38 p[2] = worldPoint[2];
39 p[3] = 1;
40
41 GetGeometry()->GetVtkTransform()->GetInverse()->TransformPoint(p, p);
42
43 return (pow(p[0], 2) + pow(p[1], 2) + pow(p[2], 2) <= 1);
44}
45
46mitk::ScalarType mitk::Ellipsoid::GetVolume()
47{

Callers

nothing calls this directly

Calls 3

GetGeometryFunction · 0.85
TransformPointMethod · 0.80
GetVtkTransformMethod · 0.45

Tested by

no test coverage detected