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

Method StartWindowLevel

Interaction/Style/vtkInteractorStyleImage.cxx:77–101  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

75
76//------------------------------------------------------------------------------
77void 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//------------------------------------------------------------------------------
104void vtkInteractorStyleImage::EndWindowLevel()

Callers 1

OnLeftButtonDownMethod · 0.95

Calls 6

SetCurrentImageNumberMethod · 0.95
StartStateMethod · 0.80
HasObserverMethod · 0.80
InvokeEventMethod · 0.80
GetColorWindowMethod · 0.80
GetColorLevelMethod · 0.80

Tested by

no test coverage detected