| 1040 | } |
| 1041 | |
| 1042 | void mitk::MultiLabelSegmentation::UpdateCenterOfMass(LabelValueType pixelValue) |
| 1043 | { |
| 1044 | auto label = this->GetLabel(pixelValue); |
| 1045 | if (label.IsNull()) |
| 1046 | return; |
| 1047 | |
| 1048 | if (label->GetCenterOfMassMTime()<this->GetGroupImage(this->GetGroupIndexOfLabel(pixelValue))->GetMTime()) |
| 1049 | { //the mtime of the center of mass prop is smaller then the group image -> recalculate to be on the safe side. |
| 1050 | if (4 == this->GetDimension()) |
| 1051 | { |
| 1052 | AccessFixedDimensionByItk_1(this->GetGroupImage(this->GetGroupIndexOfLabel(pixelValue)), CalculateCenterOfMassProcessing, 4, pixelValue); |
| 1053 | } |
| 1054 | else |
| 1055 | { |
| 1056 | AccessByItk_1(this->GetGroupImage(this->GetGroupIndexOfLabel(pixelValue)), CalculateCenterOfMassProcessing, pixelValue); |
| 1057 | } |
| 1058 | } |
| 1059 | } |
| 1060 | |
| 1061 | bool mitk::MultiLabelSegmentation::IsEmpty(LabelValueType pixelValue, TimeStepType t) const |
| 1062 | { |
no test coverage detected