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

Method GeneratePlane

Modules/Core/src/Rendering/mitkImageVtkMapper2D.cpp:114–127  ·  view source on GitHub ↗

set the two points defining the textured plane according to the dimension and spacing

Source from the content-addressed store, hash-verified

112
113// set the two points defining the textured plane according to the dimension and spacing
114void 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
129float mitk::ImageVtkMapper2D::CalculateLayerDepth(mitk::BaseRenderer *renderer)
130{

Callers 1

Calls 5

CalculateLayerDepthMethod · 0.95
SetPoint1Method · 0.80
SetPoint2Method · 0.80
GetLocalStorageMethod · 0.45
SetOriginMethod · 0.45

Tested by

no test coverage detected