Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

vtkColorTransferFunction Class Reference

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

#include <vtkColorTransferFunction.h>

Inheritance diagram for vtkColorTransferFunction:

Inheritance graph
[legend]
Collaboration diagram for vtkColorTransferFunction:

Collaboration graph
[legend]
List of all members.

Public Methods

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void DeepCopy (vtkColorTransferFunction *f)
void PrintSelf (ostream &os, vtkIndent indent)
int GetSize ()
void AddRGBPoint (float x, float r, float g, float b)
void AddHSVPoint (float x, float h, float s, float v)
void AddRGBSegment (float x1, float r1, float g1, float b1, float x2, float r2, float g2, float b2)
void AddHSVSegment (float x1, float h1, float s1, float v1, float x2, float h2, float s2, float v2)
void RemovePoint (float x)
void RemoveAllPoints ()
float * GetColor (float x)
void GetColor (float x, float rgb[3])
float GetRedValue (float x)
float GetGreenValue (float x)
float GetBlueValue (float x)
virtual unsigned char * MapValue (float v)
virtual float * GetRange ()
virtual void GetRange (float &, float &)
virtual void GetRange (float[2])
void GetTable (float x1, float x2, int n, float *table)
const unsigned char * GetTable (float x1, float x2, int n)
void BuildFunctionFromTable (float x1, float x2, int size, float *table)
virtual void SetClamping (int)
virtual int GetClamping ()
virtual void ClampingOn ()
virtual void ClampingOff ()
virtual void SetColorSpace (int)
void SetColorSpaceToRGB ()
void SetColorSpaceToHSV ()
virtual int GetColorSpace ()
float * GetDataPointer ()
virtual void MapScalarsThroughTable2 (void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputIncrement)
float * GetValue (float x)
int GetTotalSize ()
int GetRedSize ()
int GetGreenSize ()
int GetBlueSize ()
void AddRedPoint (float x, float r)
void AddGreenPoint (float x, float g)
void AddBluePoint (float x, float b)
void RemoveRedPoint (float x)
void RemoveGreenPoint (float x)
void RemoveBluePoint (float x)
void RemoveRGBPoint (float x)
void AddRedSegment (float x1, float r1, float x2, float r2)
void AddGreenSegment (float x1, float g1, float x2, float g2)
void AddBlueSegment (float x1, float b1, float x2, float b2)
virtual void SetRange (float, float)
void SetRange (float rng[2])
vtkPiecewiseFunctionGetRedFunction ()
vtkPiecewiseFunctionGetGreenFunction ()
vtkPiecewiseFunctionGetBlueFunction ()

Static Public Methods

vtkColorTransferFunction * New ()
int IsTypeOf (const char *type)
vtkColorTransferFunction * SafeDownCast (vtkObject *o)

Protected Methods

 vtkColorTransferFunction ()
 ~vtkColorTransferFunction ()
 vtkColorTransferFunction (const vtkColorTransferFunction &)
void operator= (const vtkColorTransferFunction &)
void RGBToHSV (float r, float g, float b, float &h, float &s, float &v)
void HSVToRGB (float h, float s, float v, float &r, float &g, float &b)

Protected Attributes

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

Detailed Description

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

Date:
2000/12/10 20:08:32
Revision:
1.29

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

See also:
vtkPiecewiseFunction
Examples:
vtkColorTransferFunction (examples)

Definition at line 65 of file vtkColorTransferFunction.h.


Constructor & Destructor Documentation

vtkColorTransferFunction::vtkColorTransferFunction   [protected]
 

vtkColorTransferFunction::~vtkColorTransferFunction   [protected]
 

vtkColorTransferFunction::vtkColorTransferFunction const vtkColorTransferFunction &    [inline, protected]
 

Definition at line 193 of file vtkColorTransferFunction.h.


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]
 

Return the class name as a string. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

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 vtkTypeMacro 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 vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkScalarsToColors.

vtkColorTransferFunction* vtkColorTransferFunction::SafeDownCast vtkObject   o [static]
 

