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

Method GeneratePlane

Modules/Multilabel/src/mitkLabelSetImageVtkMapper2D.cpp:725–738  ·  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

723
724// set the two points defining the textured plane according to the dimension and spacing
725void 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
740float mitk::LabelSetImageVtkMapper2D::CalculateLayerDepth(mitk::BaseRenderer *renderer)
741{

Callers 1

GenerateImageSliceMethod · 0.95

Calls 5

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

Tested by

no test coverage detected