VTK
vtkSeedWidget.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkSeedWidget.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=========================================================================*/
71#ifndef vtkSeedWidget_h
72#define vtkSeedWidget_h
73
74#include "vtkInteractionWidgetsModule.h" // For export macro
75#include "vtkAbstractWidget.h"
76
78class vtkHandleWidget;
79class vtkSeedList;
81
82
83class VTKINTERACTIONWIDGETS_EXPORT vtkSeedWidget : public vtkAbstractWidget
84{
85public:
89 static vtkSeedWidget *New();
90
92
96 void PrintSelf(ostream& os, vtkIndent indent);
98
104 virtual void SetEnabled(int);
105
111
117
124 {
125 this->Superclass::SetWidgetRepresentation(
126 reinterpret_cast<vtkWidgetRepresentation*>(rep) );
127 }
128
133 {return reinterpret_cast<vtkSeedRepresentation*>(this->WidgetRep);}
134
139
144 virtual void SetProcessEvents(int);
145
155 virtual void CompleteInteraction();
156
161 virtual void RestartInteraction();
162
171
175 void DeleteSeed(int n);
176
181
183
186 vtkGetMacro( WidgetState, int );
188
189 // The state of the widget
190
191 enum
192 {
193 Start = 1,
194 PlacingSeeds = 2,
195 PlacedSeeds = 4,
196 MovingSeed = 8
197 };
198
199protected:
202
203
205
206 // Callback interface to capture events when
207 // placing the widget.
213
214 // The positioning handle widgets
215 vtkSeedList *Seeds;
216
217 // Manipulating or defining ?
219
220private:
221 vtkSeedWidget(const vtkSeedWidget&) VTK_DELETE_FUNCTION;
222 void operator=(const vtkSeedWidget&) VTK_DELETE_FUNCTION;
223};
224
225#endif
define the API for widget / widget representation
vtkWidgetRepresentation * WidgetRep
abstract class for representing widget handles
a general widget for moving handles
a simple class to control print indentation
Definition: vtkIndent.h:40
platform-independent render window interaction including picking and frame rate control.
abstract specification for renderers
Definition: vtkRenderer.h:64
represent the vtkSeedWidget
place multiple seed points
Definition: vtkSeedWidget.h:84
virtual void CompleteInteraction()
Method to be called when the seed widget should stop responding to the place point interaction.
void DeleteSeed(int n)
Delete the nth seed.
static void EndSelectAction(vtkAbstractWidget *)
virtual void SetEnabled(int)
The method for activating and deactivating this widget.
vtkHandleWidget * GetSeed(int n)
Get the nth seed.
virtual void SetInteractor(vtkRenderWindowInteractor *)
Set the interactor.
vtkSeedList * Seeds
void CreateDefaultRepresentation()
Create the default widget representation if one is not set.
static void CompletedAction(vtkAbstractWidget *)
virtual void RestartInteraction()
Method to be called when the seed widget should start responding to the interaction.
static void MoveAction(vtkAbstractWidget *)
static void AddPointAction(vtkAbstractWidget *)
virtual void SetProcessEvents(int)
Methods to change the whether the widget responds to interaction.
static vtkSeedWidget * New()
Instantiate this class.
static void DeleteAction(vtkAbstractWidget *)
vtkSeedRepresentation * GetSeedRepresentation()
Return the representation as a vtkSeedRepresentation.
virtual void SetCurrentRenderer(vtkRenderer *)
Set the current renderer.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual vtkHandleWidget * CreateNewHandle()
Use this method to programmatically create a new handle.
void SetRepresentation(vtkSeedRepresentation *rep)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
abstract class defines interface between the widget and widget representation classes