VTK
|
Defines a transfer function for mapping a property to an RGB color value. More...
#include <vtkColorTransferFunction.h>
Public Types | |
typedef vtkScalarsToColors | Superclass |
![]() | |
enum | VectorModes { MAGNITUDE =0, COMPONENT =1 } |
typedef vtkObject | Superclass |
![]() | |
typedef vtkObjectBase | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | DeepCopy (vtkColorTransferFunction *f) |
void | ShallowCopy (vtkColorTransferFunction *f) |
void | PrintSelf (ostream &os, vtkIndent indent) |
int | GetSize () |
void | RemoveAllPoints () |
virtual unsigned char * | MapValue (double v) |
int | AdjustRange (double range[2]) |
void | BuildFunctionFromTable (double x1, double x2, int size, double *table) |
virtual vtkIdType | GetNumberOfAvailableColors () |
int | AddRGBPoint (double x, double r, double g, double b) |
int | AddRGBPoint (double x, double r, double g, double b, double midpoint, double sharpness) |
int | AddHSVPoint (double x, double h, double s, double v) |
int | AddHSVPoint (double x, double h, double s, double v, double midpoint, double sharpness) |
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) |
int | GetNodeValue (int index, double val[6]) |
int | SetNodeValue (int index, double val[6]) |
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 | SetColorSpaceToLab () |
void | SetColorSpaceToDiverging () |
virtual int | GetColorSpace () |
virtual void | SetHSVWrap (int) |
virtual int | GetHSVWrap () |
virtual void | HSVWrapOn () |
virtual void | HSVWrapOff () |
virtual void | SetScale (int) |
void | SetScaleToLinear () |
void | SetScaleToLog10 () |
virtual int | GetScale () |
virtual void | SetNanColor (double, double, double) |
virtual void | SetNanColor (double[3]) |
virtual double * | GetNanColor () |
virtual void | GetNanColor (double &, double &, double &) |
virtual void | GetNanColor (double[3]) |
double * | GetDataPointer () |
void | FillFromDataPointer (int, double *) |
virtual void | MapScalarsThroughTable2 (void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputIncrement) |
virtual void | SetAllowDuplicateScalars (int) |
virtual int | GetAllowDuplicateScalars () |
virtual void | AllowDuplicateScalarsOn () |
virtual void | AllowDuplicateScalarsOff () |
![]() | |
virtual int | IsOpaque () |
virtual void | Build () |
void | SetRange (double rng[2]) |
double * | GetColor (double v) |
virtual double | GetOpacity (double vtkNotUsed(v)) |
double | GetLuminance (double x) |
virtual void | SetAlpha (double alpha) |
virtual double | GetAlpha () |
virtual vtkUnsignedCharArray * | MapScalars (vtkDataArray *scalars, int colorMode, int component) |
virtual void | SetVectorMode (int) |
virtual int | GetVectorMode () |
void | SetVectorModeToMagnitude () |
void | SetVectorModeToComponent () |
virtual void | SetVectorComponent (int) |
virtual int | GetVectorComponent () |
void | MapScalarsThroughTable (vtkDataArray *scalars, unsigned char *output, int outputFormat) |
void | MapScalarsThroughTable (vtkDataArray *scalars, unsigned char *output) |
virtual vtkUnsignedCharArray * | ConvertUnsignedCharToRGBA (vtkUnsignedCharArray *colors, int numComp, int numTuples) |
virtual int | UsingLogScale () |
![]() | |
virtual void | DebugOn () |
virtual void | DebugOff () |
unsigned char | GetDebug () |
void | SetDebug (unsigned char debugFlag) |
virtual void | Modified () |
virtual unsigned long | GetMTime () |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
vtkCommand * | GetCommand (unsigned long tag) |
void | RemoveObserver (vtkCommand *) |
void | RemoveObservers (unsigned long event, vtkCommand *) |
void | RemoveObservers (const char *event, vtkCommand *) |
int | HasObserver (unsigned long event, vtkCommand *) |
int | HasObserver (const char *event, vtkCommand *) |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
int | HasObserver (unsigned long event) |
int | HasObserver (const char *event) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
int | InvokeEvent (unsigned long event, void *callData) |
int | InvokeEvent (const char *event, void *callData) |
int | InvokeEvent (unsigned long event) |
int | InvokeEvent (const char *event) |
![]() | |
const char * | GetClassName () const |
virtual void | Delete () |
virtual void | FastDelete () |
void | Print (ostream &os) |
virtual void | Register (vtkObjectBase *o) |
virtual void | UnRegister (vtkObjectBase *o) |
void | SetReferenceCount (int) |
void | PrintRevisions (ostream &os) |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
int | GetReferenceCount () |
Static Public Member Functions | |
static vtkColorTransferFunction * | New () |
static int | IsTypeOf (const char *type) |
static vtkColorTransferFunction * | SafeDownCast (vtkObject *o) |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkScalarsToColors * | SafeDownCast (vtkObject *o) |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkObject * | SafeDownCast (vtkObject *o) |
static vtkObject * | New () |
static void | BreakOnError () |
static void | SetGlobalWarningDisplay (int val) |
static void | GlobalWarningDisplayOn () |
static void | GlobalWarningDisplayOff () |
static int | GetGlobalWarningDisplay () |
![]() | |
static int | IsTypeOf (const char *name) |
static vtkObjectBase * | New () |
Protected Member Functions | |
vtkColorTransferFunction () | |
~vtkColorTransferFunction () | |
void | SortAndUpdateRange () |
void | MovePoint (double oldX, double newX) |
virtual void | SetRange (double, double) |
void | SetRange (double rng[2]) |
![]() | |
vtkScalarsToColors () | |
~vtkScalarsToColors () | |
![]() | |
vtkObject () | |
virtual | ~vtkObject () |
virtual void | RegisterInternal (vtkObjectBase *, int check) |
virtual void | UnRegisterInternal (vtkObjectBase *, int check) |
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL) |
void | InternalReleaseFocus () |
![]() | |
vtkObjectBase () | |
virtual | ~vtkObjectBase () |
virtual void | CollectRevisions (ostream &os) |
virtual void | ReportReferences (vtkGarbageCollector *) |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
Protected Attributes | |
vtkColorTransferFunctionInternals * | Internal |
int | Clamping |
int | ColorSpace |
int | HSVWrap |
int | Scale |
double | NanColor [3] |
double * | Function |
double | Range [2] |
unsigned char | UnsignedCharRGBAValue [4] |
int | AllowDuplicateScalars |
vtkTimeStamp | BuildTime |
unsigned char * | Table |
int | TableSize |
![]() | |
double | Alpha |
int | VectorMode |
int | UseMagnitude |
int | VectorComponent |
![]() | |
unsigned char | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
![]() | |
int | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
Defines a transfer function for mapping a property to an RGB color value.
vtkColorTransferFunction is a color mapping in RGB or HSV space that uses piecewise hermite functions to allow interpolation that can be piecewise constant, piecewise linear, or somewhere in-between (a modified piecewise hermite function that squishes the function according to a sharpness parameter). The function also allows for the specification of the midpoint (the place where the function reaches the average of the two bounding nodes) as a normalize distance between nodes. See the description of class vtkPiecewiseFunction for an explanation of midpoint and sharpness.
Definition at line 55 of file vtkColorTransferFunction.h.
Definition at line 59 of file vtkColorTransferFunction.h.
|
protected |
|
protected |
|
static |
|
virtual |
Reimplemented from vtkScalarsToColors.
|
static |
|
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.
|
static |
void vtkColorTransferFunction::DeepCopy | ( | vtkColorTransferFunction * | f | ) |
void vtkColorTransferFunction::ShallowCopy | ( | vtkColorTransferFunction * | f | ) |
|
virtual |
Print method for vtkColorTransferFunction
Reimplemented from vtkScalarsToColors.
int vtkColorTransferFunction::GetSize | ( | ) |
How many points are there defining this function?
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. See the description of class vtkPiecewiseFunction for an explanation of midpoint and sharpness.
int vtkColorTransferFunction::AddRGBPoint | ( | double | x, |
double | r, | ||
double | g, | ||
double | b, | ||
double | midpoint, | ||
double | sharpness | ||
) |
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. See the description of class vtkPiecewiseFunction for an explanation of midpoint and sharpness.
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. See the description of class vtkPiecewiseFunction for an explanation of midpoint and sharpness.
int vtkColorTransferFunction::AddHSVPoint | ( | double | x, |
double | h, | ||
double | s, | ||
double | v, | ||
double | midpoint, | ||
double | sharpness | ||
) |
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. See the description of class vtkPiecewiseFunction for an explanation of midpoint and sharpness.
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. See the description of class vtkPiecewiseFunction for an explanation of midpoint and sharpness.
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
|
inline |
Returns an RGB color for the specified scalar value
Definition at line 96 of file vtkColorTransferFunction.h.
|
virtual |
Returns an RGB color for the specified scalar value
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.
int vtkColorTransferFunction::GetNodeValue | ( | int | index, |
double | val[6] | ||
) |
For the node specified by index, set/get the location (X), R, G, and B values, midpoint, and sharpness values at the node.
int vtkColorTransferFunction::SetNodeValue | ( | int | index, |
double | val[6] | ||
) |
For the node specified by index, set/get the location (X), R, G, and B values, midpoint, and sharpness values at the node.
|
virtual |
Map one value through the lookup table.
Implements vtkScalarsToColors.
|
virtual |
Returns min and max position of all function points.
Implements vtkScalarsToColors.
|
virtual |
Returns min and max position of all function points.
|
virtual |
Returns min and max position of all function points.
int vtkColorTransferFunction::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 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 |
Sets and gets the clamping value for this transfer function.
|
virtual |
Sets and gets the clamping value for this transfer function.
|
virtual |
Sets and gets the clamping value for this transfer function.
|
virtual |
Sets and gets the clamping value for this transfer function.
|
virtual |
Set/Get the color space used for interpolation: RGB, HSV, CIELAB, or Diverging. In HSV mode, if HSVWrap is on, it will take the shortest path in Hue (going back through 0 if that is the shortest way around the hue circle) whereas if HSVWrap is off it will not go through 0 (in order the match the current functionality of vtkLookupTable). Diverging is a special mode where colors will pass through white when interpolating between two saturated colors.
|
inline |
Set/Get the color space used for interpolation: RGB, HSV, CIELAB, or Diverging. In HSV mode, if HSVWrap is on, it will take the shortest path in Hue (going back through 0 if that is the shortest way around the hue circle) whereas if HSVWrap is off it will not go through 0 (in order the match the current functionality of vtkLookupTable). Diverging is a special mode where colors will pass through white when interpolating between two saturated colors.
Definition at line 156 of file vtkColorTransferFunction.h.
|
inline |
Set/Get the color space used for interpolation: RGB, HSV, CIELAB, or Diverging. In HSV mode, if HSVWrap is on, it will take the shortest path in Hue (going back through 0 if that is the shortest way around the hue circle) whereas if HSVWrap is off it will not go through 0 (in order the match the current functionality of vtkLookupTable). Diverging is a special mode where colors will pass through white when interpolating between two saturated colors.
Definition at line 157 of file vtkColorTransferFunction.h.
|
inline |
Set/Get the color space used for interpolation: RGB, HSV, CIELAB, or Diverging. In HSV mode, if HSVWrap is on, it will take the shortest path in Hue (going back through 0 if that is the shortest way around the hue circle) whereas if HSVWrap is off it will not go through 0 (in order the match the current functionality of vtkLookupTable). Diverging is a special mode where colors will pass through white when interpolating between two saturated colors.
Definition at line 158 of file vtkColorTransferFunction.h.
|
inline |
Set/Get the color space used for interpolation: RGB, HSV, CIELAB, or Diverging. In HSV mode, if HSVWrap is on, it will take the shortest path in Hue (going back through 0 if that is the shortest way around the hue circle) whereas if HSVWrap is off it will not go through 0 (in order the match the current functionality of vtkLookupTable). Diverging is a special mode where colors will pass through white when interpolating between two saturated colors.
Definition at line 159 of file vtkColorTransferFunction.h.
|
virtual |
Set/Get the color space used for interpolation: RGB, HSV, CIELAB, or Diverging. In HSV mode, if HSVWrap is on, it will take the shortest path in Hue (going back through 0 if that is the shortest way around the hue circle) whereas if HSVWrap is off it will not go through 0 (in order the match the current functionality of vtkLookupTable). Diverging is a special mode where colors will pass through white when interpolating between two saturated colors.
|
virtual |
Set/Get the color space used for interpolation: RGB, HSV, CIELAB, or Diverging. In HSV mode, if HSVWrap is on, it will take the shortest path in Hue (going back through 0 if that is the shortest way around the hue circle) whereas if HSVWrap is off it will not go through 0 (in order the match the current functionality of vtkLookupTable). Diverging is a special mode where colors will pass through white when interpolating between two saturated colors.
|
virtual |
Set/Get the color space used for interpolation: RGB, HSV, CIELAB, or Diverging. In HSV mode, if HSVWrap is on, it will take the shortest path in Hue (going back through 0 if that is the shortest way around the hue circle) whereas if HSVWrap is off it will not go through 0 (in order the match the current functionality of vtkLookupTable). Diverging is a special mode where colors will pass through white when interpolating between two saturated colors.
|
virtual |
Set/Get the color space used for interpolation: RGB, HSV, CIELAB, or Diverging. In HSV mode, if HSVWrap is on, it will take the shortest path in Hue (going back through 0 if that is the shortest way around the hue circle) whereas if HSVWrap is off it will not go through 0 (in order the match the current functionality of vtkLookupTable). Diverging is a special mode where colors will pass through white when interpolating between two saturated colors.
|
virtual |
Set/Get the color space used for interpolation: RGB, HSV, CIELAB, or Diverging. In HSV mode, if HSVWrap is on, it will take the shortest path in Hue (going back through 0 if that is the shortest way around the hue circle) whereas if HSVWrap is off it will not go through 0 (in order the match the current functionality of vtkLookupTable). Diverging is a special mode where colors will pass through white when interpolating between two saturated colors.
|
virtual |
Set the type of scale to use, linear or logarithmic. The default is linear. If the scale is logarithmic, and the range contains zero, the color mapping will be linear.
|
inline |
Set the type of scale to use, linear or logarithmic. The default is linear. If the scale is logarithmic, and the range contains zero, the color mapping will be linear.
Definition at line 171 of file vtkColorTransferFunction.h.
|
inline |
Set the type of scale to use, linear or logarithmic. The default is linear. If the scale is logarithmic, and the range contains zero, the color mapping will be linear.
Definition at line 172 of file vtkColorTransferFunction.h.
|
virtual |
Set the type of scale to use, linear or logarithmic. The default is linear. If the scale is logarithmic, and the range contains zero, the color mapping will be linear.
|
virtual |
Set the color to use when a NaN (not a number) is encountered. This is an RGB 3-tuple color of doubles in the range [0,1].
|
virtual |
Set the color to use when a NaN (not a number) is encountered. This is an RGB 3-tuple color of doubles in the range [0,1].
|
virtual |
Set the color to use when a NaN (not a number) is encountered. This is an RGB 3-tuple color of doubles in the range [0,1].
|
virtual |
Set the color to use when a NaN (not a number) is encountered. This is an RGB 3-tuple color of doubles in the range [0,1].
|
virtual |
Set the color to use when a NaN (not a number) is encountered. This is an RGB 3-tuple color of doubles in the range [0,1].
double* vtkColorTransferFunction::GetDataPointer | ( | ) |
Returns a list of all nodes Fills from a pointer to data stored in a similar list of nodes.
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 |
map a set of scalars through the lookup table
Implements vtkScalarsToColors.
|
virtual |
Toggle whether to allow duplicate scalar values in the color transfer function (off by default).
|
virtual |
Toggle whether to allow duplicate scalar values in the color transfer function (off by default).
|
virtual |
Toggle whether to allow duplicate scalar values in the color transfer function (off by default).
|
virtual |
Toggle whether to allow duplicate scalar values in the color transfer function (off by default).
|
virtual |
Get the number of available colors for mapping to.
Implements vtkScalarsToColors.
|
inlineprotectedvirtual |
Set the range of scalars being mapped. The set has no functionality in this subclass of vtkScalarsToColors.
Implements vtkScalarsToColors.
Definition at line 249 of file vtkColorTransferFunction.h.
|
inlineprotected |
Set the range of scalars being mapped. The set has no functionality in this subclass of vtkScalarsToColors.
Definition at line 250 of file vtkColorTransferFunction.h.
|
protected |
|
protected |
Moves point from oldX to newX. It removed the point from oldX. If any point existed at newX, it will also be removed.
|
protected |
Definition at line 212 of file vtkColorTransferFunction.h.
|
protected |
Definition at line 218 of file vtkColorTransferFunction.h.
|
protected |
Definition at line 221 of file vtkColorTransferFunction.h.
|
protected |
Definition at line 224 of file vtkColorTransferFunction.h.
|
protected |
Definition at line 227 of file vtkColorTransferFunction.h.
|
protected |
Definition at line 230 of file vtkColorTransferFunction.h.
|
protected |
Definition at line 232 of file vtkColorTransferFunction.h.
|
protected |
Definition at line 235 of file vtkColorTransferFunction.h.
|
protected |
Definition at line 238 of file vtkColorTransferFunction.h.
|
protected |
Definition at line 240 of file vtkColorTransferFunction.h.
|
protected |
Definition at line 242 of file vtkColorTransferFunction.h.
|
protected |
Definition at line 243 of file vtkColorTransferFunction.h.
|
protected |
Definition at line 244 of file vtkColorTransferFunction.h.