set the two points defining the textured plane according to the dimension and spacing
| 723 | |
| 724 | // set the two points defining the textured plane according to the dimension and spacing |
| 725 | void mitk::LabelSetImageVtkMapper2D::GeneratePlane(mitk::BaseRenderer *renderer, double planeBounds[6]) |
| 726 | { |
| 727 | LocalStorage *localStorage = m_LSH.GetLocalStorage(renderer); |
| 728 | |
| 729 | float depth = this->CalculateLayerDepth(renderer); |
| 730 | // Set the origin to (xMin; yMin; depth) of the plane. This is necessary for obtaining the correct |
| 731 | // plane size in crosshair rotation and swivel mode. |
| 732 | localStorage->m_Plane->SetOrigin(planeBounds[0], planeBounds[2], depth); |
| 733 | // These two points define the axes of the plane in combination with the origin. |
| 734 | // Point 1 is the x-axis and point 2 the y-axis. |
| 735 | // Each plane is transformed according to the view (axial, coronal and sagittal) afterwards. |
| 736 | localStorage->m_Plane->SetPoint1(planeBounds[1], planeBounds[2], depth); // P1: (xMax, yMin, depth) |
| 737 | localStorage->m_Plane->SetPoint2(planeBounds[0], planeBounds[3], depth); // P2: (xMin, yMax, depth) |
| 738 | } |
| 739 | |
| 740 | float mitk::LabelSetImageVtkMapper2D::CalculateLayerDepth(mitk::BaseRenderer *renderer) |
| 741 | { |
no test coverage detected