Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkColorTransferFunction Class Reference

#include <vtkColorTransferFunction.h>

Inheritance diagram for vtkColorTransferFunction:

Inheritance graph
[legend]
Collaboration diagram for vtkColorTransferFunction:

Collaboration graph
[legend]
List of all members.

Detailed Description

Defines a transfer function for mapping a property to an RGB color value.

vtkColorTransferFunction encapsulates three vtkPiecewiseFunction instances to provide a full RGB transfer function.

See also:
vtkPiecewiseFunction
Created by:
  • Avila, Lisa
CVS contributions (if > 5%):
  • Avila, Lisa (44%)
  • Martin, Ken (30%)
  • Gobbi, David (10%)
  • Barre, Sebastien (6%)
CVS logs (CVSweb):
  • .h (/Filtering/vtkColorTransferFunction.h)
  • .cxx (/Filtering/vtkColorTransferFunction.cxx)
Examples:
vtkColorTransferFunction (Examples)
Tests:
vtkColorTransferFunction (Tests)

Definition at line 56 of file vtkColorTransferFunction.h.

Public Types

typedef vtkScalarsToColors Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void DeepCopy (vtkColorTransferFunction *f)
void PrintSelf (ostream &os, vtkIndent indent)
int GetSize ()
void RemoveAllPoints ()
virtual unsigned char * MapValue (double v)
void BuildFunctionFromTable (double x1, double x2, int size, double *table)
int AddRGBPoint (double x, double r, double g, double b)
int AddHSVPoint (double x, double h, double s, double v)
int RemovePoint (double x)
void AddRGBSegment (double x1, double r1, double g1, double b1, double x2, double r2, double g2, double b2)
void AddHSVSegment (double x1, double h1, double s1, double v1, double x2, double h2, double s2, double v2)
double * GetColor (double x)
void GetColor (double x, double rgb[3])
double GetRedValue (double x)
double GetGreenValue (double x)
double GetBlueValue (double x)
virtual double * GetRange ()
virtual void GetRange (double &, double &)
virtual void GetRange (double[2])
void GetTable (double x1, double x2, int n, double *table)
void GetTable (double x1, double x2, int n, float *table)
const unsigned char * GetTable (double x1, double x2, int n)
virtual void SetClamping (int)
virtual int GetClamping ()
virtual void ClampingOn ()
virtual void ClampingOff ()
virtual void SetColorSpace (int)
void SetColorSpaceToRGB ()
void SetColorSpaceToHSV ()
void SetColorSpaceToHSVNoWrap ()
virtual int GetColorSpace ()
double * GetDataPointer ()
void FillFromDataPointer (int, double *)
virtual void MapScalarsThroughTable2 (void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputIncrement)

Static Public Member Functions

vtkColorTransferFunctionNew ()
int IsTypeOf (const char *type)
vtkColorTransferFunctionSafeDownCast (vtkObject *o)

Protected Member Functions

 vtkColorTransferFunction ()
 ~vtkColorTransferFunction ()
virtual void SetRange (double, double)
void SetRange (double rng[2])

Protected Attributes

int Clamping
int ColorSpace
double * Function
int FunctionSize
int NumberOfPoints
unsigned char UnsignedCharRGBAValue [4]
double Range [2]
vtkPiecewiseFunctionRed
vtkPiecewiseFunctionGreen
vtkPiecewiseFunctionBlue
vtkTimeStamp BuildTime
unsigned char * Table
int TableSize


Member Typedef Documentation

typedef vtkScalarsToColors vtkColorTransferFunction::Superclass
 

Reimplemented from vtkScalarsToColors.

Definition at line 60 of file vtkColorTransferFunction.h.


Constructor & Destructor Documentation

vtkColorTransferFunction::vtkColorTransferFunction  )  [protected]
 

vtkColorTransferFunction::~vtkColorTransferFunction  )  [protected]
 


Member Function Documentation

vtkColorTransferFunction* vtkColorTransferFunction::New  )  [static]
 

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkObject.

virtual const char* vtkColorTransferFunction::GetClassName  )  [virtual]
 

Reimplemented from vtkScalarsToColors.

int vtkColorTransferFunction::IsTypeOf const char *  type  )  [static]
 

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkScalarsToColors.

virtual int vtkColorTransferFunction::IsA const char *  type  )  [virtual]
 

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkScalarsToColors.

vtkColorTransferFunction* vtkColorTransferFunction::SafeDownCast vtkObject o  )  [static]
 

Reimplemented from vtkScalarsToColors.

void vtkColorTransferFunction::DeepCopy vtkColorTransferFunction f  ) 
 

