VTK
vtkPistonScalarsColors.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPistonScalarsColors.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 =========================================================================*/
23 #ifndef __vtkPistonScalarsColors_h
24 #define __vtkPistonScalarsColors_h
25 
26 #include "vtkAcceleratorsPistonModule.h" // For export macro
27 #include <vtkObject.h>
28 
29 #include <vector> // vector is required
30 
31 class vtkScalarsToColors;
32 
33 class VTKACCELERATORSPISTON_EXPORT vtkPistonScalarsColors : public vtkObject
34 {
35 public:
37 
40  static vtkPistonScalarsColors *New();
41 
46  virtual void PrintSelf(ostream &os, vtkIndent indent);
47 
49 
50  vtkSetMacro(NumberOfValues, int);
51  // Get number of distinct color values
52  vtkGetMacro(NumberOfValues, int);
54 
56 
60  void SetTableRange(double range[2]);
61  virtual void SetTableRange(double rmin, double rmax);
62  vtkGetVectorMacro(TableRange, double, 2);
64 
66 
67  virtual void SetLookupTable(vtkScalarsToColors *);
70 
72 
74  virtual std::vector<unsigned char>* ComputeScalarsColors(
75  int numberOfChanels);
77 
80  virtual std::vector<float>* ComputeScalarsColorsf(int numberOfChanels);
81 
82 
83 protected:
86 
88  void ComputeValues(float *values);
89 
90  double TableRange[2];
92 
94  std::vector<unsigned char> ScalarsColors;
95 
97  std::vector<float> ScalarsColorsf;
98 
100 
101 private:
102  vtkPistonScalarsColors(const vtkPistonScalarsColors&); // Not implemented.
103  void operator=(const vtkPistonScalarsColors&); // Not implemented.
104 };
105 
106 #endif // __vtkPistonScalarsColors_h
std::vector< float > ScalarsColorsf
abstract base class for most VTK objects
Definition: vtkObject.h:61
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:83
record modification and/or execution time
Definition: vtkTimeStamp.h:34
vtkScalarsToColors * LookupTable
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:619
std::vector< unsigned char > ScalarsColors
Superclass for mapping scalar values to colors.
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
GLboolean GLenum GLenum GLvoid * values
Definition: vtkgl.h:11354
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:222
Color Mapping for piston results.
static vtkObject * New()
#define vtkGetVectorMacro(name, type, count)
Definition: vtkSetGet.h:414
GLenum GLint * range
Definition: vtkgl.h:14180
#define vtkSetMacro(name, type)
Definition: vtkSetGet.h:69