| 79 | } |
| 80 | |
| 81 | bool SetLabelName(const mitk::IPropertyProvider* propertyProvider, mitk::Label* label) |
| 82 | { |
| 83 | if (propertyProvider != nullptr) |
| 84 | { |
| 85 | if (auto property = propertyProvider->GetConstProperty("name"); property.IsNotNull()) |
| 86 | { |
| 87 | if (auto nameProperty = dynamic_cast<const mitk::StringProperty*>(property.GetPointer()); nameProperty != nullptr) |
| 88 | { |
| 89 | if (auto name = nameProperty->GetValueAsString(); !name.empty()) |
| 90 | { |
| 91 | label->SetName(name); |
| 92 | return true; |
| 93 | } |
| 94 | } |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | return false; |
| 99 | } |
| 100 | |
| 101 | bool SetLabelColor(const mitk::IPropertyProvider* propertyProvider, mitk::Label* label) |
| 102 | { |
no test coverage detected