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

Function LabelRowHtml

Wrapping/Python/mitk/MultiLabelSegmentation.cpp:356–367  ·  view source on GitHub ↗

Renders one label as a table row. Rows nested under a group header are indented; a standalone Label table renders flush.

Source from the content-addressed store, hash-verified

354// Renders one label as a table row. Rows nested under a group header are
355// indented; a standalone Label table renders flush.
356std::string LabelRowHtml(const Label& l, bool indented)
357{
358 std::ostringstream os;
359 os << "<tr>"
360 << "<td" << (indented ? " style='padding-left:16px'" : "") << ">" << l.GetValue() << "</td>"
361 << "<td>" << EscapeHtml(l.GetName()) << "</td>"
362 << "<td>" << LabelColorSwatch(l) << "</td>"
363 << "<td>" << (l.GetVisible() ? "True" : "False") << "</td>"
364 << "<td>" << (l.GetLocked() ? "True" : "False") << "</td>"
365 << "</tr>";
366 return os.str();
367}
368
369std::string GroupHeaderRowHtml(const std::string& name, std::size_t index)
370{

Callers 1

Calls 6

EscapeHtmlFunction · 0.85
LabelColorSwatchFunction · 0.85
GetValueMethod · 0.45
GetNameMethod · 0.45
GetVisibleMethod · 0.45
GetLockedMethod · 0.45

Tested by

no test coverage detected