| 411 | } |
| 412 | |
| 413 | std::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 '>■</span>" << std::dec; |
| 422 | |
| 423 | stream << "<font class=\"normal\"> " << CreateDisplayLabelName(segmentation, label); |
| 424 | stream << "</font>"; |
| 425 | return stream.str(); |
| 426 | } |
| 427 | |
| 428 | std::string mitk::LabelSetImageHelper::CreateHTMLLabelDetails(const mitk::Label* label, const mitk::MultiLabelSegmentation* segmentation) |
| 429 | { |