VTK: Interaction/Widgets/vtkCheckerboardRepresentation.h Source File

| VTK 9.3.1

vtkCheckerboardRepresentation.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
32 #ifndef vtkCheckerboardRepresentation_h
33 #define vtkCheckerboardRepresentation_h
34
35 #include "vtkInteractionWidgetsModule.h" // For export macro
36 #include "vtkWidgetRepresentation.h"
37
38 VTK_ABI_NAMESPACE_BEGIN
39 class vtkImageCheckerboard;
40 class vtkImageActor;
41 class vtkSliderRepresentation3D;
42
43 class VTKINTERACTIONWIDGETS_EXPORT vtkCheckerboardRepresentation : public vtkWidgetRepresentation
44 {
45 public:
49 static vtkCheckerboardRepresentation* New();
50
52
55 vtkTypeMacro(vtkCheckerboardRepresentation, vtkWidgetRepresentation);
56 void PrintSelf(ostream& os, vtkIndent indent) 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 {
87 TopSlider = 0,
88 RightSlider,
89 BottomSlider,
90 LeftSlider
91 };
92
97 void SliderValueChanged(int sliderNum);
98
100
105 void SetTopRepresentation(vtkSliderRepresentation3D*);
106 void SetRightRepresentation(vtkSliderRepresentation3D*);
107 void SetBottomRepresentation(vtkSliderRepresentation3D*);
108 void SetLeftRepresentation(vtkSliderRepresentation3D*);
109 vtkGetObjectMacro(TopRepresentation, vtkSliderRepresentation3D);
110 vtkGetObjectMacro(RightRepresentation, vtkSliderRepresentation3D);
111 vtkGetObjectMacro(BottomRepresentation, vtkSliderRepresentation3D);
112 vtkGetObjectMacro(LeftRepresentation, vtkSliderRepresentation3D);
114
116
119 void BuildRepresentation() override;
120 void GetActors(vtkPropCollection*) override;
121 void ReleaseGraphicsResources(vtkWindow* w) override;
122 int RenderOverlay(vtkViewport* viewport) override;
123 int RenderOpaqueGeometry(vtkViewport* viewport) override;
124 int RenderTranslucentPolygonalGeometry(vtkViewport* viewport) override;
125 vtkTypeBool HasTranslucentPolygonalGeometry() override;
127
128 protected:
129 vtkCheckerboardRepresentation();
130 ~vtkCheckerboardRepresentation() override;
131
132 // Instances that this class manipulates
133 vtkImageCheckerboard* Checkerboard;
134 vtkImageActor* ImageActor;
135
136 // The internal widgets for each side
137 vtkSliderRepresentation3D* TopRepresentation;
138 vtkSliderRepresentation3D* RightRepresentation;
139 vtkSliderRepresentation3D* BottomRepresentation;
140 vtkSliderRepresentation3D* LeftRepresentation;
141
142 // The corner offset
143 double CornerOffset;
144
145 // Direction index of image actor's plane normal
146 int OrthoAxis;
147
148 private:
149 vtkCheckerboardRepresentation(const vtkCheckerboardRepresentation&) = delete;
150 void operator=(const vtkCheckerboardRepresentation&) = delete;
151 };
152
153 VTK_ABI_NAMESPACE_END
154 #endif
vtkCheckerboardRepresentation
represent the vtkCheckerboardWidget
Definition: vtkCheckerboardRepresentation.h:44
vtkCheckerboardRepresentation::RightSlider
@ RightSlider
Definition: vtkCheckerboardRepresentation.h:88
vtkCheckerboardRepresentation::BottomSlider
@ BottomSlider
Definition: vtkCheckerboardRepresentation.h:89
vtkCheckerboardRepresentation::SetImageActor
void SetImageActor(vtkImageActor *imageActor)
Specify an instance of vtkImageActor to decorate.
vtkCheckerboardRepresentation::RenderOverlay
int RenderOverlay(vtkViewport *viewport) override
Methods required by superclass.
vtkCheckerboardRepresentation::ImageActor
vtkImageActor * ImageActor
Definition: vtkCheckerboardRepresentation.h:134
vtkCheckerboardRepresentation::CornerOffset
double CornerOffset
Definition: vtkCheckerboardRepresentation.h:143
vtkCheckerboardRepresentation::GetActors
void GetActors(vtkPropCollection *) override
Methods required by superclass.
vtkCheckerboardRepresentation::OrthoAxis
int OrthoAxis
Definition: vtkCheckerboardRepresentation.h:146
vtkCheckerboardRepresentation::SetCheckerboard
void SetCheckerboard(vtkImageCheckerboard *chkrbrd)
Specify an instance of vtkImageCheckerboard to manipulate.
vtkCheckerboardRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard VTK methods.
vtkCheckerboardRepresentation::RenderOpaqueGeometry
int RenderOpaqueGeometry(vtkViewport *viewport) override
Methods required by superclass.
vtkCheckerboardRepresentation::HasTranslucentPolygonalGeometry
vtkTypeBool HasTranslucentPolygonalGeometry() override
Methods required by superclass.
vtkCheckerboardRepresentation::SliderValueChanged
void SliderValueChanged(int sliderNum)
This method is invoked by the vtkCheckerboardWidget() when a value of some slider has changed.
vtkCheckerboardRepresentation::SetRightRepresentation
void SetRightRepresentation(vtkSliderRepresentation3D *)
Set and get the instances of vtkSliderRepresentation used to implement this representation.
vtkCheckerboardRepresentation::RightRepresentation
vtkSliderRepresentation3D * RightRepresentation
Definition: vtkCheckerboardRepresentation.h:138
vtkCheckerboardRepresentation::LeftRepresentation
vtkSliderRepresentation3D * LeftRepresentation
Definition: vtkCheckerboardRepresentation.h:140
vtkCheckerboardRepresentation::Checkerboard
vtkImageCheckerboard * Checkerboard
Definition: vtkCheckerboardRepresentation.h:133
vtkCheckerboardRepresentation::SetLeftRepresentation
void SetLeftRepresentation(vtkSliderRepresentation3D *)
Set and get the instances of vtkSliderRepresentation used to implement this representation.
vtkCheckerboardRepresentation::RenderTranslucentPolygonalGeometry
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
Methods required by superclass.
vtkCheckerboardRepresentation::BuildRepresentation
void BuildRepresentation() override
Methods required by superclass.
vtkCheckerboardRepresentation::SetBottomRepresentation
void SetBottomRepresentation(vtkSliderRepresentation3D *)
Set and get the instances of vtkSliderRepresentation used to implement this representation.
vtkCheckerboardRepresentation::TopRepresentation
vtkSliderRepresentation3D * TopRepresentation
Definition: vtkCheckerboardRepresentation.h:137
vtkCheckerboardRepresentation::~vtkCheckerboardRepresentation
~vtkCheckerboardRepresentation() override
vtkCheckerboardRepresentation::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *w) override
Methods required by superclass.
vtkCheckerboardRepresentation::BottomRepresentation
vtkSliderRepresentation3D * BottomRepresentation
Definition: vtkCheckerboardRepresentation.h:139
vtkCheckerboardRepresentation::SetTopRepresentation
void SetTopRepresentation(vtkSliderRepresentation3D *)
Set and get the instances of vtkSliderRepresentation used to implement this representation.
vtkCheckerboardRepresentation::New
static vtkCheckerboardRepresentation * New()
Instantiate class.
vtkCheckerboardRepresentation::vtkCheckerboardRepresentation
vtkCheckerboardRepresentation()
vtkImageActor
draw an image in a rendered 3D scene
Definition: vtkImageActor.h:47
vtkImageCheckerboard
show two images at once using a checkboard pattern
Definition: vtkImageCheckerboard.h:34
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkPropCollection
an ordered list of Props
Definition: vtkPropCollection.h:37
vtkSliderRepresentation3D
provide the representation for a vtkSliderWidget with a 3D skin
Definition: vtkSliderRepresentation3D.h:52
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:54
vtkWidgetRepresentation
abstract class defines interface between the widget and widget representation classes
Definition: vtkWidgetRepresentation.h:65
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
vtkWidgetRepresentation.h