VTK
vtkResliceCursorWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkResliceCursorWidget.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
42 #ifndef vtkResliceCursorWidget_h
43 #define vtkResliceCursorWidget_h
44 
45 #include "vtkInteractionWidgetsModule.h" // For export macro
46 #include "vtkAbstractWidget.h"
47 
49 
50 class VTKINTERACTIONWIDGETS_EXPORT vtkResliceCursorWidget : public vtkAbstractWidget
51 {
52 public:
53 
58 
60 
64  void PrintSelf(ostream& os, vtkIndent indent);
66 
73  {this->Superclass::SetWidgetRepresentation(
74  reinterpret_cast<vtkWidgetRepresentation*>(r));}
75 
80  {return reinterpret_cast<vtkResliceCursorRepresentation*>(this->WidgetRep);}
81 
86 
92  virtual void SetEnabled(int);
93 
95 
98  vtkSetMacro( ManageWindowLevel, int );
99  vtkGetMacro( ManageWindowLevel, int );
100  vtkBooleanMacro( ManageWindowLevel, int );
102 
106  enum
107  {
108  WindowLevelEvent = 1055,
111  ResetCursorEvent
112  };
113 
117  virtual void ResetResliceCursor();
118 
119 protected:
122 
123  // These are the callbacks for this widget
131 
132  // helper methods for cursor management
133  void SetCursor(int state);
134 
135  // Start Window Level
137 
138  // Invoke the appropriate event based on state
140 
141  // Manage the state of the widget
144  {
145  Start=0,
146  Active
147  };
148 
149  // Keep track whether key modifier key is pressed
152 
153 private:
154  vtkResliceCursorWidget(const vtkResliceCursorWidget&) VTK_DELETE_FUNCTION;
155  void operator=(const vtkResliceCursorWidget&) VTK_DELETE_FUNCTION;
156 };
157 
158 #endif
define the API for widget / widget representation
vtkWidgetRepresentation * WidgetRep
a simple class to control print indentation
Definition: vtkIndent.h:40
represent the vtkResliceCursorWidget
represent a reslice cursor
static void EndResizeThicknessAction(vtkAbstractWidget *)
vtkResliceCursorRepresentation * GetResliceCursorRepresentation()
Return the representation as a vtkResliceCursorRepresentation.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void CreateDefaultRepresentation()
Create the default widget representation if one is not set.
static void ResetResliceCursorAction(vtkAbstractWidget *)
virtual void ResetResliceCursor()
Reset the cursor back to its initial state.
void SetRepresentation(vtkResliceCursorRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
static void MoveAction(vtkAbstractWidget *)
virtual void SetEnabled(int)
Methods for activiating this widget.
static void EndSelectAction(vtkAbstractWidget *)
static void SelectAction(vtkAbstractWidget *)
static void ResizeThicknessAction(vtkAbstractWidget *)
static void RotateAction(vtkAbstractWidget *)
void SetCursor(int state)
static vtkResliceCursorWidget * New()
Instantiate this class.
abstract class defines interface between the widget and widget representation classes
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.