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
vtkInformationStringKey
Key for string values in vtkInformation.
Definition: vtkInformationStringKey.h:36
vtkX3D::component
@ component
Definition: vtkX3D.h:175
vtkFloatArray
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:41
vtkX3D::data
@ data
Definition: vtkX3D.h:315
vtkValuePass::Mode
Mode
Definition: vtkValuePass.h:54
vtkDefaultPass::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkDefaultPass.h
vtkDefaultPass
Implement the basic render passes.
Definition: vtkDefaultPass.h:46
max
#define max(a, b)
Definition: vtkX3DExporterFIWriterHelper.h:31
vtkDefaultPass::New
static vtkDefaultPass * New()
vtkX3D::height
@ height
Definition: vtkX3D.h:254
vtkInformationIntegerKey
Key for integer values in vtkInformation.
Definition: vtkInformationIntegerKey.h:34
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkX3D::name
@ name
Definition: vtkX3D.h:219
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkValuePass
Render opaque objects with the vtkValuePainter.
Definition: vtkValuePass.h:34
vtkInformationDoubleVectorKey
Key for double vector values.
Definition: vtkInformationDoubleVectorKey.h:34
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:63
vtkDefaultPass::RenderOpaqueGeometry
virtual void RenderOpaqueGeometry(const vtkRenderState *s)
Opaque pass without key checking.
vtkRenderWindow
create a window for renderers to draw into
Definition: vtkRenderWindow.h:86
vtkValuePass::RenderingMode
int RenderingMode
Definition: vtkValuePass.h:153
vtkRenderState
Context in which a vtkRenderPass will render.
Definition: vtkRenderState.h:40
vtkDefaultPass::Render
virtual void Render(const vtkRenderState *s)
Perform rendering according to a render state s.