set the two points defining the textured plane according to the dimension and spacing
| 112 | |
| 113 | // set the two points defining the textured plane according to the dimension and spacing |
| 114 | void mitk::ImageVtkMapper2D::GeneratePlane(mitk::BaseRenderer *renderer, double planeBounds[6]) |
| 115 | { |
| 116 | LocalStorage *localStorage = m_LSH.GetLocalStorage(renderer); |
| 117 | |
| 118 | float depth = this->CalculateLayerDepth(renderer); |
| 119 | // Set the origin to (xMin; yMin; depth) of the plane. This is necessary for obtaining the correct |
| 120 | // plane size in crosshair rotation and swivel mode. |
| 121 | localStorage->m_Plane->SetOrigin(planeBounds[0], planeBounds[2], depth); |
| 122 | // These two points define the axes of the plane in combination with the origin. |
| 123 | // Point 1 is the x-axis and point 2 the y-axis. |
| 124 | // Each plane is transformed according to the view (axial, coronal and sagittal) afterwards. |
| 125 | localStorage->m_Plane->SetPoint1(planeBounds[1], planeBounds[2], depth); // P1: (xMax, yMin, depth) |
| 126 | localStorage->m_Plane->SetPoint2(planeBounds[0], planeBounds[3], depth); // P2: (xMin, yMax, depth) |
| 127 | } |
| 128 | |
| 129 | float mitk::ImageVtkMapper2D::CalculateLayerDepth(mitk::BaseRenderer *renderer) |
| 130 | { |
no test coverage detected