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

Function InitPlaneGeometry

Wrapping/Python/mitk/Geometries.cpp:226–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224}
225
226void InitPlaneGeometry(py::module_& m)
227{
228 py::class_<PlaneGeometry, BaseGeometry, PlaneGeometry::Pointer>(m, "PlaneGeometry",
229 R"(Geometry of a 2D plane embedded in 3D world space.
230
231Used for example to describe individual slices of a 3D image. Inherits from
232:py:class:`BaseGeometry` and adds 2D index <-> world conversions plus a
233``normal`` accessor.
234)")
235 .def_static("new", &PlaneGeometry::New,
236 "Construct a new identity-initialized plane geometry.")
237 .def_property_readonly("normal", &PlaneGeometry::GetNormal,
238 "World-space normal of the plane as a :py:class:`Vector3D`.")
239 .def("world_to_index", py::overload_cast<const Point2D&, Point2D&>(&PlaneGeometry::WorldToIndex, py::const_), py::arg("world"), py::arg("index"),
240 "Convert a 2D world-coordinate point on the plane to a 2D index-coordinate point.")
241 .def("world_to_index", py::overload_cast<const Vector2D&, Vector2D&>(&PlaneGeometry::WorldToIndex, py::const_), py::arg("world"), py::arg("index"),
242 "Convert a 2D world-coordinate vector on the plane to a 2D index-coordinate vector.")
243 .def("index_to_world", py::overload_cast<const Point2D&, Point2D&>(&PlaneGeometry::IndexToWorld, py::const_), py::arg("index"), py::arg("world"),
244 "Convert a 2D index-coordinate point to a 2D world-coordinate point on the plane.")
245 .def("index_to_world", py::overload_cast<const Vector2D&, Vector2D&>(&PlaneGeometry::IndexToWorld, py::const_), py::arg("index"), py::arg("world"),
246 "Convert a 2D index-coordinate vector to a 2D world-coordinate vector on the plane.");
247}
248
249void InitSlicedGeometry3D(py::module_& m)
250{

Callers 1

InitGeometriesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected