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

Method GetCenter

Modules/Core/src/DataManagement/mitkBaseGeometry.cpp:266–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

264}
265
266mitk::Point3D mitk::BaseGeometry::GetCenter() const
267{
268 assert(m_BoundingBox.IsNotNull());
269 Point3D c = m_BoundingBox->GetCenter();
270 if (m_ImageGeometry)
271 {
272 // Get Center returns the middle of min and max pixel index. In corner based images, this is the right position.
273 // In center based images (imageGeometry == true), the index needs to be shifted back.
274 c[0] -= 0.5;
275 c[1] -= 0.5;
276 c[2] -= 0.5;
277 }
278 this->IndexToWorld(c, c);
279 return c;
280}
281
282double mitk::BaseGeometry::GetDiagonalLength2() const
283{

Callers 15

GetSelectedPositionMethod · 0.80
SetGeometryMethod · 0.80
DecideInteractionMethod · 0.80
FitGeometryMethod · 0.80
RotateObjectMethod · 0.80
DeformObjectMethod · 0.80
RotateObjectMethod · 0.80
RotateObjectMethod · 0.80

Calls 2

IndexToWorldMethod · 0.95
IsNotNullMethod · 0.80