| 46 | } |
| 47 | |
| 48 | vtkSmartPointer<vtkCaptionActor2D> mitk::ROIMapperHelper::CreateCaptionActor(const std::string& caption, const Point3D& attachmentPoint, vtkProperty* property, const DataNode* dataNode, const BaseRenderer* renderer) |
| 49 | { |
| 50 | auto captionActor = vtkSmartPointer<vtkCaptionActor2D>::New(); |
| 51 | captionActor->SetPosition(property->GetLineWidth() * 0.5, property->GetLineWidth() * 0.5); |
| 52 | captionActor->GetTextActor()->SetTextScaleModeToNone(); |
| 53 | captionActor->SetAttachmentPoint(attachmentPoint[0], attachmentPoint[1], attachmentPoint[2]); |
| 54 | captionActor->SetCaption(caption.c_str()); |
| 55 | captionActor->BorderOff(); |
| 56 | captionActor->LeaderOff(); |
| 57 | |
| 58 | auto* textProperty = captionActor->GetCaptionTextProperty(); |
| 59 | textProperty->SetColor(property->GetColor()); |
| 60 | textProperty->SetOpacity(property->GetOpacity()); |
| 61 | textProperty->ShadowOff(); |
| 62 | |
| 63 | int fontSize = 16; |
| 64 | dataNode->GetIntProperty("font.size", fontSize, renderer); |
| 65 | textProperty->SetFontSize(fontSize); |
| 66 | |
| 67 | bool bold = false; |
| 68 | dataNode->GetBoolProperty("font.bold", bold, renderer); |
| 69 | textProperty->SetBold(bold); |
| 70 | |
| 71 | bool italic = false; |
| 72 | dataNode->GetBoolProperty("font.italic", italic, renderer); |
| 73 | textProperty->SetItalic(italic); |
| 74 | |
| 75 | return captionActor; |
| 76 | } |
| 77 | |
| 78 | std::string mitk::ROIMapperHelper::ParseCaption(const std::string& captionTemplate, const ROI::Element& roi, TimeStepType t) |
| 79 | { |
nothing calls this directly
no test coverage detected