void vtkColorTransferFunction::PrintSelf ostream &  os,
vtkIndent  indent
[virtual]
 

Print method for vtkColorTransferFunction

Reimplemented from vtkScalarsToColors.

int vtkColorTransferFunction::GetSize  )  [inline]
 

How many points are there defining this function?

Definition at line 67 of file vtkColorTransferFunction.h.

int vtkColorTransferFunction::AddRGBPoint double  x,
double  r,
double  g,
double  b
 

Add/Remove a point to/from the function defined in RGB or HSV Return the index of the point (0 based), or -1 on error.

int vtkColorTransferFunction::AddHSVPoint double  x,
double  h,
double  s,
double  v
 

Add/Remove a point to/from the function defined in RGB or HSV Return the index of the point (0 based), or -1 on error.

int vtkColorTransferFunction::RemovePoint double  x  ) 
 

Add/Remove a point to/from the function defined in RGB or HSV Return the index of the point (0 based), or -1 on error.

void vtkColorTransferFunction::AddRGBSegment double  x1,
double  r1,
double  g1,
double  b1,
double  x2,
double  r2,
double  g2,
double  b2
 

Add two points to the function and remove all the points between them

void vtkColorTransferFunction::AddHSVSegment double  x1,
double  h1,
double  s1,
double  v1,
double  x2,
double  h2,
double  s2,
double  v2
 

Add two points to the function and remove all the points between them

void vtkColorTransferFunction::RemoveAllPoints  ) 
 

Remove all points

double* vtkColorTransferFunction::GetColor double  x  )  [inline]
 

Returns an RGB color for the specified scalar value (from vtkScalarsToColors)

Reimplemented from vtkScalarsToColors.

Definition at line 91 of file vtkColorTransferFunction.h.

References vtkScalarsToColors::GetColor().

void vtkColorTransferFunction::GetColor double  x,
double  rgb[3]
[virtual]
 

Returns an RGB color for the specified scalar value (from vtkScalarsToColors)

Implements vtkScalarsToColors.

double vtkColorTransferFunction::GetRedValue double  x  ) 
 

Get the color components individually.

double vtkColorTransferFunction::GetGreenValue double  x  ) 
 

Get the color components individually.

double vtkColorTransferFunction::GetBlueValue double  x  ) 
 

Get the color components individually.

virtual unsigned char* vtkColorTransferFunction::MapValue double  v  )  [virtual]
 

Map one value through the lookup table.

Implements vtkScalarsToColors.

virtual double* vtkColorTransferFunction::GetRange  )  [virtual]
 

Returns min and max position of all function points.

Implements vtkScalarsToColors.

virtual void vtkColorTransferFunction::GetRange double &  ,
double & 
[virtual]
 

Returns min and max position of all function points.

virtual void vtkColorTransferFunction::GetRange double  [2]  )  [virtual]
 

Returns min and max position of all function points.

void vtkColorTransferFunction::GetTable double  x1,
double  x2,
int  n,
double *  table
 

Fills in a table of n function values between x1 and x2

void vtkColorTransferFunction::GetTable double  x1,
double  x2,
int  n,
float *  table
 

Fills in a table of n function values between x1 and x2

const unsigned char* vtkColorTransferFunction::GetTable double  x1,
double  x2,
int  n
 

Fills in a table of n function values between x1 and x2

void vtkColorTransferFunction::BuildFunctionFromTable double  x1,
double  x2,
int  size,
double *  table
 

Construct a color transfer function from a table. Function range is is set to [x1, x2], each function size is set to size, and function points are regularly spaced between x1 and x2. Parameter "table" is assumed to be a block of memory of size [3*size]

virtual void vtkColorTransferFunction::SetClamping int   )  [virtual]
 

Sets and gets the clamping value for this transfer function.

virtual int vtkColorTransferFunction::GetClamping  )  [virtual]
 

Sets and gets the clamping value for this transfer function.

virtual void vtkColorTransferFunction::ClampingOn  )  [virtual]
 

Sets and gets the clamping value for this transfer function.

virtual void vtkColorTransferFunction::ClampingOff  )  [virtual]
 

Sets and gets the clamping value for this transfer function.

virtual void vtkColorTransferFunction::SetColorSpace int   )  [virtual]
 

How should we interpolate - in RGB, or HSV. The HSV mode will take the shortest path in Hue (going back through 0 if that is the shortest way around the hue circle) whereas HSVNoWrap will not go through 0 (in order the match the current functionality of vtkLookupTable)

void vtkColorTransferFunction::SetColorSpaceToRGB  )  [inline]
 

