VTK
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 =========================================================================*/
35 #ifndef vtkCheckerboardRepresentation_h
36 #define vtkCheckerboardRepresentation_h
37 
38 #include "vtkInteractionWidgetsModule.h" // For export macro
40 
42 class vtkImageActor;
44 
45 
46 class VTKINTERACTIONWIDGETS_EXPORT vtkCheckerboardRepresentation : public vtkWidgetRepresentation
47 {
48 public:
53 
55 
59  void PrintSelf(ostream& os, vtkIndent indent) override;
61 
63 
66  void SetCheckerboard(vtkImageCheckerboard *chkrbrd);
67  vtkGetObjectMacro(Checkerboard,vtkImageCheckerboard);
69 
71 
74  void SetImageActor(vtkImageActor *imageActor);
75  vtkGetObjectMacro(ImageActor,vtkImageActor);
77 
79 
84  vtkSetClampMacro(CornerOffset,double,0.0,0.4);
85  vtkGetMacro(CornerOffset,double);
87 
88  enum {
89  TopSlider=0,
92  LeftSlider
93  };
94 
99  void SliderValueChanged(int sliderNum);
100 
102 
107  void SetTopRepresentation(vtkSliderRepresentation3D*);
108  void SetRightRepresentation(vtkSliderRepresentation3D*);
109  void SetBottomRepresentation(vtkSliderRepresentation3D*);
110  void SetLeftRepresentation(vtkSliderRepresentation3D*);
111  vtkGetObjectMacro(TopRepresentation,vtkSliderRepresentation3D);
112  vtkGetObjectMacro(RightRepresentation,vtkSliderRepresentation3D);
113  vtkGetObjectMacro(BottomRepresentation,vtkSliderRepresentation3D);
114  vtkGetObjectMacro(LeftRepresentation,vtkSliderRepresentation3D);
116 
118 
121  void BuildRepresentation() override;
122  void GetActors(vtkPropCollection*) override;
123  void ReleaseGraphicsResources(vtkWindow *w) override;
124  int RenderOverlay(vtkViewport *viewport) override;
125  int RenderOpaqueGeometry(vtkViewport *viewport) override;
126  int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override;
129 
130 protected:
132  ~vtkCheckerboardRepresentation() override;
133 
134  // Instances that this class manipulates
137 
138  // The internal widgets for each side
143 
144  // The corner offset
145  double CornerOffset;
146 
147  // Direction index of image actor's plane normal
149 
150 private:
152  void operator=(const vtkCheckerboardRepresentation&) = delete;
153 };
154 
155 #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:47
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:49
a simple class to control print indentation
Definition: vtkIndent.h:39
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