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

Method ApplyIndividualProperties

Modules/ROI/src/mitkROIMapperHelper.cpp:22–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20#include <regex>
21
22void mitk::ROIMapperHelper::ApplyIndividualProperties(const ROI::Element& roi, TimeStepType t, vtkActor* actor)
23{
24 auto* property = actor->GetProperty();
25
26 property->SetRepresentationToWireframe();
27 property->LightingOff();
28
29 if (auto colorProperty = GetConstProperty<ColorProperty>("color", roi, t); colorProperty != nullptr)
30 {
31 const auto color = colorProperty->GetColor();
32 property->SetColor(color[0], color[1], color[2]);
33 }
34
35 if (auto opacityProperty = GetConstProperty<FloatProperty>("opacity", roi, t); opacityProperty != nullptr)
36 {
37 const auto opacity = opacityProperty->GetValue();
38 property->SetOpacity(property->GetOpacity() * opacity);
39 }
40
41 if (auto lineWidthProperty = GetConstProperty<FloatProperty>("lineWidth", roi, t); lineWidthProperty != nullptr)
42 {
43 const auto lineWidth = lineWidthProperty->GetValue();
44 property->SetLineWidth(lineWidth);
45 }
46}
47
48vtkSmartPointer<vtkCaptionActor2D> mitk::ROIMapperHelper::CreateCaptionActor(const std::string& caption, const Point3D& attachmentPoint, vtkProperty* property, const DataNode* dataNode, const BaseRenderer* renderer)
49{

Callers

nothing calls this directly

Calls 8

GetPropertyMethod · 0.45
GetColorMethod · 0.45
SetColorMethod · 0.45
GetValueMethod · 0.45
SetOpacityMethod · 0.45
GetOpacityMethod · 0.45
SetLineWidthMethod · 0.45

Tested by

no test coverage detected