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

Method SetCenterOfMassIndex

Modules/Multilabel/src/mitkLabel.cpp:349–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

347}
348
349void mitk::Label::SetCenterOfMassIndex(const mitk::Point3D &center)
350{
351 mitk::Point3dProperty *property = dynamic_cast<mitk::Point3dProperty *>(GetProperty("center.index"));
352 if (property != nullptr)
353 {
354 // Update Property
355 property->SetValue(center);
356 }
357 else
358 // Create new Property
359 {
360 SetProperty("center.index", mitk::Point3dProperty::New(center));
361 }
362}
363
364mitk::Point3D mitk::Label::GetCenterOfMassIndex() const
365{

Callers 1

UpdateCenterOfMassMethod · 0.95

Calls 3

GetPropertyFunction · 0.50
NewFunction · 0.50
SetValueMethod · 0.45

Tested by

no test coverage detected