| 889 | } |
| 890 | |
| 891 | void mitk::MultiLabelSegmentation::EraseLabel(LabelValueType pixelValue) |
| 892 | { |
| 893 | try |
| 894 | { |
| 895 | auto groupID = this->GetGroupIndexOfLabel(pixelValue); |
| 896 | |
| 897 | mitk::Image* groupImage = this->GetGroupImage(groupID); |
| 898 | |
| 899 | if (4 == this->GetDimension()) |
| 900 | { |
| 901 | AccessFixedDimensionByItk_1(groupImage, EraseLabelProcessing, 4, pixelValue); |
| 902 | } |
| 903 | else |
| 904 | { |
| 905 | AccessByItk_1(groupImage, EraseLabelProcessing, pixelValue); |
| 906 | } |
| 907 | groupImage->Modified(); |
| 908 | } |
| 909 | catch (const itk::ExceptionObject& e) |
| 910 | { |
| 911 | mitkThrow() << e.GetDescription(); |
| 912 | } |
| 913 | |
| 914 | this->InvokeEvent(LabelModifiedEvent(pixelValue)); |
| 915 | this->InvokeEvent(LabelsChangedEvent({ pixelValue })); |
| 916 | Modified(); |
| 917 | } |
| 918 | |
| 919 | void mitk::MultiLabelSegmentation::EraseLabels(const LabelValueVectorType& labelValues) |
| 920 | { |