Will cast the supplied object to vtkObject* is this is a safe operation (i.e., a safe downcast); otherwise NULL is returned. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkScalarsToColors.

void vtkColorTransferFunction::DeepCopy vtkColorTransferFunction *    f
 

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

Print method for vtkColorTransferFunction

Reimplemented from vtkObject.

int vtkColorTransferFunction::GetSize   [inline]
 

How many points are there defining this function?

Definition at line 76 of file vtkColorTransferFunction.h.

void vtkColorTransferFunction::AddRGBPoint float    x,
float    r,
float    g,
float    b
 

Add a point to the function defined in RGB or HSV

void vtkColorTransferFunction::AddHSVPoint float    x,
float    h,
float    s,
float    v
 

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

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

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

void vtkColorTransferFunction::RemovePoint float    x
 

Remove a point / remove all points

void vtkColorTransferFunction::RemoveAllPoints  
 

float* vtkColorTransferFunction::GetColor float    x [inline]
 

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

Reimplemented from vtkScalarsToColors.

Definition at line 94 of file vtkColorTransferFunction.h.

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

Map one value through the lookup table and return the color as an RGB array of floats between 0 and 1.

Reimplemented from vtkScalarsToColors.

float vtkColorTransferFunction::GetRedValue float    x
 

Get the color components individually.

float vtkColorTransferFunction::GetGreenValue float    x
 

float vtkColorTransferFunction::GetBlueValue float    x
 

virtual unsigned char* vtkColorTransferFunction::MapValue float    v [virtual]
 

Map one value through the lookup table.

Reimplemented from vtkScalarsToColors.

virtual float* vtkColorTransferFunction::GetRange   [virtual]
 

Returns min and max position of all function points.

Reimplemented from vtkScalarsToColors.

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

virtual void vtkColorTransferFunction::GetRange float   [2] [virtual]
 

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

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

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

void vtkColorTransferFunction::BuildFunctionFromTable float    x1,
float    x2,
int    size,
float *    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]
 

virtual void vtkColorTransferFunction::ClampingOn   [virtual]
 

virtual void vtkColorTransferFunction::ClampingOff   [virtual]
 

virtual void vtkColorTransferFunction::SetColorSpace int    [virtual]
 

How should we interpolate - in RGB, or HSV

void vtkColorTransferFunction::SetColorSpaceToRGB   [inline]
 

Definition at line 126 of file vtkColorTransferFunction.h.

void vtkColorTransferFunction::SetColorSpaceToHSV   [inline]
 

Definition at line 127 of file vtkColorTransferFunction.h.

virtual int vtkColorTransferFunction::GetColorSpace   [virtual]
 

float* vtkColorTransferFunction::GetDataPointer   [inline]
 

Returns a list of all nodes

Definition at line 131 of file vtkColorTransferFunction.h.

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

Reimplemented from vtkScalarsToColors.

float* vtkColorTransferFunction::GetValue float    x [inline]
 

Deprecated method, use GetColor() instead.

Definition at line 148 of file vtkColorTransferFunction.h.

int vtkColorTransferFunction::GetTotalSize  
 

Deprecated functions (after VTK 3.1.2) Don't use. Get GetSize() instead;

int vtkColorTransferFunction::GetRedSize  
 

int vtkColorTransferFunction::GetGreenSize  
 

int vtkColorTransferFunction::GetBlueSize  
 

void vtkColorTransferFunction::AddRedPoint float    x,
float    r
 

Deprecated functions (after VTK 3.1.2) Don't use. Use AddRGBPoint() or AddHSVPoint instead

void vtkColorTransferFunction::AddGreenPoint float    x,
float    g
 

void vtkColorTransferFunction::AddBluePoint float    x,
float    b
 

void vtkColorTransferFunction::RemoveRedPoint float    x
 

Depricated functions (after VTK 3.1.2) Don't use. Use RemovePoint() instead

void vtkColorTransferFunction::RemoveGreenPoint float    x
 

