| 414 | } |
| 415 | |
| 416 | void 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 | |
| 434 | void mitk::Label::SetAlgorithmType(AlgorithmType algoType) |
| 435 | { |