VTK
vtkCheckerboardRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCheckerboardRepresentation.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 =========================================================================*/
32 #ifndef vtkCheckerboardRepresentation_h
33 #define vtkCheckerboardRepresentation_h
34 
35 #include "vtkInteractionWidgetsModule.h" // For export macro
37 
39 class vtkImageActor;
41 
42 
43 class VTKINTERACTIONWIDGETS_EXPORT vtkCheckerboardRepresentation : public vtkWidgetRepresentation
44 {
45 public:
50 
52 
56  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
58 
60 
63  void SetCheckerboard(vtkImageCheckerboard *chkrbrd);
64  vtkGetObjectMacro(Checkerboard,vtkImageCheckerboard);
66 
68 
71  void SetImageActor(vtkImageActor *imageActor);
72  vtkGetObjectMacro(ImageActor,vtkImageActor);
74 
76 
81  vtkSetClampMacro(CornerOffset,double,0.0,0.4);
82  vtkGetMacro(CornerOffset,double);
84 
85  enum {
86  TopSlider=0,
89  LeftSlider
90  };
91 
96  void SliderValueChanged(int sliderNum);
97 
99 
104  void SetTopRepresentation(vtkSliderRepresentation3D*);
105  void SetRightRepresentation(vtkSliderRepresentation3D*);
106  void SetBottomRepresentation(vtkSliderRepresentation3D*);
107  void SetLeftRepresentation(vtkSliderRepresentation3D*);
108  vtkGetObjectMacro(TopRepresentation,vtkSliderRepresentation3D);
109  vtkGetObjectMacro(RightRepresentation,vtkSliderRepresentation3D);
110  vtkGetObjectMacro(BottomRepresentation,vtkSliderRepresentation3D);
111  vtkGetObjectMacro(LeftRepresentation,vtkSliderRepresentation3D);
113 
115 
118  void BuildRepresentation() VTK_OVERRIDE;
119  void GetActors(vtkPropCollection*) VTK_OVERRIDE;
120  void ReleaseGraphicsResources(vtkWindow *w) VTK_OVERRIDE;
121  int RenderOverlay(vtkViewport *viewport) VTK_OVERRIDE;
122  int RenderOpaqueGeometry(vtkViewport *viewport) VTK_OVERRIDE;
123  int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) VTK_OVERRIDE;
124  int HasTranslucentPolygonalGeometry() VTK_OVERRIDE;
126 
127 protected:
129  ~vtkCheckerboardRepresentation() VTK_OVERRIDE;
130 
131  // Instances that this class manipulates
132  vtkImageCheckerboard *Checkerboard;
133  vtkImageActor *ImageActor;
134 
135  // The internal widgets for each side
136  vtkSliderRepresentation3D *TopRepresentation;
137  vtkSliderRepresentation3D *RightRepresentation;
138  vtkSliderRepresentation3D *BottomRepresentation;
139  vtkSliderRepresentation3D *LeftRepresentation;
140 
141  // The corner offset
142  double CornerOffset;
143 
144  // Direction index of image actor's plane normal
145  int OrthoAxis;
146 
147 private:
149  void operator=(const vtkCheckerboardRepresentation&) VTK_DELETE_FUNCTION;
150 };
151 
152 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.
abstract specification for Viewports
Definition: vtkViewport.h:44
abstract class defines interface between the widget and widget representation classes ...
virtual void BuildRepresentation()=0
Subclasses of vtkWidgetRepresentation must implement these methods.
an ordered list of Props
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
draw an image in a rendered 3D scene
Definition: vtkImageActor.h:43
a simple class to control print indentation
Definition: vtkIndent.h:33
provide the representation for a vtkSliderWidget with a 3D skin
show two images at once using a checkboard pattern
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
represent the vtkCheckerboardWidget