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

Method RenameLabel

Modules/Multilabel/src/mitkLabelSetImage.cpp:1000–1012  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

998}
999
1000void 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
1014void mitk::MultiLabelSegmentation::UpdateLabel(LabelValueType labelValue, const Label* templateLabel)
1015{

Callers 2

DoRenameLabelMethod · 0.80

Calls 5

UpdateLookupTableMethod · 0.95
IsNullMethod · 0.45
SetNameMethod · 0.45
SetColorMethod · 0.45
ModifiedMethod · 0.45

Tested by

no test coverage detected