VTK  9.0.1
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 class VTKINTERACTIONWIDGETS_EXPORT vtkCheckerboardRepresentation : public vtkWidgetRepresentation
43 {
44 public:
49 
51 
55  void PrintSelf(ostream& os, vtkIndent indent) override;
57 
59 
62  void SetCheckerboard(vtkImageCheckerboard* chkrbrd);
63  vtkGetObjectMacro(Checkerboard, vtkImageCheckerboard);
65 
67 
70  void SetImageActor(vtkImageActor* imageActor);
71  vtkGetObjectMacro(ImageActor, vtkImageActor);
73 
75 
80  vtkSetClampMacro(CornerOffset, double, 0.0, 0.4);
81  vtkGetMacro(CornerOffset, double);
83 
84  enum
85  {
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() override;
119  void GetActors(vtkPropCollection*) override;
120  void ReleaseGraphicsResources(vtkWindow* w) override;
121  int RenderOverlay(vtkViewport* viewport) override;
122  int RenderOpaqueGeometry(vtkViewport* viewport) override;
123  int RenderTranslucentPolygonalGeometry(vtkViewport* viewport) override;
126 
127 protected:
129  ~vtkCheckerboardRepresentation() override;
130 
131  // Instances that this class manipulates
134 
135  // The internal widgets for each side
140 
141  // The corner offset
142  double CornerOffset;
143 
144  // Direction index of image actor's plane normal
146 
147 private:
149  void operator=(const vtkCheckerboardRepresentation&) = delete;
150 };
151 
152 #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: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
int vtkTypeBool
Definition: vtkABI.h:69
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
vtkSliderRepresentation3D * LeftRepresentation
int RenderTranslucentPolygonalGeometry(vtkViewport *vtkNotUsed(viewport)) override
vtkSliderRepresentation3D * TopRepresentation
draw an image in a rendered 3D scene
Definition: vtkImageActor.h:42
a simple class to control print indentation
Definition: vtkIndent.h:33
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...
int RenderOpaqueGeometry(vtkViewport *vtkNotUsed(viewport)) override
int RenderOverlay(vtkViewport *vtkNotUsed(viewport)) override
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
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