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

Method CreateHTMLLabelName

Modules/Multilabel/src/mitkLabelSetImageHelper.cpp:413–426  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

411}
412
413std::string mitk::LabelSetImageHelper::CreateHTMLLabelName(const mitk::Label* label, const mitk::MultiLabelSegmentation* segmentation)
414{
415 std::stringstream stream;
416 auto color = label->GetColor();
417 stream << "<span style='color: #" << std::hex << std::setfill('0')
418 << std::setw(2) << static_cast<int>(color.GetRed() * 255)
419 << std::setw(2) << static_cast<int>(color.GetGreen() * 255)
420 << std::setw(2) << static_cast<int>(color.GetBlue() * 255)
421 << "; font-size: 20px '>&#x25A0;</span>" << std::dec;
422
423 stream << "<font class=\"normal\"> " << CreateDisplayLabelName(segmentation, label);
424 stream << "</font>";
425 return stream.str();
426}
427
428std::string mitk::LabelSetImageHelper::CreateHTMLLabelDetails(const mitk::Label* label, const mitk::MultiLabelSegmentation* segmentation)
429{

Callers

nothing calls this directly

Calls 1

GetColorMethod · 0.45

Tested by

no test coverage detected