| 506 | } |
| 507 | |
| 508 | void mitk::nnInteractiveTool::SetPreviewLabel(MultiLabelSegmentation::LabelValueType value, const Color& color) |
| 509 | { |
| 510 | auto image = this->GetPreviewSegmentation(); |
| 511 | |
| 512 | if (image == nullptr) |
| 513 | return; |
| 514 | |
| 515 | auto label = image->GetLabel(value); |
| 516 | |
| 517 | if (label.IsNull()) |
| 518 | { |
| 519 | label = Label::New(value, "preview"); |
| 520 | image->AddLabel(label, 0, false, false); |
| 521 | } |
| 522 | |
| 523 | image->GetLabel(value)->SetColor(color); |
| 524 | image->UpdateLabel(value, label); |
| 525 | |
| 526 | image->SetActiveLabel(value); |
| 527 | this->SetSelectedLabels({value}); |
| 528 | } |
| 529 | |
| 530 | void mitk::nnInteractiveTool::DoUpdatePreview(const Image* inputAtTimeStep, const Image* /*oldSegAtTimeStep*/, MultiLabelSegmentation* previewImage, TimeStepType timeStep) |
| 531 | { |
no test coverage detected