VTK  9.2.20230606
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 =========================================================================*/
54 #ifndef vtkCheckerboardRepresentation_h
55 #define vtkCheckerboardRepresentation_h
56 
57 #include "vtkInteractionWidgetsModule.h" // For export macro
59 
60 VTK_ABI_NAMESPACE_BEGIN
62 class vtkImageActor;
64 
65 class VTKINTERACTIONWIDGETS_EXPORT vtkCheckerboardRepresentation : public vtkWidgetRepresentation
66 {
67 public:
72 
74 
78  void PrintSelf(ostream& os, vtkIndent indent) override;
80 
82 
86  vtkGetObjectMacro(Checkerboard, vtkImageCheckerboard);
88 
90 
93  void SetImageActor(vtkImageActor* imageActor);
94  vtkGetObjectMacro(ImageActor, vtkImageActor);
96 
98 
103  vtkSetClampMacro(CornerOffset, double, 0.0, 0.4);
104  vtkGetMacro(CornerOffset, double);
106 
107  enum
108  {
109  TopSlider = 0,
112  LeftSlider
113  };
114 
119  void SliderValueChanged(int sliderNum);
120 
122 
131  vtkGetObjectMacro(TopRepresentation, vtkSliderRepresentation3D);
132  vtkGetObjectMacro(RightRepresentation, vtkSliderRepresentation3D);
133  vtkGetObjectMacro(BottomRepresentation, vtkSliderRepresentation3D);
134  vtkGetObjectMacro(LeftRepresentation, vtkSliderRepresentation3D);
136 
138 
141  void BuildRepresentation() override;
142  void GetActors(vtkPropCollection*) override;
144  int RenderOverlay(vtkViewport* viewport) override;
145  int RenderOpaqueGeometry(vtkViewport* viewport) override;
149 
150 protected:
153 
154  // Instances that this class manipulates
157 
158  // The internal widgets for each side
163 
164  // The corner offset
165  double CornerOffset;
166 
167  // Direction index of image actor's plane normal
169 
170 private:
172  void operator=(const vtkCheckerboardRepresentation&) = delete;
173 };
174 
175 VTK_ABI_NAMESPACE_END
176 #endif
represent the vtkCheckerboardWidget
void SetImageActor(vtkImageActor *imageActor)
Specify an instance of vtkImageActor to decorate.
int RenderOverlay(vtkViewport *viewport) override
Methods required by superclass.
void GetActors(vtkPropCollection *) override
Methods required by superclass.
void SetCheckerboard(vtkImageCheckerboard *chkrbrd)
Specify an instance of vtkImageCheckerboard to manipulate.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard VTK methods.
int RenderOpaqueGeometry(vtkViewport *viewport) override
Methods required by superclass.
vtkTypeBool HasTranslucentPolygonalGeometry() override
Methods required by superclass.
void SliderValueChanged(int sliderNum)
This method is invoked by the vtkCheckerboardWidget() when a value of some slider has changed.
void SetRightRepresentation(vtkSliderRepresentation3D *)
Set and get the instances of vtkSliderRepresentation used to implement this representation.
vtkSliderRepresentation3D * RightRepresentation
vtkSliderRepresentation3D * LeftRepresentation
void SetLeftRepresentation(vtkSliderRepresentation3D *)
Set and get the instances of vtkSliderRepresentation used to implement this representation.
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
Methods required by superclass.
void BuildRepresentation() override
Methods required by superclass.
void SetBottomRepresentation(vtkSliderRepresentation3D *)
Set and get the instances of vtkSliderRepresentation used to implement this representation.
vtkSliderRepresentation3D * TopRepresentation
~vtkCheckerboardRepresentation() override
void ReleaseGraphicsResources(vtkWindow *w) override
Methods required by superclass.
vtkSliderRepresentation3D * BottomRepresentation
void SetTopRepresentation(vtkSliderRepresentation3D *)
Set and get the instances of vtkSliderRepresentation used to implement this representation.
static vtkCheckerboardRepresentation * New()
Instantiate class.
draw an image in a rendered 3D scene
show two images at once using a checkboard pattern
a simple class to control print indentation
Definition: vtkIndent.h:120
an ordered list of Props
provide the representation for a vtkSliderWidget with a 3D skin
abstract specification for Viewports
Definition: vtkViewport.h:57
abstract class defines interface between the widget and widget representation classes
window superclass for vtkRenderWindow
Definition: vtkWindow.h:40
int vtkTypeBool
Definition: vtkABI.h:71