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 
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 
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
vtkPistonScalarsColors::SetTableRange
void SetTableRange(double range[2])
Set/Get the minimum/maximum scalar values for scalar mapping.
vtkPistonScalarsColors
Color Mapping for piston results.
Definition: vtkPistonScalarsColors.h:35
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:36
vtkPistonScalarsColors::ComputeColorsTime
vtkTimeStamp ComputeColorsTime
Definition: vtkPistonScalarsColors.h:108
vtkX3D::range
@ range
Definition: vtkX3D.h:238
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:60
vtkPistonScalarsColors::ComputeScalarsColorsf
virtual std::vector< float > * ComputeScalarsColorsf(int numberOfChanels)
Compute scalars to colors as floats.
vtkPistonScalarsColors::NumberOfValues
int NumberOfValues
Definition: vtkPistonScalarsColors.h:106
vtkPistonScalarsColors::ComputeValues
void ComputeValues(float *values)
Internal helper method.
vtkPistonScalarsColors::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkPistonScalarsColors::ScalarsColorsf
std::vector< float > ScalarsColorsf
Definition: vtkPistonScalarsColors.h:112
vtkPistonScalarsColors::New
static vtkPistonScalarsColors * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkPistonScalarsColors::SetTableRange
virtual void SetTableRange(double rmin, double rmax)
vtkPistonScalarsColors::LookupTable
vtkScalarsToColors * LookupTable
Definition: vtkPistonScalarsColors.h:114
vtkScalarsToColors
Superclass for mapping scalar values to colors.
Definition: vtkScalarsToColors.h:67
vtkObject.h
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkPistonScalarsColors::ScalarsColors
std::vector< unsigned char > ScalarsColors
Definition: vtkPistonScalarsColors.h:109
vtkPistonScalarsColors::SetLookupTable
virtual void SetLookupTable(vtkScalarsToColors *)
Set lookup table to be used to map scalars to colors.
vtkPistonScalarsColors::ComputeScalarsColors
virtual std::vector< unsigned char > * ComputeScalarsColors(int numberOfChanels)
Compute scalars to colors as unsigned char.
vtkPistonScalarsColors::ComputeColorsfTime
vtkTimeStamp ComputeColorsfTime
Definition: vtkPistonScalarsColors.h:111
vtkPistonScalarsColors::~vtkPistonScalarsColors
~vtkPistonScalarsColors()
vtkPistonScalarsColors::vtkPistonScalarsColors
vtkPistonScalarsColors()