| 998 | } |
| 999 | |
| 1000 | void mitk::MultiLabelSegmentation::RenameLabel(LabelValueType pixelValue, const std::string& name, const mitk::Color& color) |
| 1001 | { |
| 1002 | std::shared_lock<std::shared_mutex> guard(m_LabelNGroupMapsMutex); |
| 1003 | |
| 1004 | auto label = GetLabel(pixelValue); |
| 1005 | if (label.IsNull()) mitkThrow() << "Cannot rename label. Unknown label value provided. Unknown label value:" << pixelValue; |
| 1006 | |
| 1007 | label->SetName(name); |
| 1008 | label->SetColor(color); |
| 1009 | |
| 1010 | this->UpdateLookupTable(pixelValue); |
| 1011 | m_LookupTable->Modified(); |
| 1012 | } |
| 1013 | |
| 1014 | void mitk::MultiLabelSegmentation::UpdateLabel(LabelValueType labelValue, const Label* templateLabel) |
| 1015 | { |
no test coverage detected