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

Method ApplyAllProperties

Modules/MapperExt/src/mitkSplineVtkMapper3D.cpp:106–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106void mitk::SplineVtkMapper3D::ApplyAllProperties(BaseRenderer *renderer, vtkActor *actor)
107{
108 Superclass::ApplyColorAndOpacityProperties(renderer, actor);
109
110 // vtk changed the type of rgba during releases. Due to that, the following convert is done
111 double rgba[4] = {1.0f, 1.0f, 1.0f, 1.0f}; // white
112
113 // getting the color from DataNode
114 float temprgba[4];
115 this->GetDataNode()->GetColor(&temprgba[0], nullptr);
116 // convert to rgba, what ever type it has!
117 rgba[0] = temprgba[0];
118 rgba[1] = temprgba[1];
119 rgba[2] = temprgba[2];
120 rgba[3] = temprgba[3];
121 // finally set the color inside the actor
122 m_SplinesActor->GetProperty()->SetColor(rgba);
123
124 float lineWidth;
125 if (dynamic_cast<mitk::IntProperty *>(this->GetDataNode()->GetProperty("line width")) == nullptr)
126 lineWidth = 1.0;
127 else
128 lineWidth = dynamic_cast<mitk::IntProperty *>(this->GetDataNode()->GetProperty("line width"))->GetValue();
129 m_SplinesActor->GetProperty()->SetLineWidth(lineWidth);
130
131 m_SplineUpdateTime.Modified();
132}
133
134bool mitk::SplineVtkMapper3D::SplinesAreAvailable()
135{

Callers 1

Calls 7

GetColorMethod · 0.45
GetDataNodeMethod · 0.45
SetColorMethod · 0.45
GetPropertyMethod · 0.45
GetValueMethod · 0.45
SetLineWidthMethod · 0.45
ModifiedMethod · 0.45

Tested by

no test coverage detected