------------------------------------------------------------------------------
| 395 | |
| 396 | //------------------------------------------------------------------------------ |
| 397 | void 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 | //------------------------------------------------------------------------------ |
| 419 | void vtkResliceCursorWidget::InvokeAnEvent() |
no test coverage detected