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 =========================================================================*/
44 #ifndef vtkResliceCursorWidget_h
45 #define vtkResliceCursorWidget_h
46 
47 #include "vtkInteractionWidgetsModule.h" // For export macro
48 #include "vtkAbstractWidget.h"
49 
51 
53 {
54 public:
55 
57  static vtkResliceCursorWidget *New();
58 
60 
62  void PrintSelf(ostream& os, vtkIndent indent);
64 
66 
70  {this->Superclass::SetWidgetRepresentation(
71  reinterpret_cast<vtkWidgetRepresentation*>(r));}
73 
75 
77  {return reinterpret_cast<vtkResliceCursorRepresentation*>(this->WidgetRep);}
79 
82 
86  virtual void SetEnabled(int);
87 
89 
90  vtkSetMacro( ManageWindowLevel, int );
91  vtkGetMacro( ManageWindowLevel, int );
92  vtkBooleanMacro( ManageWindowLevel, int );
94 
96 
97  enum
98  {
99  WindowLevelEvent = 1055,
102  ResetCursorEvent
103  };
104  //ETX
106 
108  virtual void ResetResliceCursor();
109 
110 protected:
113 
114  // These are the callbacks for this widget
115  static void SelectAction(vtkAbstractWidget*);
116  static void RotateAction(vtkAbstractWidget*);
117  static void EndSelectAction(vtkAbstractWidget*);
118  static void ResizeThicknessAction(vtkAbstractWidget*);
119  static void EndResizeThicknessAction(vtkAbstractWidget*);
120  static void MoveAction(vtkAbstractWidget*);
121  static void ResetResliceCursorAction(vtkAbstractWidget*);
122 
123  // helper methods for cursor management
124  void SetCursor(int state);
125 
126  // Start Window Level
127  void StartWindowLevel();
128 
129  // Invoke the appropriate event based on state
130  void InvokeAnEvent();
131 
132 //BTX - manage the state of the widget
135  {
136  Start=0,
137  Active
138  };
139 //ETX
140 
141  // Keep track whether key modifier key is pressed
144 
145 private:
146  vtkResliceCursorWidget(const vtkResliceCursorWidget&); //Not implemented
147  void operator=(const vtkResliceCursorWidget&); //Not implemented
148 };
149 
150 #endif
void PrintSelf(ostream &os, vtkIndent indent)
virtual void SetCursor(int vtkNotUsed(state))
void SetRepresentation(vtkResliceCursorRepresentation *r)
virtual void CreateDefaultRepresentation()=0
represent a reslice cursor
vtkWidgetRepresentation * WidgetRep
#define VTKINTERACTIONWIDGETS_EXPORT
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkResliceCursorRepresentation * GetResliceCursorRepresentation()
define the API for widget / widget representation
static vtkObject * New()
virtual void SetEnabled(int)
represent the vtkResliceCursorWidget