VTK
vtkValuePass.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkValuePass.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 =========================================================================*/
40 #ifndef vtkValuePass_h
41 #define vtkValuePass_h
42 
43 #include "vtkRenderingOpenGL2Module.h" // For export macro
44 #include "vtkDefaultPass.h"
45 
49 class vtkRenderer;
50 class vtkRenderWindow;
51 class vtkFloatArray;
52 
53 class VTKRENDERINGOPENGL2_EXPORT vtkValuePass : public vtkDefaultPass
54 {
55 public:
56 
57  enum Mode {
58  INVERTIBLE_LUT = 1,
59  FLOATING_POINT = 2 };
60 
61  static vtkValuePass *New();
62  vtkTypeMacro(vtkValuePass, vtkDefaultPass);
63  void PrintSelf(ostream& os, vtkIndent indent);
64 
65  static vtkInformationIntegerKey *RENDER_VALUES();
66 
67  vtkSetMacro(RenderingMode, int);
68  vtkGetMacro(RenderingMode, int);
69  void SetInputArrayToProcess(int fieldAssociation, const char *name);
70  void SetInputArrayToProcess(int fieldAssociation, int fieldAttributeType);
71  void SetInputComponentToProcess(int component);
72  void SetScalarRange(double min, double max);
73 
75 
78  static vtkInformationIntegerKey *SCALAR_MODE();
79  static vtkInformationIntegerKey *ARRAY_MODE();
80  static vtkInformationIntegerKey *ARRAY_ID();
81  static vtkInformationStringKey *ARRAY_NAME();
82  static vtkInformationIntegerKey *ARRAY_COMPONENT();
83  static vtkInformationDoubleVectorKey *SCALAR_RANGE();
84  static vtkInformationIntegerKey *RELOAD_DATA();
86 
91  virtual void Render(const vtkRenderState *s);
92 
98  vtkFloatArray* GetFloatImageDataArray(vtkRenderer* ren);
99 
105  void GetFloatImageData(int const format, int const width, int const height,
106  void* data);
107 
112  int* GetFloatImageExtents();
113 
114  bool IsFloatingPointModeSupported(vtkRenderWindow* renWin);
115 
116  protected:
120  vtkValuePass();
121 
125  virtual ~vtkValuePass();
126 
131  virtual void RenderOpaqueGeometry(const vtkRenderState *s);
132 
137  void BeginPass(vtkRenderer* ren);
138 
142  void EndPass();
143 
145 
148  bool HasWindowSizeChanged(vtkRenderer* ren);
149  bool InitializeFloatingPointMode(vtkRenderer* ren);
150  void ReleaseFloatingPointMode(vtkRenderer* ren);
152 
153 
154  class vtkInternals;
155  vtkInternals *Internals;
157 
158  private:
159  vtkValuePass(const vtkValuePass&) VTK_DELETE_FUNCTION;
160  void operator=(const vtkValuePass&) VTK_DELETE_FUNCTION;
161 
162 };
163 
164 #endif
virtual void Render(const vtkRenderState *s)
Perform rendering according to a render state s.
static vtkDefaultPass * New()
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:41
abstract specification for renderers
Definition: vtkRenderer.h:63
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
Key for string values in vtkInformation.
Context in which a vtkRenderPass will render.
Key for double vector values.
a simple class to control print indentation
Definition: vtkIndent.h:39
Key for integer values in vtkInformation.
Render opaque objects with the vtkValuePainter.
Definition: vtkValuePass.h:31
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
create a window for renderers to draw into
virtual void RenderOpaqueGeometry(const vtkRenderState *s)
Opaque pass without key checking.
Implement the basic render passes.
#define max(a, b)