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 
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 
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
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkPistonScalarsColors::SetTableRange
void SetTableRange(double range[2])
vtkPistonScalarsColors
Color Mapping for piston results.
Definition: vtkPistonScalarsColors.h:34
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:35
vtkPistonScalarsColors::ComputeColorsTime
vtkTimeStamp ComputeColorsTime
Definition: vtkPistonScalarsColors.h:93
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkGetVectorMacro
#define vtkGetVectorMacro(name, type, count)
Definition: vtkSetGet.h:424
vtkgl::range
GLenum GLint * range
Definition: vtkgl.h:14180
vtkPistonScalarsColors::ComputeScalarsColorsf
virtual std::vector< float > * ComputeScalarsColorsf(int numberOfChanels)
vtkPistonScalarsColors::NumberOfValues
int NumberOfValues
Definition: vtkPistonScalarsColors.h:91
vtkgl::values
GLboolean GLenum GLenum GLvoid * values
Definition: vtkgl.h:11354
vtkPistonScalarsColors::ComputeValues
void ComputeValues(float *values)
vtkPistonScalarsColors::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkPistonScalarsColors::ScalarsColorsf
std::vector< float > ScalarsColorsf
Definition: vtkPistonScalarsColors.h:97
vtkPistonScalarsColors::New
static vtkPistonScalarsColors * New()
vtkPistonScalarsColors::SetTableRange
virtual void SetTableRange(double rmin, double rmax)
vtkPistonScalarsColors::LookupTable
vtkScalarsToColors * LookupTable
Definition: vtkPistonScalarsColors.h:99
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkScalarsToColors
Superclass for mapping scalar values to colors.
Definition: vtkScalarsToColors.h:63
vtkObject.h
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkPistonScalarsColors::ScalarsColors
std::vector< unsigned char > ScalarsColors
Definition: vtkPistonScalarsColors.h:94
vtkPistonScalarsColors::SetLookupTable
virtual void SetLookupTable(vtkScalarsToColors *)
vtkPistonScalarsColors::ComputeScalarsColors
virtual std::vector< unsigned char > * ComputeScalarsColors(int numberOfChanels)
vtkPistonScalarsColors::ComputeColorsfTime
vtkTimeStamp ComputeColorsfTime
Definition: vtkPistonScalarsColors.h:96
vtkPistonScalarsColors::~vtkPistonScalarsColors
~vtkPistonScalarsColors()
vtkPistonScalarsColors::vtkPistonScalarsColors
vtkPistonScalarsColors()