VTK  9.7.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
23 #ifndef vtkCheckerboardRepresentation_h
24 #define vtkCheckerboardRepresentation_h
25 
26 #include "vtkInteractionWidgetsModule.h" // For export macro
28 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
29 
30 VTK_ABI_NAMESPACE_BEGIN
32 class vtkImageActor;
34 
35 class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkCheckerboardRepresentation
37 {
38 public:
43 
45 
49  void PrintSelf(ostream& os, vtkIndent indent) override;
51 
53 
56  void SetCheckerboard(vtkImageCheckerboard* chkrbrd);
57  vtkGetObjectMacro(Checkerboard, vtkImageCheckerboard);
59 
61 
64  void SetImageActor(vtkImageActor* imageActor);
65  vtkGetObjectMacro(ImageActor, vtkImageActor);
67 
69 
74  vtkSetClampMacro(CornerOffset, double, 0.0, 0.4);
75  vtkGetMacro(CornerOffset, double);
77 
78  enum
79  {
80  TopSlider = 0,
83  LeftSlider
84  };
85 
90  void SliderValueChanged(int sliderNum);
91 
93 
98  void SetTopRepresentation(vtkSliderRepresentation3D*);
99  void SetRightRepresentation(vtkSliderRepresentation3D*);
100  void SetBottomRepresentation(vtkSliderRepresentation3D*);
101  void SetLeftRepresentation(vtkSliderRepresentation3D*);
102  vtkGetObjectMacro(TopRepresentation, vtkSliderRepresentation3D);
103  vtkGetObjectMacro(RightRepresentation, vtkSliderRepresentation3D);
104  vtkGetObjectMacro(BottomRepresentation, vtkSliderRepresentation3D);
105  vtkGetObjectMacro(LeftRepresentation, vtkSliderRepresentation3D);
107 
109 
112  void BuildRepresentation() override;
113  void GetActors(vtkPropCollection*) override;
114  void ReleaseGraphicsResources(vtkWindow* w) override;
115  int RenderOverlay(vtkViewport* viewport) override;
116  int RenderOpaqueGeometry(vtkViewport* viewport) override;
117  int RenderTranslucentPolygonalGeometry(vtkViewport* viewport) override;
120 
121 protected:
123  ~vtkCheckerboardRepresentation() override;
124 
125  // Instances that this class manipulates
128 
129  // The internal widgets for each side
134 
135  // The corner offset
136  double CornerOffset;
137 
138  // Direction index of image actor's plane normal
140 
141 private:
143  void operator=(const vtkCheckerboardRepresentation&) = delete;
144 };
145 
146 VTK_ABI_NAMESPACE_END
147 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instances of this class.
vtkSliderRepresentation3D * BottomRepresentation
vtkSliderRepresentation3D * RightRepresentation
abstract specification for Viewports
Definition: vtkViewport.h:46
int RenderOpaqueGeometry(vtkViewport *viewport) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
abstract class defines interface between the widget and widget representation classes ...
virtual void BuildRepresentation()=0
Subclasses of vtkWidgetRepresentation must implement these methods.
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
an ordered list of Props
int vtkTypeBool
Definition: vtkABI.h:64
window superclass for vtkRenderWindow
Definition: vtkWindow.h:41
vtkSliderRepresentation3D * LeftRepresentation
vtkSliderRepresentation3D * TopRepresentation
draw an image in a rendered 3D scene
Definition: vtkImageActor.h:38
a simple class to control print indentation
Definition: vtkIndent.h:28
int RenderOverlay(vtkViewport *viewport) override
provide the representation for a vtkSliderWidget with a 3D skin
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
vtkTypeBool HasTranslucentPolygonalGeometry() override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
show two images at once using a checkboard pattern
#define VTK_MARSHALAUTO
void GetActors(vtkPropCollection *) override
For some exporters and other other operations we must be able to collect all the actors or volumes...
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
represent the vtkCheckerboardWidget