VTK  9.0.20201030
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
vtkWidgetRepresentation.h
vtkWidgetRepresentation::GetActors
void GetActors(vtkPropCollection *) override
For some exporters and other other operations we must be able to collect all the actors or volumes.
Definition: vtkWidgetRepresentation.h:210
vtkSliderRepresentation3D
provide the representation for a vtkSliderWidget with a 3D skin
Definition: vtkSliderRepresentation3D.h:48
vtkCheckerboardRepresentation::RightSlider
Definition: vtkCheckerboardRepresentation.h:87
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkImageCheckerboard
show two images at once using a checkboard pattern
Definition: vtkImageCheckerboard.h:32
vtkWidgetRepresentation
abstract class defines interface between the widget and widget representation classes
Definition: vtkWidgetRepresentation.h:59
vtkCheckerboardRepresentation::CornerOffset
double CornerOffset
Definition: vtkCheckerboardRepresentation.h:142
vtkCheckerboardRepresentation::ImageActor
vtkImageActor * ImageActor
Definition: vtkCheckerboardRepresentation.h:133
vtkWidgetRepresentation::BuildRepresentation
virtual void BuildRepresentation()=0
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38
vtkCheckerboardRepresentation
represent the vtkCheckerboardWidget
Definition: vtkCheckerboardRepresentation.h:42
vtkWidgetRepresentation::RenderTranslucentPolygonalGeometry
int RenderTranslucentPolygonalGeometry(vtkViewport *vtkNotUsed(viewport)) override
Definition: vtkWidgetRepresentation.h:216
vtkCheckerboardRepresentation::LeftRepresentation
vtkSliderRepresentation3D * LeftRepresentation
Definition: vtkCheckerboardRepresentation.h:139
vtkWidgetRepresentation::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
Definition: vtkWidgetRepresentation.h:213
vtkCheckerboardRepresentation::TopRepresentation
vtkSliderRepresentation3D * TopRepresentation
Definition: vtkCheckerboardRepresentation.h:136
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:44
vtkWidgetRepresentation::RenderOverlay
int RenderOverlay(vtkViewport *vtkNotUsed(viewport)) override
Definition: vtkWidgetRepresentation.h:214
vtkWidgetRepresentation::RenderOpaqueGeometry
int RenderOpaqueGeometry(vtkViewport *vtkNotUsed(viewport)) override
Definition: vtkWidgetRepresentation.h:215
vtkCheckerboardRepresentation::OrthoAxis
int OrthoAxis
Definition: vtkCheckerboardRepresentation.h:145
vtkCheckerboardRepresentation::BottomSlider
Definition: vtkCheckerboardRepresentation.h:88
vtkImageActor
draw an image in a rendered 3D scene
Definition: vtkImageActor.h:42
vtkCheckerboardRepresentation::Checkerboard
vtkImageCheckerboard * Checkerboard
Definition: vtkCheckerboardRepresentation.h:132
vtkWidgetRepresentation::HasTranslucentPolygonalGeometry
vtkTypeBool HasTranslucentPolygonalGeometry() override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkWidgetRepresentation.h:218
vtkPropCollection
an ordered list of Props
Definition: vtkPropCollection.h:35
vtkCheckerboardRepresentation::BottomRepresentation
vtkSliderRepresentation3D * BottomRepresentation
Definition: vtkCheckerboardRepresentation.h:138
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkCheckerboardRepresentation::RightRepresentation
vtkSliderRepresentation3D * RightRepresentation
Definition: vtkCheckerboardRepresentation.h:137
vtkWidgetRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.