| 757 | } |
| 758 | |
| 759 | void mitk::LabelSetImageVtkMapper2D::TransformActor(mitk::BaseRenderer *renderer) |
| 760 | { |
| 761 | LocalStorage *localStorage = m_LSH.GetLocalStorage(renderer); |
| 762 | // get the transformation matrix of the reslicer in order to render the slice as axial, coronal or sagittal |
| 763 | vtkSmartPointer<vtkTransform> trans = vtkSmartPointer<vtkTransform>::New(); |
| 764 | vtkSmartPointer<vtkMatrix4x4> matrix = localStorage->m_ReslicerVector[0]->GetResliceAxes(); // same for all layers |
| 765 | trans->SetMatrix(matrix); |
| 766 | |
| 767 | for (unsigned int lidx = 0; lidx < localStorage->m_NumberOfLayers; ++lidx) |
| 768 | { |
| 769 | // transform the plane/contour (the actual actor) to the corresponding view (axial, coronal or sagittal) |
| 770 | localStorage->m_LayerActorVector[lidx]->SetUserTransform(trans); |
| 771 | // transform the origin to center based coordinates, because MITK is center based. |
| 772 | localStorage->m_LayerActorVector[lidx]->SetPosition( |
| 773 | -0.5 * localStorage->m_mmPerPixel[0], -0.5 * localStorage->m_mmPerPixel[1], 0.0); |
| 774 | } |
| 775 | // same for outline actor |
| 776 | localStorage->m_OutlineActor->SetUserTransform(trans); |
| 777 | localStorage->m_OutlineActor->SetPosition( |
| 778 | -0.5 * localStorage->m_mmPerPixel[0], -0.5 * localStorage->m_mmPerPixel[1], 0.0); |
| 779 | // same for outline shadow actor |
| 780 | localStorage->m_OutlineShadowActor->SetUserTransform(trans); |
| 781 | localStorage->m_OutlineShadowActor->SetPosition( |
| 782 | -0.5 * localStorage->m_mmPerPixel[0], -0.5 * localStorage->m_mmPerPixel[1], 0.0); |
| 783 | } |
| 784 | |
| 785 | void mitk::LabelSetImageVtkMapper2D::SetDefaultProperties(mitk::DataNode *node, |
| 786 | mitk::BaseRenderer *renderer, |
no test coverage detected