How should we interpolate - in RGB, or HSV. The HSV mode will take the shortest path in Hue (going back through 0 if that is the shortest way around the hue circle) whereas HSVNoWrap will not go through 0 (in order the match the current functionality of vtkLookupTable)

Definition at line 138 of file vtkColorTransferFunction.h.

References VTK_CTF_RGB.

void vtkColorTransferFunction::SetColorSpaceToHSV  )  [inline]
 

How should we interpolate - in RGB, or HSV. The HSV mode will take the shortest path in Hue (going back through 0 if that is the shortest way around the hue circle) whereas HSVNoWrap will not go through 0 (in order the match the current functionality of vtkLookupTable)

Definition at line 139 of file vtkColorTransferFunction.h.

References VTK_CTF_HSV.

void vtkColorTransferFunction::SetColorSpaceToHSVNoWrap  )  [inline]
 

How should we interpolate - in RGB, or HSV. The HSV mode will take the shortest path in Hue (going back through 0 if that is the shortest way around the hue circle) whereas HSVNoWrap will not go through 0 (in order the match the current functionality of vtkLookupTable)

Definition at line 140 of file vtkColorTransferFunction.h.

References VTK_CTF_HSV_NO_WRAP.

virtual int vtkColorTransferFunction::GetColorSpace  )  [virtual]
 

How should we interpolate - in RGB, or HSV. The HSV mode will take the shortest path in Hue (going back through 0 if that is the shortest way around the hue circle) whereas HSVNoWrap will not go through 0 (in order the match the current functionality of vtkLookupTable)

double* vtkColorTransferFunction::GetDataPointer  )  [inline]
 

Returns a list of all nodes Fills from a pointer to data stored in a similar list of nodes.

Definition at line 147 of file vtkColorTransferFunction.h.

void vtkColorTransferFunction::FillFromDataPointer int  ,
double * 
 

Returns a list of all nodes Fills from a pointer to data stored in a similar list of nodes.

virtual void vtkColorTransferFunction::MapScalarsThroughTable2 void *  input,
unsigned char *  output,
int  inputDataType,
int  numberOfValues,
int  inputIncrement,
int  outputIncrement
[virtual]
 

map a set of scalars through the lookup table

Implements vtkScalarsToColors.

virtual void vtkColorTransferFunction::SetRange double  ,
double 
[inline, protected, virtual]
 

Set the range of scalars being mapped. The set has no functionality in this subclass of vtkScalarsToColors.

Implements vtkScalarsToColors.

Definition at line 194 of file vtkColorTransferFunction.h.

void vtkColorTransferFunction::SetRange double  rng[2]  )  [inline, protected]
 

Set the range of scalars being mapped. The set has no functionality in this subclass of vtkScalarsToColors.

Reimplemented from vtkScalarsToColors.

Definition at line 195 of file vtkColorTransferFunction.h.

References vtkScalarsToColors::SetRange().


Member Data Documentation

int vtkColorTransferFunction::Clamping [protected]
 

Definition at line 166 of file vtkColorTransferFunction.h.

int vtkColorTransferFunction::ColorSpace [protected]
 

Definition at line 169 of file vtkColorTransferFunction.h.

double* vtkColorTransferFunction::Function [protected]
 

Definition at line 172 of file vtkColorTransferFunction.h.

int vtkColorTransferFunction::FunctionSize [protected]
 

Definition at line 173 of file vtkColorTransferFunction.h.

int vtkColorTransferFunction::NumberOfPoints [protected]
 

Definition at line 174 of file vtkColorTransferFunction.h.

unsigned char vtkColorTransferFunction::UnsignedCharRGBAValue[4] [protected]
 

Definition at line 177 of file vtkColorTransferFunction.h.

double vtkColorTransferFunction::Range[2] [protected]
 

Definition at line 180 of file vtkColorTransferFunction.h.

vtkPiecewiseFunction* vtkColorTransferFunction::Red [protected]
 

Definition at line 184 of file vtkColorTransferFunction.h.

vtkPiecewiseFunction* vtkColorTransferFunction::Green [protected]
 

Definition at line 185 of file vtkColorTransferFunction.h.

vtkPiecewiseFunction* vtkColorTransferFunction::Blue [protected]
 

Definition at line 186 of file vtkColorTransferFunction.h.

vtkTimeStamp vtkColorTransferFunction::BuildTime [protected]
 

Definition at line 187 of file vtkColorTransferFunction.h.

unsigned char* vtkColorTransferFunction::Table [protected]
 

Definition at line 188 of file vtkColorTransferFunction.h.

int vtkColorTransferFunction::TableSize [protected]
 

Definition at line 189 of file vtkColorTransferFunction.h.


The documentation for this class was generated from the following file: