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

Method GetSelectedPosition

Modules/QtWidgets/src/QmitkStdMultiWidget.cpp:176–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176const mitk::Point3D QmitkStdMultiWidget::GetSelectedPosition(const QString& /*widgetName*/) const
177{
178 const mitk::PlaneGeometry* plane1 = GetRenderWindow1()->GetSliceNavigationController()->GetCurrentPlaneGeometry();
179 const mitk::PlaneGeometry* plane2 = GetRenderWindow2()->GetSliceNavigationController()->GetCurrentPlaneGeometry();
180 const mitk::PlaneGeometry* plane3 = GetRenderWindow3()->GetSliceNavigationController()->GetCurrentPlaneGeometry();
181
182 mitk::Line3D line;
183 if ((plane1 != nullptr) && (plane2 != nullptr)
184 && (plane1->IntersectionLine(plane2, line)))
185 {
186 mitk::Point3D point;
187 if ((plane3 != nullptr) && (plane3->IntersectionPoint(line, point)))
188 {
189 return point;
190 }
191 }
192
193 return mitk::Point3D();
194}
195
196void QmitkStdMultiWidget::SetCrosshairVisibility(bool visible)
197{

Callers 1

InitializeViewsMethod · 0.95

Calls 4

IntersectionLineMethod · 0.80
IntersectionPointMethod · 0.80

Tested by

no test coverage detected