VTK  9.1.0
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=========================================================================*/
41#ifndef vtkCheckerboardRepresentation_h
42#define vtkCheckerboardRepresentation_h
43
44#include "vtkInteractionWidgetsModule.h" // For export macro
46
48class vtkImageActor;
50
51class VTKINTERACTIONWIDGETS_EXPORT vtkCheckerboardRepresentation : public vtkWidgetRepresentation
52{
53public:
58
60
64 void PrintSelf(ostream& os, vtkIndent indent) override;
66
68
72 vtkGetObjectMacro(Checkerboard, vtkImageCheckerboard);
74
76
79 void SetImageActor(vtkImageActor* imageActor);
80 vtkGetObjectMacro(ImageActor, vtkImageActor);
82
84
89 vtkSetClampMacro(CornerOffset, double, 0.0, 0.4);
90 vtkGetMacro(CornerOffset, double);
92
93 enum
94 {
95 TopSlider = 0,
98 LeftSlider
99 };
100
105 void SliderValueChanged(int sliderNum);
106
108
117 vtkGetObjectMacro(TopRepresentation, vtkSliderRepresentation3D);
118 vtkGetObjectMacro(RightRepresentation, vtkSliderRepresentation3D);
119 vtkGetObjectMacro(BottomRepresentation, vtkSliderRepresentation3D);
120 vtkGetObjectMacro(LeftRepresentation, vtkSliderRepresentation3D);
122
124
127 void BuildRepresentation() override;
130 int RenderOverlay(vtkViewport* viewport) override;
131 int RenderOpaqueGeometry(vtkViewport* viewport) override;
135
136protected:
139
140 // Instances that this class manipulates
143
144 // The internal widgets for each side
149
150 // The corner offset
152
153 // Direction index of image actor's plane normal
155
156private:
158 void operator=(const vtkCheckerboardRepresentation&) = delete;
159};
160
161#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 vtkSliderRepresention used to implement this representation.
vtkSliderRepresentation3D * RightRepresentation
vtkSliderRepresentation3D * LeftRepresentation
void SetLeftRepresentation(vtkSliderRepresentation3D *)
Set and get the instances of vtkSliderRepresention 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 vtkSliderRepresention 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 vtkSliderRepresention used to implement this representation.
static vtkCheckerboardRepresentation * New()
Instantiate class.
draw an image in a rendered 3D scene
Definition: vtkImageActor.h:52
show two images at once using a checkboard pattern
a simple class to control print indentation
Definition: vtkIndent.h:43
an ordered list of Props
provide the representation for a vtkSliderWidget with a 3D skin
abstract specification for Viewports
Definition: vtkViewport.h:56
abstract class defines interface between the widget and widget representation classes
window superclass for vtkRenderWindow
Definition: vtkWindow.h:45
int vtkTypeBool
Definition: vtkABI.h:69