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

Method UpdateCenterOfMass

Modules/Multilabel/src/mitkLabel.cpp:416–432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

414}
415
416void mitk::Label::UpdateCenterOfMass(const mitk::Point3D& index, const mitk::Point3D& coordinates)
417{
418 this->SetCenterOfMassCoordinates(coordinates);
419 this->SetCenterOfMassIndex(index);
420
421 //we ensure that updating always modifies the prop to avoid recomputation of COM in case of no changes
422 mitk::Point3dProperty* property = dynamic_cast<mitk::Point3dProperty*>(GetProperty("center.coordinates"));
423 if (property != nullptr)
424 {
425 property->Modified();
426 }
427 property = dynamic_cast<mitk::Point3dProperty*>(GetProperty("center.index"));
428 if (property != nullptr)
429 {
430 property->Modified();
431 }
432};
433
434void mitk::Label::SetAlgorithmType(AlgorithmType algoType)
435{

Callers 4

PrepareGoToLabelMethod · 0.45

Calls 4

SetCenterOfMassIndexMethod · 0.95
GetPropertyFunction · 0.50
ModifiedMethod · 0.45

Tested by 3

PrepareGoToLabelMethod · 0.36