#include <vtkCheckerboardWidget.h>
The vtkCheckerboardWidget is used to interactively control an instance of vtkImageCheckerboard (and an associated vtkImageActor used to display the checkerboard). The user can adjust the number of divisions in each of the i-j directions in a 2D image. A frame appears around the vtkImageActor with sliders along each side of the frame. The user can interactively adjust the sliders to the desired number of checkerboard subdivisions.
To use this widget, specify an instance of vtkImageCheckerboard and an instance of vtkImageActor. By default, the widget responds to the following events:
If the slider bead is selected: LeftButtonPressEvent - select slider (if on slider) LeftButtonReleaseEvent - release slider MouseMoveEvent - move slider If the end caps or slider tube of a slider are selected: LeftButtonPressEvent - jump (or animate) to cap or point on tube;It is possible to change these event bindings. Please refer to the documentation for vtkSliderWidget for more information. Advanced users may directly access and manipulate the sliders by obtaining the instances of vtkSliderWidget composing the vtkCheckerboard widget.
Definition at line 60 of file vtkCheckerboardWidget.h.
typedef vtkAbstractWidget | Superclass |
static int | IsTypeOf (const char *type) |
static vtkCheckerboardWidget * | SafeDownCast (vtkObject *o) |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
Public Member Functions | |
virtual void | SetEnabled (int) |
void | CreateDefaultRepresentation () |
void | SetRepresentation (vtkCheckerboardRepresentation *r) |
vtkCheckerboardRepresentation * | GetCheckerboardRepresentation () |
Static Public Member Functions | |
static vtkCheckerboardWidget * | New () |
Protected Member Functions | |
vtkCheckerboardWidget () | |
~vtkCheckerboardWidget () | |
void | StartCheckerboardInteraction () |
void | CheckerboardInteraction (int sliderNum) |
void | EndCheckerboardInteraction () |
Protected Attributes | |
vtkSliderWidget * | TopSlider |
vtkSliderWidget * | RightSlider |
vtkSliderWidget * | BottomSlider |
vtkSliderWidget * | LeftSlider |
Friends | |
class | vtkCWCallback |
Standard methods for a VTK class.
Reimplemented from vtkAbstractWidget.
Definition at line 68 of file vtkCheckerboardWidget.h.
vtkCheckerboardWidget::vtkCheckerboardWidget | ( | ) | [protected] |
vtkCheckerboardWidget::~vtkCheckerboardWidget | ( | ) | [protected] |
static vtkCheckerboardWidget* vtkCheckerboardWidget::New | ( | ) | [static] |
Instantiate this class.
Reimplemented from vtkObject.
virtual const char* vtkCheckerboardWidget::GetClassName | ( | ) | [virtual] |
Standard methods for a VTK class.
Reimplemented from vtkAbstractWidget.
static int vtkCheckerboardWidget::IsTypeOf | ( | const char * | type | ) | [static] |
Standard methods for a VTK class.
Reimplemented from vtkAbstractWidget.
virtual int vtkCheckerboardWidget::IsA | ( | const char * | type | ) | [virtual] |
Standard methods for a VTK class.
Reimplemented from vtkAbstractWidget.
static vtkCheckerboardWidget* vtkCheckerboardWidget::SafeDownCast | ( | vtkObject * | o | ) | [static] |
Standard methods for a VTK class.
Reimplemented from vtkAbstractWidget.
void vtkCheckerboardWidget::PrintSelf | ( | ostream & | os, | |
vtkIndent | indent | |||
) | [virtual] |
Standard methods for a VTK class.
Reimplemented from vtkAbstractWidget.
virtual void vtkCheckerboardWidget::SetEnabled | ( | int | ) | [virtual] |
The method for activiating and deactiviating this widget. This method must be overridden because it is a composite widget and does more than its superclasses' vtkAbstractWidget::SetEnabled() method.
Reimplemented from vtkAbstractWidget.
void vtkCheckerboardWidget::SetRepresentation | ( | vtkCheckerboardRepresentation * | r | ) | [inline] |
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene. Note that the representation is a subclass of vtkProp so it can be added to the renderer independent of the widget.
Definition at line 81 of file vtkCheckerboardWidget.h.
vtkCheckerboardRepresentation* vtkCheckerboardWidget::GetCheckerboardRepresentation | ( | ) | [inline] |
Return the representation as a vtkCheckerboardRepresentation.
Definition at line 87 of file vtkCheckerboardWidget.h.
void vtkCheckerboardWidget::CreateDefaultRepresentation | ( | ) | [virtual] |
Create the default widget representation if one is not set.
Implements vtkAbstractWidget.
void vtkCheckerboardWidget::StartCheckerboardInteraction | ( | ) | [protected] |
void vtkCheckerboardWidget::CheckerboardInteraction | ( | int | sliderNum | ) | [protected] |
void vtkCheckerboardWidget::EndCheckerboardInteraction | ( | ) | [protected] |
friend class vtkCWCallback [friend] |
Definition at line 110 of file vtkCheckerboardWidget.h.
vtkSliderWidget* vtkCheckerboardWidget::TopSlider [protected] |
Definition at line 99 of file vtkCheckerboardWidget.h.
vtkSliderWidget* vtkCheckerboardWidget::RightSlider [protected] |
Definition at line 100 of file vtkCheckerboardWidget.h.
vtkSliderWidget* vtkCheckerboardWidget::BottomSlider [protected] |
Definition at line 101 of file vtkCheckerboardWidget.h.
vtkSliderWidget* vtkCheckerboardWidget::LeftSlider [protected] |
Definition at line 102 of file vtkCheckerboardWidget.h.