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 =========================================================================*/
37 #ifndef vtkValuePass_h
38 #define vtkValuePass_h
39 
40 #include "vtkRenderingOpenGL2Module.h" // For export macro
41 #include "vtkDefaultPass.h"
42 
46 class vtkRenderer;
47 class vtkRenderWindow;
48 class vtkFloatArray;
49 
50 class VTKRENDERINGOPENGL2_EXPORT vtkValuePass : public vtkDefaultPass
51 {
52 public:
53 
54  enum Mode {
55  INVERTIBLE_LUT = 1,
56  FLOATING_POINT = 2 };
57 
58  static vtkValuePass *New();
59  vtkTypeMacro(vtkValuePass, vtkDefaultPass);
60  void PrintSelf(ostream& os, vtkIndent indent);
61 
62  static vtkInformationIntegerKey *RENDER_VALUES();
63 
64  vtkSetMacro(RenderingMode, int);
65  vtkGetMacro(RenderingMode, int);
66  void SetInputArrayToProcess(int fieldAssociation, const char *name);
67  void SetInputArrayToProcess(int fieldAssociation, int fieldAttributeType);
68  void SetInputComponentToProcess(int component);
69  void SetScalarRange(double min, double max);
70 
72 
75  static vtkInformationIntegerKey *SCALAR_MODE();
76  static vtkInformationIntegerKey *ARRAY_MODE();
77  static vtkInformationIntegerKey *ARRAY_ID();
78  static vtkInformationStringKey *ARRAY_NAME();
79  static vtkInformationIntegerKey *ARRAY_COMPONENT();
80  static vtkInformationDoubleVectorKey *SCALAR_RANGE();
81  static vtkInformationIntegerKey *RELOAD_DATA();
83 
88  virtual void Render(const vtkRenderState *s);
89 
95  vtkFloatArray* GetFloatImageDataArray(vtkRenderer* ren);
96 
102  void GetFloatImageData(int const format, int const width, int const height,
103  void* data);
104 
109  int* GetFloatImageExtents();
110 
111  bool IsFloatingPointModeSupported(vtkRenderWindow* renWin);
112 
113  protected:
117  vtkValuePass();
118 
122  virtual ~vtkValuePass();
123 
128  virtual void RenderOpaqueGeometry(const vtkRenderState *s);
129 
134  void BeginPass(vtkRenderer* ren);
135 
139  void EndPass();
140 
142 
145  bool HasWindowSizeChanged(vtkRenderer* ren);
146  bool InitializeFloatingPointMode(vtkRenderer* ren);
147  void ReleaseFloatingPointMode(vtkRenderer* ren);
149 
150 
151  class vtkInternals;
152  vtkInternals *Internals;
154 
155  private:
156  vtkValuePass(const vtkValuePass&) VTK_DELETE_FUNCTION;
157  void operator=(const vtkValuePass&) VTK_DELETE_FUNCTION;
158 
159 };
160 
161 #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:34
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)