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

Method Label

Modules/Multilabel/src/mitkLabel.cpp:111–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111mitk::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
138mitk::Label::Label(PixelType value, const std::string& name) : Label()
139{

Callers 15

test_hash_by_valueMethod · 0.80
test_color_roundtripMethod · 0.80
test_opacityMethod · 0.80
test_visibleMethod · 0.80
test_lockedMethod · 0.80
test_reprMethod · 0.80

Calls 9

SetValueMethod · 0.95
SetNameMethod · 0.95
SetNameFunction · 0.85
AddObserverMethod · 0.80
GetPropertyFunction · 0.50
NewFunction · 0.50
SetMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by 15

test_hash_by_valueMethod · 0.64
test_color_roundtripMethod · 0.64
test_opacityMethod · 0.64
test_visibleMethod · 0.64
test_lockedMethod · 0.64
test_reprMethod · 0.64