VTK
vtkValuePainter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkValuePainter.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 =========================================================================*/
28 #ifndef vtkValuePainter_h
29 #define vtkValuePainter_h
30 
31 #include "vtkRenderingOpenGLModule.h" // For export macro
33 
37 
38 class VTKRENDERINGOPENGL_EXPORT vtkValuePainter :
40 {
41 public:
42  static vtkValuePainter* New();
44  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
45 
47 
53  void SetInputArrayToProcess(int fieldAssociation, const char *name);
54  void SetInputArrayToProcess(int fieldAssociation, int fieldAttributeType);
56 
62  void SetInputComponentToProcess(int comp);
63 
68  void SetScalarRange(double min, double max);
69 
71 
75  static vtkInformationIntegerKey* SCALAR_MODE();
76  static vtkInformationDoubleVectorKey* SCALAR_RANGE();
77  static vtkInformationIntegerKey* ARRAY_ID();
78  static vtkInformationStringKey* ARRAY_NAME();
79  static vtkInformationIntegerKey* ARRAY_COMPONENT();
81 
86  static void ValueToColor(double value, double min, double scale,
87  unsigned char *color);
88 
89  static void ColorToValue(unsigned char *color, double min, double scale,
90  double &value);
91 
92 protected:
94  ~vtkValuePainter() VTK_OVERRIDE;
95 
99  void ProcessInformation(vtkInformation*) VTK_OVERRIDE;
100 
104  void RenderInternal(vtkRenderer* renderer, vtkActor* actor,
105  unsigned long typeflags, bool forceCompileOnly) VTK_OVERRIDE;
106 
111  void DrawCells(int mode, vtkCellArray *connectivity,
112  vtkIdType startCellId, vtkRenderer *renderer);
113 
114 private:
115  vtkValuePainter(const vtkValuePainter&) VTK_DELETE_FUNCTION;
116  void operator=(const vtkValuePainter&) VTK_DELETE_FUNCTION;
117 
118  class vtkInternals;
119  vtkInternals *Internals;
120 };
121 
122 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:45
A standard implementation of vtkPolyDataPainter.
Store vtkAlgorithm input/output information.
abstract specification for renderers
Definition: vtkRenderer.h:57
int vtkIdType
Definition: vtkType.h:345
Key for string values in vtkInformation.
Key for double vector values.
a simple class to control print indentation
Definition: vtkIndent.h:33
Key for integer values in vtkInformation.
object to represent cell connectivity
Definition: vtkCellArray.h:44
painter that renders arrays encoded into pixel colors.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
#define max(a, b)
static vtkStandardPolyDataPainter * New()