| 104 | } |
| 105 | |
| 106 | void 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 | |
| 134 | bool mitk::SplineVtkMapper3D::SplinesAreAvailable() |
| 135 | { |
no test coverage detected