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 =========================================================================*/
24 #ifndef vtkPistonScalarsColors_h
25 #define vtkPistonScalarsColors_h
26 
27 #include "vtkAcceleratorsPistonModule.h" // For export macro
28 #include "vtkObject.h"
29 
30 #include <vector> // vector is required
31 
32 class vtkScalarsToColors;
33 
34 class VTKACCELERATORSPISTON_EXPORT vtkPistonScalarsColors : public vtkObject
35 {
36 public:
38 
43  static vtkPistonScalarsColors *New();
44 
51  virtual void PrintSelf(ostream &os, vtkIndent indent);
52 
54 
57  vtkSetMacro(NumberOfValues, int);
58  // Get number of distinct color values
59  vtkGetMacro(NumberOfValues, int);
61 
63 
69  void SetTableRange(double range[2]);
70  virtual void SetTableRange(double rmin, double rmax);
71  vtkGetVectorMacro(TableRange, double, 2);
73 
75 
78  virtual void SetLookupTable(vtkScalarsToColors *);
79  vtkGetObjectMacro(LookupTable, vtkScalarsToColors);
81 
86  virtual std::vector<unsigned char>* ComputeScalarsColors(
87  int numberOfChanels);
88 
93  virtual std::vector<float>* ComputeScalarsColorsf(int numberOfChanels);
94 
95 
96 protected:
99 
103  void ComputeValues(float *values);
104 
105  double TableRange[2];
107 
109  std::vector<unsigned char> ScalarsColors;
110 
112  std::vector<float> ScalarsColorsf;
113 
115 
116 private:
117  vtkPistonScalarsColors(const vtkPistonScalarsColors&) VTK_DELETE_FUNCTION;
118  void operator=(const vtkPistonScalarsColors&) VTK_DELETE_FUNCTION;
119 };
120 
121 #endif // vtkPistonScalarsColors_h
std::vector< float > ScalarsColorsf
abstract base class for most VTK objects
Definition: vtkObject.h:59
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
record modification and/or execution time
Definition: vtkTimeStamp.h:35
vtkScalarsToColors * LookupTable
std::vector< unsigned char > ScalarsColors
Superclass for mapping scalar values to colors.
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
Color Mapping for piston results.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...