------------------------------------------------------------------------------
| 75 | |
| 76 | //------------------------------------------------------------------------------ |
| 77 | void vtkInteractorStyleImage::StartWindowLevel() |
| 78 | { |
| 79 | if (this->State != VTKIS_NONE) |
| 80 | { |
| 81 | return; |
| 82 | } |
| 83 | this->StartState(VTKIS_WINDOW_LEVEL); |
| 84 | |
| 85 | // Get the last (the topmost) image |
| 86 | this->SetCurrentImageNumber(this->CurrentImageNumber); |
| 87 | |
| 88 | if (this->HandleObservers && this->HasObserver(vtkCommand::StartWindowLevelEvent)) |
| 89 | { |
| 90 | this->InvokeEvent(vtkCommand::StartWindowLevelEvent, this); |
| 91 | } |
| 92 | else |
| 93 | { |
| 94 | if (this->CurrentImageProperty) |
| 95 | { |
| 96 | vtkImageProperty* property = this->CurrentImageProperty; |
| 97 | this->WindowLevelInitial[0] = property->GetColorWindow(); |
| 98 | this->WindowLevelInitial[1] = property->GetColorLevel(); |
| 99 | } |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | //------------------------------------------------------------------------------ |
| 104 | void vtkInteractorStyleImage::EndWindowLevel() |
no test coverage detected