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

Function ToLabelMapping

Wrapping/Python/mitk/MultiLabelSegmentation.cpp:81–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81LabelValueMappingVector ToLabelMapping(py::iterable seq)
82{
83 LabelValueMappingVector result;
84 for (auto item : seq)
85 {
86 auto pair = item.cast<py::tuple>();
87 if (pair.size() != 2)
88 throw py::value_error("label_mapping entries must be 2-tuples");
89 result.push_back({ToLabelValue(pair[0]), ToLabelValue(pair[1])});
90 }
91 return result;
92}
93
94// Accept DICOMCodeSequence object or (value, scheme, meaning) 3-tuple
95DICOMCodeSequence ToDICOMCodeSequence(py::handle h)

Callers 1

Calls 2

ToLabelValueFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected