Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkAnnotationROIWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: $RCSfile: vtkAnnotationROIWidget.h,v $
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 =========================================================================*/
32 //
36 //
57 //
70 //
78 
86 
89 
90 #ifndef __vtkAnnotationROIWidget_h
91 #define __vtkAnnotationROIWidget_h
92 
93 // AnnotationModule includes
94 #include "vtkSlicerAnnotationsModuleVTKWidgetsExport.h"
95 
96 // VTK includes
97 #include <vtkAbstractWidget.h>
98 
100 class vtkHandleWidget;
101 
102 class VTK_SLICER_ANNOTATIONS_MODULE_VTKWIDGETS_EXPORT vtkAnnotationROIWidget
103  : public vtkAbstractWidget
104 {
105 public:
108  static vtkAnnotationROIWidget *New();
109 
112  vtkTypeMacro(vtkAnnotationROIWidget,vtkAbstractWidget);
113  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
114 
120  {
121  this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
122  }
123 
128  vtkSetMacro(TranslationEnabled,int);
129  vtkGetMacro(TranslationEnabled,int);
130  vtkBooleanMacro(TranslationEnabled,int);
131  vtkSetMacro(ScalingEnabled,int);
132  vtkGetMacro(ScalingEnabled,int);
133  vtkBooleanMacro(ScalingEnabled,int);
134  vtkSetMacro(RotationEnabled,int);
135  vtkGetMacro(RotationEnabled,int);
136  vtkBooleanMacro(RotationEnabled,int);
137 
141  virtual void CreateDefaultRepresentation() VTK_OVERRIDE;
142 
143 protected:
146 
148  enum _WidgetState {Start=0,Active};
149 
151  static void SelectAction(vtkAbstractWidget*);
152  static void EndSelectAction(vtkAbstractWidget*);
153  static void TranslateAction(vtkAbstractWidget*);
154  static void ScaleAction(vtkAbstractWidget*);
155  static void MoveAction(vtkAbstractWidget*);
156 
161 
162 private:
163  vtkAnnotationROIWidget(const vtkAnnotationROIWidget&); //Not implemented
164  void operator=(const vtkAnnotationROIWidget&); //Not implemented
165 };
166 
167 #endif
virtual void SetRepresentation(vtkAnnotationROIRepresentation *r)
int TranslationEnabled
Control whether scaling, rotation, and translation are supported.