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

Function SetLabelColor

Modules/Segmentation/cmdapps/ContoursToImage.cpp:101–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101bool SetLabelColor(const mitk::IPropertyProvider* propertyProvider, mitk::Label* label)
102{
103 if (propertyProvider != nullptr)
104 {
105 if (auto property = propertyProvider->GetConstProperty("color"); property.IsNotNull())
106 {
107 if (auto colorProperty = dynamic_cast<const mitk::ColorProperty*>(property.GetPointer()); colorProperty != nullptr)
108 {
109 label->SetColor(colorProperty->GetColor());
110 return true;
111 }
112 }
113 }
114
115 return false;
116}
117
118OutputFormat ParseOutputFormat(const mitk::IFileIO::Options& args)
119{

Callers 1

mainFunction · 0.85

Calls 5

IsNotNullMethod · 0.80
GetPointerMethod · 0.80
GetConstPropertyMethod · 0.45
SetColorMethod · 0.45
GetColorMethod · 0.45

Tested by

no test coverage detected