MCPcopy Create free account
hub / github.com/Kitware/VTK / StartWindowLevel

Method StartWindowLevel

Interaction/Widgets/vtkResliceCursorWidget.cxx:397–416  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

395
396//------------------------------------------------------------------------------
397void vtkResliceCursorWidget::StartWindowLevel()
398{
399 vtkResliceCursorRepresentation* rep =
400 reinterpret_cast<vtkResliceCursorRepresentation*>(this->WidgetRep);
401
402 int X = this->Interactor->GetEventPosition()[0];
403 int Y = this->Interactor->GetEventPosition()[1];
404
405 // Okay, make sure that the pick is in the current renderer
406 if (!this->CurrentRenderer || !this->CurrentRenderer->IsInViewport(X, Y))
407 {
408 rep->SetManipulationMode(vtkResliceCursorRepresentation::None);
409 return;
410 }
411
412 rep->SetManipulationMode(vtkResliceCursorRepresentation::WindowLevelling);
413
414 rep->ActivateText(1);
415 rep->ManageTextDisplay();
416}
417
418//------------------------------------------------------------------------------
419void vtkResliceCursorWidget::InvokeAnEvent()

Callers 1

SelectActionMethod · 0.95

Calls 4

IsInViewportMethod · 0.80
SetManipulationModeMethod · 0.80
ActivateTextMethod · 0.45
ManageTextDisplayMethod · 0.45

Tested by

no test coverage detected