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

Method SetCenterOfMassCoordinates

Modules/Multilabel/src/mitkLabel.cpp:375–388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

373}
374
375void mitk::Label::SetCenterOfMassCoordinates(const mitk::Point3D &center)
376{
377 mitk::Point3dProperty *property = dynamic_cast<mitk::Point3dProperty *>(GetProperty("center.coordinates"));
378 if (property != nullptr)
379 {
380 // Update Property
381 property->SetValue(center);
382 }
383 else
384 // Create new Property
385 {
386 SetProperty("center.coordinates", mitk::Point3dProperty::New(center));
387 }
388}
389
390mitk::Point3D mitk::Label::GetCenterOfMassCoordinates() const
391{

Callers 1

UpdateCenterOfMassMethod · 0.95

Calls 3

GetPropertyFunction · 0.50
NewFunction · 0.50
SetValueMethod · 0.45

Tested by

no test coverage detected