| 109 | } |
| 110 | |
| 111 | mitk::Label::Label() : PropertyList(), m_Value(UNLABELED_VALUE) |
| 112 | { |
| 113 | if (GetProperty("locked") == nullptr) |
| 114 | SetLocked(true); |
| 115 | if (GetProperty("visible") == nullptr) |
| 116 | SetVisible(true); |
| 117 | if (GetProperty("opacity") == nullptr) |
| 118 | SetOpacity(0.6); |
| 119 | |
| 120 | if (GetProperty("color") == nullptr) |
| 121 | { |
| 122 | mitk::Color col; |
| 123 | col.Set(1, 1, 1); |
| 124 | SetColor(col); |
| 125 | } |
| 126 | |
| 127 | if (GetProperty("name") == nullptr) |
| 128 | SetName("Unknown label name"); |
| 129 | |
| 130 | if (GetProperty("description") == nullptr) |
| 131 | SetDescription(""); |
| 132 | |
| 133 | // Algorithm type is intentionally left Undefined: a freshly constructed label has no declared |
| 134 | // origin yet. The type is set at the point of contribution (Label::AddToolUse / explicit setters), |
| 135 | // and the DICOM SEG writer defaults a still-Undefined type to MANUAL at export for conformance. |
| 136 | } |
| 137 | |
| 138 | mitk::Label::Label(PixelType value, const std::string& name) : Label() |
| 139 | { |