VTK
|
Defines a transfer function for mapping a property to an RGB color value. More...
#include <vtkColorTransferFunction.h>
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 56 of file vtkColorTransferFunction.h.
Reimplemented from vtkScalarsToColors.
Reimplemented in vtkDiscretizableColorTransferFunction.
Definition at line 60 of file vtkColorTransferFunction.h.
vtkColorTransferFunction::vtkColorTransferFunction | ( | ) | [protected] |
vtkColorTransferFunction::~vtkColorTransferFunction | ( | ) | [protected] |
static vtkColorTransferFunction* vtkColorTransferFunction::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkScalarsToColors.
Reimplemented in vtkDiscretizableColorTransferFunction.
static int vtkColorTransferFunction::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 vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkScalarsToColors.
Reimplemented in vtkDiscretizableColorTransferFunction.
virtual int vtkColorTransferFunction::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 vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkScalarsToColors.
Reimplemented in vtkDiscretizableColorTransferFunction.
static vtkColorTransferFunction* vtkColorTransferFunction::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkScalarsToColors.
Reimplemented in vtkDiscretizableColorTransferFunction.
virtual vtkObjectBase* vtkColorTransferFunction::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkScalarsToColors.
Reimplemented in vtkDiscretizableColorTransferFunction.
Reimplemented from vtkScalarsToColors.
Reimplemented in vtkDiscretizableColorTransferFunction.
void vtkColorTransferFunction::DeepCopy | ( | vtkScalarsToColors * | o | ) | [virtual] |
Copy the contents from another object.
Reimplemented from vtkScalarsToColors.
void vtkColorTransferFunction::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) | [virtual] |
Print method for vtkColorTransferFunction
Reimplemented from vtkScalarsToColors.
Reimplemented in vtkDiscretizableColorTransferFunction.
How many points are there defining this function?
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.
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.
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
Remove all points
double* vtkColorTransferFunction::GetColor | ( | double | x | ) | [inline] |
Returns an RGB color for the specified scalar value
Reimplemented from vtkScalarsToColors.
Definition at line 97 of file vtkColorTransferFunction.h.
void vtkColorTransferFunction::GetColor | ( | double | x, |
double | rgb[3] | ||
) | [virtual] |
Returns an RGB color for the specified scalar value
Reimplemented from vtkScalarsToColors.
Reimplemented in vtkDiscretizableColorTransferFunction.
Get the color components individually.
Get the color components individually.
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 unsigned char* vtkColorTransferFunction::MapValue | ( | double | v | ) | [virtual] |
Map one value through the lookup table.
Reimplemented from vtkScalarsToColors.
Reimplemented in vtkDiscretizableColorTransferFunction.
virtual double* vtkColorTransferFunction::GetRange | ( | ) | [virtual] |
Returns min and max position of all function points.
Reimplemented from 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.
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. Note that GetTable ignores IndexedLookup
void vtkColorTransferFunction::GetTable | ( | double | x1, |
double | x2, | ||
int | n, | ||
float * | table | ||
) |
Fills in a table of n function values between x1 and x2. Note that GetTable ignores IndexedLookup
const unsigned char* vtkColorTransferFunction::GetTable | ( | double | x1, |
double | x2, | ||
int | n | ||
) |
Fills in a table of n function values between x1 and x2. Note that GetTable ignores IndexedLookup
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] |
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.
void vtkColorTransferFunction::SetColorSpaceToRGB | ( | ) | [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.
void vtkColorTransferFunction::SetColorSpaceToHSV | ( | ) | [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.
void vtkColorTransferFunction::SetColorSpaceToLab | ( | ) | [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 160 of file vtkColorTransferFunction.h.
void vtkColorTransferFunction::SetColorSpaceToDiverging | ( | ) | [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 161 of file vtkColorTransferFunction.h.
virtual int vtkColorTransferFunction::GetColorSpace | ( | ) | [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 void vtkColorTransferFunction::SetHSVWrap | ( | int | ) | [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 int vtkColorTransferFunction::GetHSVWrap | ( | ) | [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 void vtkColorTransferFunction::HSVWrapOn | ( | ) | [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 void vtkColorTransferFunction::HSVWrapOff | ( | ) | [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 void vtkColorTransferFunction::SetScale | ( | int | ) | [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.
void vtkColorTransferFunction::SetScaleToLinear | ( | ) | [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 173 of file vtkColorTransferFunction.h.
void vtkColorTransferFunction::SetScaleToLog10 | ( | ) | [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 174 of file vtkColorTransferFunction.h.
virtual int vtkColorTransferFunction::GetScale | ( | ) | [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 void vtkColorTransferFunction::SetNanColor | ( | double | , |
double | , | ||
double | |||
) | [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].
Reimplemented in vtkDiscretizableColorTransferFunction.
virtual void vtkColorTransferFunction::SetNanColor | ( | double | [3] | ) | [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].
Reimplemented in vtkDiscretizableColorTransferFunction.
virtual double* vtkColorTransferFunction::GetNanColor | ( | ) | [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 void vtkColorTransferFunction::GetNanColor | ( | double & | , |
double & | , | ||
double & | |||
) | [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 void vtkColorTransferFunction::GetNanColor | ( | double | [3] | ) | [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].
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 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.
virtual void vtkColorTransferFunction::SetAllowDuplicateScalars | ( | int | ) | [virtual] |
Toggle whether to allow duplicate scalar values in the color transfer function (off by default).
virtual int vtkColorTransferFunction::GetAllowDuplicateScalars | ( | ) | [virtual] |
Toggle whether to allow duplicate scalar values in the color transfer function (off by default).
virtual void vtkColorTransferFunction::AllowDuplicateScalarsOn | ( | ) | [virtual] |
Toggle whether to allow duplicate scalar values in the color transfer function (off by default).
virtual void vtkColorTransferFunction::AllowDuplicateScalarsOff | ( | ) | [virtual] |
Toggle whether to allow duplicate scalar values in the color transfer function (off by default).
virtual vtkIdType vtkColorTransferFunction::GetNumberOfAvailableColors | ( | ) | [virtual] |
Get the number of available colors for mapping to.
Reimplemented from vtkScalarsToColors.
Reimplemented in vtkDiscretizableColorTransferFunction.
virtual void vtkColorTransferFunction::GetIndexedColor | ( | vtkIdType | idx, |
double | rgba[4] | ||
) | [virtual] |
Return a color given an integer index. This is used to assign colors to annotations (given an offset into the list of annotations). If there are no control points or idx < 0, then NanColor is returned.
Reimplemented from 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.
Reimplemented from vtkScalarsToColors.
Definition at line 256 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 257 of file vtkColorTransferFunction.h.
void vtkColorTransferFunction::SortAndUpdateRange | ( | ) | [protected] |
bool vtkColorTransferFunction::UpdateRange | ( | ) | [protected] |
void vtkColorTransferFunction::MovePoint | ( | double | oldX, |
double | newX | ||
) | [protected] |
Moves point from oldX to newX. It removed the point from oldX. If any point existed at newX, it will also be removed.
vtkColorTransferFunctionInternals* vtkColorTransferFunction::Internal [protected] |
Definition at line 219 of file vtkColorTransferFunction.h.
int vtkColorTransferFunction::Clamping [protected] |
Definition at line 225 of file vtkColorTransferFunction.h.
int vtkColorTransferFunction::ColorSpace [protected] |
Definition at line 228 of file vtkColorTransferFunction.h.
int vtkColorTransferFunction::HSVWrap [protected] |
Definition at line 231 of file vtkColorTransferFunction.h.
int vtkColorTransferFunction::Scale [protected] |
Definition at line 234 of file vtkColorTransferFunction.h.
double vtkColorTransferFunction::NanColor[3] [protected] |
Definition at line 237 of file vtkColorTransferFunction.h.
double* vtkColorTransferFunction::Function [protected] |
Definition at line 239 of file vtkColorTransferFunction.h.
double vtkColorTransferFunction::Range[2] [protected] |
Definition at line 242 of file vtkColorTransferFunction.h.
unsigned char vtkColorTransferFunction::UnsignedCharRGBAValue[4] [protected] |
Definition at line 245 of file vtkColorTransferFunction.h.
int vtkColorTransferFunction::AllowDuplicateScalars [protected] |
Definition at line 247 of file vtkColorTransferFunction.h.
vtkTimeStamp vtkColorTransferFunction::BuildTime [protected] |
Reimplemented in vtkDiscretizableColorTransferFunction.
Definition at line 249 of file vtkColorTransferFunction.h.
unsigned char* vtkColorTransferFunction::Table [protected] |
Definition at line 250 of file vtkColorTransferFunction.h.
int vtkColorTransferFunction::TableSize [protected] |
Definition at line 251 of file vtkColorTransferFunction.h.