Documentation for vtkPiecewiseFunction

vtkPiecewiseFunction - Defines a 1D piecewise function.

Super Class: vtkObject

Description:

Defines a piecewise linear function mapping. Used for transfer functions in volume rendering.

 

Methods:

void vtkPiecewiseFunction ()
void vtkPiecewiseFunction ()
static vtkPiecewiseFunction *New ()
const char *GetClassName ()
void PrintSelf (unknown & ,vtkIndent )
int GetSize ()
void AddPoint (float ,float )
void RemovePoint (float )
void RemoveAllPoints ()
void AddSegment (float ,float ,float ,float )
float GetValue (float )
float *GetDataPointer ()
float *GetRange ()
void GetTable (float ,float ,int ,float *)
void SetClamping (int )
int GetClamping ()
void ClampingOn ()
void ClampingOff ()
char *GetType ()
float GetFirstNonZeroValue ()
void IncreaseArraySize ()
int InsertPoint (float ,float )
void MovePoints (int ,int )

 

Detailed Method Descriptions:

Get the number of points used to specify the function

int GetSize ()

Add/Remove points to/from the function. If a duplicate point is added then the function value is changed at that location.

void AddPoint (float ,float )
void RemovePoint (float )

Removes all points from the function.

void RemoveAllPoints ()

Add a line segment to the function. All points defined between the two points specified are removed from the function.

void AddSegment (float ,float ,float ,float )

Returns the value of the function at the specified location using the specified interpolation. Returns zero if the specified location is outside the min and max points of the function.

float GetValue (float )

Returns a pointer to the data stored in the table.

float *GetDataPointer ()

Returns the min and max point locations of the function.

float *GetRange ()

Fills in an array of function values evaluated at regular intervals

void GetTable (float ,float ,int ,float *)

When zero range clamping is Off, GetValue() returns 0.0 when a value is requested outside of the points specified. When zero range clamping is On, GetValue() returns the value at the value at the lowest point for a request below all points specified and returns the value at the highest point for a request above all points specified. On is the default.

void SetClamping (int )
int GetClamping ()
void ClampingOn ()
void ClampingOff ()

Return the type of function: Function Types: 0 : Constant (No change in slope between end points) 1 : NonDecreasing (Always increasing or zero slope) 2 : NonIncreasing (Always decreasing or zero slope) 3 : Varied (Contains both decreasing and increasing slopes)

char *GetType ()

Returns the first point location which precedes a non-zero segment of the function. Note that the value at this point may be zero.

float GetFirstNonZeroValue ()