#include <vtkPiecewiseFunction.h>
Inheritance diagram for vtkPiecewiseFunction:
Defines a piecewise linear function mapping. Used for transfer functions in volume rendering.
Definition at line 35 of file vtkPiecewiseFunction.h.
Public Types | |
typedef vtkDataObject | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | Initialize () |
void | DeepCopy (vtkDataObject *f) |
void | ShallowCopy (vtkDataObject *f) |
int | GetDataObjectType () |
int | GetSize () |
void | RemoveAllPoints () |
void | AddSegment (double x1, double val1, double x2, double val2) |
double | GetValue (double x) |
double * | GetRange () |
int | AdjustRange (double range[2]) |
const char * | GetType () |
double | GetFirstNonZeroValue () |
int | AddPoint (double x, double val) |
int | RemovePoint (double x) |
double * | GetDataPointer () |
void | FillFromDataPointer (int, double *) |
void | GetTable (double x1, double x2, int size, float *table, int stride=1) |
void | GetTable (double x1, double x2, int size, double *table, int stride=1) |
void | BuildFunctionFromTable (double x1, double x2, int size, double *table, int stride=1) |
virtual void | SetClamping (int) |
virtual int | GetClamping () |
virtual void | ClampingOn () |
virtual void | ClampingOff () |
Static Public Member Functions | |
static vtkPiecewiseFunction * | New () |
static int | IsTypeOf (const char *type) |
static vtkPiecewiseFunction * | SafeDownCast (vtkObject *o) |
static vtkPiecewiseFunction * | GetData (vtkInformation *info) |
static vtkPiecewiseFunction * | GetData (vtkInformationVector *v, int i=0) |
Protected Member Functions | |
vtkPiecewiseFunction () | |
~vtkPiecewiseFunction () | |
void | IncreaseArraySize () |
int | InsertPoint (double x, double val) |
void | MovePoints (int index, int down) |
Protected Attributes | |
int | ArraySize |
int | Clamping |
double * | Function |
int | FunctionSize |
double | FunctionRange [2] |
vtkPiecewiseFunction::vtkPiecewiseFunction | ( | ) | [protected] |
vtkPiecewiseFunction::~vtkPiecewiseFunction | ( | ) | [protected] |
static vtkPiecewiseFunction* vtkPiecewiseFunction::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkDataObject.
virtual const char* vtkPiecewiseFunction::GetClassName | ( | ) | [virtual] |
Reimplemented from vtkDataObject.
static int vtkPiecewiseFunction::IsTypeOf | ( | const char * | name | ) | [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 vtkDataObject.
virtual int vtkPiecewiseFunction::IsA | ( | const char * | name | ) | [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 vtkDataObject.
static vtkPiecewiseFunction* vtkPiecewiseFunction::SafeDownCast | ( | vtkObject * | o | ) | [static] |
Reimplemented from vtkDataObject.
void vtkPiecewiseFunction::PrintSelf | ( | ostream & | os, | |
vtkIndent | indent | |||
) | [virtual] |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkDataObject.
void vtkPiecewiseFunction::Initialize | ( | ) | [virtual] |
Restore data object to initial state,
Reimplemented from vtkDataObject.
void vtkPiecewiseFunction::DeepCopy | ( | vtkDataObject * | src | ) | [virtual] |
Shallow and Deep copy. These copy the data, but not any of the pipeline connections.
Reimplemented from vtkDataObject.
void vtkPiecewiseFunction::ShallowCopy | ( | vtkDataObject * | src | ) | [virtual] |
Shallow and Deep copy. These copy the data, but not any of the pipeline connections.
Reimplemented from vtkDataObject.
int vtkPiecewiseFunction::GetDataObjectType | ( | ) | [inline, virtual] |
Return what type of dataset this is.
Reimplemented from vtkDataObject.
Definition at line 47 of file vtkPiecewiseFunction.h.
References VTK_PIECEWISE_FUNCTION.
int vtkPiecewiseFunction::GetSize | ( | ) |
Get the number of points used to specify the function
int vtkPiecewiseFunction::AddPoint | ( | double | x, | |
double | val | |||
) |
Add/Remove points to/from the function. If a duplicate point is added then the function value is changed at that location. Return the index of the point (0 based), or -1 on error.
int vtkPiecewiseFunction::RemovePoint | ( | double | x | ) |
Add/Remove points to/from the function. If a duplicate point is added then the function value is changed at that location. Return the index of the point (0 based), or -1 on error.
void vtkPiecewiseFunction::RemoveAllPoints | ( | ) |
Removes all points from the function.
void vtkPiecewiseFunction::AddSegment | ( | double | x1, | |
double | val1, | |||
double | x2, | |||
double | val2 | |||
) |
Add a line segment to the function. All points defined between the two points specified are removed from the function.
double vtkPiecewiseFunction::GetValue | ( | double | x | ) |
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.
double* vtkPiecewiseFunction::GetDataPointer | ( | ) | [inline] |
Returns a pointer to the data stored in the table. Fills from a pointer to data stored in a similar table.
Definition at line 75 of file vtkPiecewiseFunction.h.
void vtkPiecewiseFunction::FillFromDataPointer | ( | int | , | |
double * | ||||
) |
Returns a pointer to the data stored in the table. Fills from a pointer to data stored in a similar table.
double* vtkPiecewiseFunction::GetRange | ( | ) |
Returns the min and max point locations of the function.
int vtkPiecewiseFunction::AdjustRange | ( | double | range[2] | ) |
Remove all points out of the new range, and make sure there is a point at each end of that range. Return 1 on success, 0 otherwise.
void vtkPiecewiseFunction::GetTable | ( | double | x1, | |
double | x2, | |||
int | size, | |||
float * | table, | |||
int | stride = 1 | |||
) |
Fills in an array of function values evaluated at regular intervals. Parameter "stride" is used to step through the output "table". It is used by vtkColorTransferFunction to fill in an rgb table using three separate piecewise functions and three separate calls to GetTable().
void vtkPiecewiseFunction::GetTable | ( | double | x1, | |
double | x2, | |||
int | size, | |||
double * | table, | |||
int | stride = 1 | |||
) |
Fills in an array of function values evaluated at regular intervals. Parameter "stride" is used to step through the output "table". It is used by vtkColorTransferFunction to fill in an rgb table using three separate piecewise functions and three separate calls to GetTable().
void vtkPiecewiseFunction::BuildFunctionFromTable | ( | double | x1, | |
double | x2, | |||
int | size, | |||
double * | table, | |||
int | stride = 1 | |||
) |
Constructs a piecewise function from a table. Function range is is set to [x1, x2], function size is set to size, and function points are regularly spaced between x1 and x2. Parameter "stride" is is step through the input table. It is used by vtkColorTransferFunction to construct 3 piecewise functions from an rgb table.
virtual void vtkPiecewiseFunction::SetClamping | ( | int | ) | [virtual] |
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.
virtual int vtkPiecewiseFunction::GetClamping | ( | ) | [virtual] |
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.
virtual void vtkPiecewiseFunction::ClampingOn | ( | ) | [virtual] |
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.
virtual void vtkPiecewiseFunction::ClampingOff | ( | ) | [virtual] |
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.
const char* vtkPiecewiseFunction::GetType | ( | ) |
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)
double vtkPiecewiseFunction::GetFirstNonZeroValue | ( | ) |
Returns the first point location which precedes a non-zero segment of the function. Note that the value at this point may be zero.
static vtkPiecewiseFunction* vtkPiecewiseFunction::GetData | ( | vtkInformation * | info | ) | [static] |
Retrieve an instance of this class from an information object.
Reimplemented from vtkDataObject.
static vtkPiecewiseFunction* vtkPiecewiseFunction::GetData | ( | vtkInformationVector * | v, | |
int | i = 0 | |||
) | [static] |
Retrieve an instance of this class from an information object.
Reimplemented from vtkDataObject.
void vtkPiecewiseFunction::IncreaseArraySize | ( | ) | [protected] |
int vtkPiecewiseFunction::InsertPoint | ( | double | x, | |
double | val | |||
) | [protected] |
void vtkPiecewiseFunction::MovePoints | ( | int | index, | |
int | down | |||
) | [protected] |
int vtkPiecewiseFunction::ArraySize [protected] |
Definition at line 141 of file vtkPiecewiseFunction.h.
int vtkPiecewiseFunction::Clamping [protected] |
Definition at line 147 of file vtkPiecewiseFunction.h.
double* vtkPiecewiseFunction::Function [protected] |
Definition at line 150 of file vtkPiecewiseFunction.h.
int vtkPiecewiseFunction::FunctionSize [protected] |
Definition at line 153 of file vtkPiecewiseFunction.h.
double vtkPiecewiseFunction::FunctionRange[2] [protected] |
Definition at line 156 of file vtkPiecewiseFunction.h.