void vtkColorTransferFunction::RemoveBluePoint float    x
 

void vtkColorTransferFunction::RemoveRGBPoint float    x
 

void vtkColorTransferFunction::AddRedSegment float    x1,
float    r1,
float    x2,
float    r2
 

Depricated functions (after VTK 3.1.2) Don't use. Use AddSegment() instead

void vtkColorTransferFunction::AddGreenSegment float    x1,
float    g1,
float    x2,
float    g2
 

void vtkColorTransferFunction::AddBlueSegment float    x1,
float    b1,
float    x2,
float    b2
 

virtual void vtkColorTransferFunction::SetRange float    min,
float    max
[inline, virtual]
 

Depricated functions (after VTK 3.1.2) Don't use. These methods never functioned. There are no alternative methods.

Reimplemented from vtkScalarsToColors.

Definition at line 179 of file vtkColorTransferFunction.h.

void vtkColorTransferFunction::SetRange float    rng[2] [inline]
 

Reimplemented from vtkScalarsToColors.

Definition at line 180 of file vtkColorTransferFunction.h.

vtkPiecewiseFunction* vtkColorTransferFunction::GetRedFunction   [inline]
 

Depricated functions (after VTK 3.1.2) Don't use. The color transfer function is no longer stored as three independent piecewise functions. You can use GetFunction() to get the list of all nodes

Definition at line 185 of file vtkColorTransferFunction.h.

vtkPiecewiseFunction* vtkColorTransferFunction::GetGreenFunction   [inline]
 

Definition at line 186 of file vtkColorTransferFunction.h.

vtkPiecewiseFunction* vtkColorTransferFunction::GetBlueFunction   [inline]
 

Definition at line 187 of file vtkColorTransferFunction.h.

void vtkColorTransferFunction::operator= const vtkColorTransferFunction &    [inline, protected]
 

Definition at line 194 of file vtkColorTransferFunction.h.

void vtkColorTransferFunction::RGBToHSV float    r,
float    g,
float    b,
float &    h,
float &    s,
float &    v
[protected]
 

void vtkColorTransferFunction::HSVToRGB float    h,
float    s,
float    v,
float &    r,
float &    g,
float &    b
[protected]
 


Member Data Documentation

int vtkColorTransferFunction::Clamping [protected]
 

Definition at line 200 of file vtkColorTransferFunction.h.

int vtkColorTransferFunction::ColorSpace [protected]
 

Definition at line 203 of file vtkColorTransferFunction.h.

float* vtkColorTransferFunction::Function [protected]
 

Definition at line 206 of file vtkColorTransferFunction.h.

int vtkColorTransferFunction::FunctionSize [protected]
 

Definition at line 207 of file vtkColorTransferFunction.h.

int vtkColorTransferFunction::NumberOfPoints [protected]
 

Definition at line 208 of file vtkColorTransferFunction.h.

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

Definition at line 215 of file vtkColorTransferFunction.h.

float vtkColorTransferFunction::Range[2] [protected]
 

Definition at line 218 of file vtkColorTransferFunction.h.

vtkPiecewiseFunction* vtkColorTransferFunction::Red [protected]
 

Definition at line 222 of file vtkColorTransferFunction.h.

vtkPiecewiseFunction* vtkColorTransferFunction::Green [protected]
 

Definition at line 223 of file vtkColorTransferFunction.h.

vtkPiecewiseFunction* vtkColorTransferFunction::Blue [protected]
 

Definition at line 224 of file vtkColorTransferFunction.h.

vtkTimeStamp vtkColorTransferFunction::BuildTime [protected]
 

Definition at line 225 of file vtkColorTransferFunction.h.

unsigned char* vtkColorTransferFunction::Table [protected]
 

Definition at line 226 of file vtkColorTransferFunction.h.

int vtkColorTransferFunction::TableSize [protected]
 

Definition at line 227 of file vtkColorTransferFunction.h.


The documentation for this class was generated from the following file:
Generated on Wed Nov 21 12:46:59 2001 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001