VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkDiscretizableColorTransferFunction Class Reference

a combination of vtkColorTransferFunction and vtkLookupTable. More...

#include <vtkDiscretizableColorTransferFunction.h>

Inheritance diagram for vtkDiscretizableColorTransferFunction:
[legend]
Collaboration diagram for vtkDiscretizableColorTransferFunction:
[legend]

Public Types

typedef vtkColorTransferFunction Superclass
 
- Public Types inherited from vtkColorTransferFunction
typedef vtkScalarsToColors Superclass
 
- Public Types inherited from vtkScalarsToColors
enum  VectorModes { MAGNITUDE =0, COMPONENT =1, RGBCOLORS =2 }
 
typedef vtkObject Superclass
 
- Public Types inherited from vtkObject
typedef vtkObjectBase Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkDiscretizableColorTransferFunctionNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
int IsOpaque ()
 
virtual void GetIndexedColor (vtkIdType i, double rgba[4])
 
virtual void Build ()
 
virtual unsigned char * MapValue (double v)
 
virtual void GetColor (double v, double rgb[3])
 
virtual double GetOpacity (double v)
 
doubleGetRGBPoints ()
 
virtual void SetAlpha (double alpha)
 
virtual vtkIdType GetNumberOfAvailableColors ()
 
virtual unsigned long GetMTime ()
 
void SetIndexedColor (unsigned int index, const double rgb[3])
 
void SetIndexedColor (unsigned int index, double r, double g, double b)
 
void SetNumberOfIndexedColors (unsigned int count)
 
unsigned int GetNumberOfIndexedColors ()
 
virtual void SetDiscretize (int)
 
virtual int GetDiscretize ()
 
virtual void DiscretizeOn ()
 
virtual void DiscretizeOff ()
 
virtual void SetUseLogScale (int useLogScale)
 
virtual int GetUseLogScale ()
 
virtual void SetNumberOfValues (vtkIdType)
 
virtual vtkIdType GetNumberOfValues ()
 
virtual vtkUnsignedCharArrayMapScalars (vtkDataArray *scalars, int colorMode, int component)
 
virtual vtkUnsignedCharArrayMapScalars (vtkAbstractArray *scalars, int colorMode, int component)
 
virtual void SetNanColor (double r, double g, double b)
 
virtual void SetNanColor (double rgb[3])
 
virtual int UsingLogScale ()
 
virtual void SetScalarOpacityFunction (vtkPiecewiseFunction *function)
 
virtual vtkPiecewiseFunctionGetScalarOpacityFunction () const
 
virtual void SetEnableOpacityMapping (bool)
 
virtual bool GetEnableOpacityMapping ()
 
virtual void EnableOpacityMappingOn ()
 
virtual void EnableOpacityMappingOff ()
 
- Public Member Functions inherited from vtkColorTransferFunction
vtkColorTransferFunctionNewInstance () const
 
void DeepCopy (vtkScalarsToColors *f)
 
void ShallowCopy (vtkColorTransferFunction *f)
 
int GetSize ()
 
void RemoveAllPoints ()
 
int AdjustRange (double range[2])
 
void BuildFunctionFromTable (double x1, double x2, int size, double *table)
 
doubleGetDataPointer ()
 
void FillFromDataPointer (int n, double *ptr)
 
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)
 
doubleGetColor (double x)
 
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 doubleGetRange ()
 
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 doubleGetNanColor ()
 
virtual void GetNanColor (double &, double &, double &)
 
virtual void GetNanColor (double[3])
 
virtual void SetBelowRangeColor (double, double, double)
 
virtual void SetBelowRangeColor (double[3])
 
virtual doubleGetBelowRangeColor ()
 
virtual void GetBelowRangeColor (double &, double &, double &)
 
virtual void GetBelowRangeColor (double[3])
 
virtual void SetUseBelowRangeColor (int)
 
virtual int GetUseBelowRangeColor ()
 
virtual void UseBelowRangeColorOn ()
 
virtual void UseBelowRangeColorOff ()
 
virtual void SetAboveRangeColor (double, double, double)
 
virtual void SetAboveRangeColor (double[3])
 
virtual doubleGetAboveRangeColor ()
 
virtual void GetAboveRangeColor (double &, double &, double &)
 
virtual void GetAboveRangeColor (double[3])
 
virtual void SetUseAboveRangeColor (int)
 
virtual int GetUseAboveRangeColor ()
 
virtual void UseAboveRangeColorOn ()
 
virtual void UseAboveRangeColorOff ()
 
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 ()
 
- Public Member Functions inherited from vtkScalarsToColors
vtkScalarsToColorsNewInstance () const
 
virtual vtkIdType SetAnnotation (vtkVariant value, vtkStdString annotation)
 
virtual vtkIdType SetAnnotation (vtkStdString value, vtkStdString annotation)
 
vtkIdType GetNumberOfAnnotatedValues ()
 
vtkVariant GetAnnotatedValue (vtkIdType idx)
 
vtkStdString GetAnnotation (vtkIdType idx)
 
virtual void GetAnnotationColor (const vtkVariant &val, double rgba[4])
 
vtkIdType GetAnnotatedValueIndex (vtkVariant val)
 
vtkIdType GetAnnotatedValueIndexInternal (vtkVariant &val)
 
virtual bool RemoveAnnotation (vtkVariant value)
 
virtual void ResetAnnotations ()
 
void SetRange (double rng[2])
 
doubleGetColor (double v)
 
double GetLuminance (double x)
 
virtual double GetAlpha ()
 
virtual void SetVectorMode (int)
 
virtual int GetVectorMode ()
 
void SetVectorModeToMagnitude ()
 
void SetVectorModeToComponent ()
 
void SetVectorModeToRGBColors ()
 
virtual void SetVectorComponent (int)
 
virtual int GetVectorComponent ()
 
virtual void SetVectorSize (int)
 
virtual int GetVectorSize ()
 
void MapVectorsThroughTable (void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputFormat, int vectorComponent, int vectorSize)
 
void MapVectorsThroughTable (void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputFormat)
 
void MapScalarsThroughTable (vtkDataArray *scalars, unsigned char *output, int outputFormat)
 
void MapScalarsThroughTable (vtkDataArray *scalars, unsigned char *output)
 
void MapScalarsThroughTable (void *input, unsigned char *output, int inputDataType, int numberOfValues, int inputIncrement, int outputFormat)
 
virtual void SetAnnotations (vtkAbstractArray *values, vtkStringArray *annotations)
 
virtual vtkAbstractArrayGetAnnotatedValues ()
 
virtual vtkStringArrayGetAnnotations ()
 
virtual void SetIndexedLookup (int)
 
virtual int GetIndexedLookup ()
 
virtual void IndexedLookupOn ()
 
virtual void IndexedLookupOff ()
 
template<>
unsigned char ColorToUChar (double t)
 
template<>
unsigned char ColorToUChar (float t)
 
- Public Member Functions inherited from vtkObject
vtkObjectNewInstance () const
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (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)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(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)
 
- Public Member Functions inherited from vtkObjectBase
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 &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 

Static Public Member Functions

static vtkDiscretizableColorTransferFunctionNew ()
 
static int IsTypeOf (const char *type)
 
static vtkDiscretizableColorTransferFunctionSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkColorTransferFunction
static vtkColorTransferFunctionNew ()
 
static int IsTypeOf (const char *type)
 
static vtkColorTransferFunctionSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkScalarsToColors
static int IsTypeOf (const char *type)
 
static vtkScalarsToColorsSafeDownCast (vtkObjectBase *o)
 
static vtkScalarsToColorsNew ()
 
template<typename T >
static unsigned char ColorToUChar (T t)
 
template<typename T >
static void ColorToUChar (T t, unsigned char *dest)
 
- Static Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObjectBase *o)
 
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static int IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkDiscretizableColorTransferFunction ()
 
 ~vtkDiscretizableColorTransferFunction ()
 
void MapDataArrayToOpacity (vtkDataArray *scalars, int component, vtkUnsignedCharArray *colors)
 
- Protected Member Functions inherited from vtkColorTransferFunction
 vtkColorTransferFunction ()
 
 ~vtkColorTransferFunction ()
 
void SortAndUpdateRange ()
 
bool UpdateRange ()
 
void MovePoint (double oldX, double newX)
 
virtual void SetRange (double, double)
 
void SetRange (double rng[2])
 
- Protected Member Functions inherited from vtkScalarsToColors
 vtkScalarsToColors ()
 
 ~vtkScalarsToColors ()
 
virtual vtkIdType CheckForAnnotatedValue (vtkVariant value)
 
virtual void UpdateAnnotatedValueMap ()
 
void MapColorsToColors (void *input, unsigned char *output, int inputDataType, int numberOfValues, int numberOfComponents, int vectorSize, int outputFormat)
 
vtkUnsignedCharArrayConvertToRGBA (vtkDataArray *colors, int numComp, int numTuples)
 
void MapVectorsToMagnitude (void *input, double *output, int inputDataType, int numberOfValues, int numberOfComponents, int vectorSize)
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
virtual void RegisterInternal (vtkObjectBase *, int check)
 
virtual void UnRegisterInternal (vtkObjectBase *, int check)
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

int Discretize
 
int UseLogScale
 
vtkIdType NumberOfValues
 
vtkLookupTableLookupTable
 
vtkTimeStamp BuildTime
 
bool EnableOpacityMapping
 
vtkSmartPointer< vtkPiecewiseFunctionScalarOpacityFunction
 
- Protected Attributes inherited from vtkColorTransferFunction
vtkColorTransferFunctionInternals * Internal
 
int Clamping
 
int ColorSpace
 
int HSVWrap
 
int Scale
 
double NanColor [3]
 
double BelowRangeColor [3]
 
int UseBelowRangeColor
 
double AboveRangeColor [3]
 
int UseAboveRangeColor
 
doubleFunction
 
double Range [2]
 
unsigned char UnsignedCharRGBAValue [4]
 
int AllowDuplicateScalars
 
vtkTimeStamp BuildTime
 
unsigned char * Table
 
int TableSize
 
- Protected Attributes inherited from vtkScalarsToColors
vtkAbstractArrayAnnotatedValues
 
vtkStringArrayAnnotations
 
vtkInternalAnnotatedValueMap * AnnotatedValueMap
 
int IndexedLookup
 
double Alpha
 
int VectorMode
 
int VectorComponent
 
int VectorSize
 
int UseMagnitude
 
unsigned char RGBABytes [4]
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Detailed Description

a combination of vtkColorTransferFunction and vtkLookupTable.

This is a cross between a vtkColorTransferFunction and a vtkLookupTable selectively combining the functionality of both. This class is a vtkColorTransferFunction allowing users to specify the RGB control points that control the color transfer function. At the same time, by setting Discretize to 1 (true), one can force the transfer function to only have NumberOfValues discrete colors.

When IndexedLookup is true, this class behaves differently. The annotated values are considered to the be only valid values for which entries in the color table should be returned. The colors for annotated values are those specified using AddIndexedColors. Typically, there must be at least as many indexed colors specified as the annotations. For backwards compatibility, if no indexed-colors are specified, the colors in the lookup Table are assigned to annotated values by taking the modulus of their index in the list of annotations. If a scalar value is not present in AnnotatedValues, then NanColor will be used.

NOTE: One must call Build() after making any changes to the points in the ColorTransferFunction to ensure that the discrete and non-discrete versions match up.

Tests:
vtkDiscretizableColorTransferFunction (Tests)

Definition at line 55 of file vtkDiscretizableColorTransferFunction.h.

Member Typedef Documentation

Definition at line 59 of file vtkDiscretizableColorTransferFunction.h.

Constructor & Destructor Documentation

vtkDiscretizableColorTransferFunction::vtkDiscretizableColorTransferFunction ( )
protected
vtkDiscretizableColorTransferFunction::~vtkDiscretizableColorTransferFunction ( )
protected

Member Function Documentation

static vtkDiscretizableColorTransferFunction* vtkDiscretizableColorTransferFunction::New ( )
static
static int vtkDiscretizableColorTransferFunction::IsTypeOf ( const char *  type)
static
virtual int vtkDiscretizableColorTransferFunction::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 vtkColorTransferFunction.

static vtkDiscretizableColorTransferFunction* vtkDiscretizableColorTransferFunction::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkDiscretizableColorTransferFunction::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkColorTransferFunction.

vtkDiscretizableColorTransferFunction* vtkDiscretizableColorTransferFunction::NewInstance ( ) const
void vtkDiscretizableColorTransferFunction::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Print method for vtkColorTransferFunction

Reimplemented from vtkColorTransferFunction.

int vtkDiscretizableColorTransferFunction::IsOpaque ( )
virtual

Returns the negation of EnableOpacityMapping.

Reimplemented from vtkScalarsToColors.

void vtkDiscretizableColorTransferFunction::SetIndexedColor ( unsigned int  index,
const double  rgb[3] 
)
inline

Add colors to use when IndexedLookup is true. SetIndexedColor() will automatically call SetNumberOfIndexedColors(index+1) if the current number of indexed colors is not sufficient for the specified index and all will be initialized to the RGB values passed to this call.

Definition at line 71 of file vtkDiscretizableColorTransferFunction.h.

void vtkDiscretizableColorTransferFunction::SetIndexedColor ( unsigned int  index,
double  r,
double  g,
double  b 
)

Add colors to use when IndexedLookup is true. SetIndexedColor() will automatically call SetNumberOfIndexedColors(index+1) if the current number of indexed colors is not sufficient for the specified index and all will be initialized to the RGB values passed to this call.

virtual void vtkDiscretizableColorTransferFunction::GetIndexedColor ( vtkIdType  i,
double  rgba[4] 
)
virtual

Get the "indexed color" assigned to an index. The index is used in IndexedLookup mode to assign colors to annotations (in the order the annotations were set). Subclasses must implement this and interpret how to treat the index. vtkLookupTable simply returns GetTableValue(index % this->GetNumberOfTableValues()). vtkColorTransferFunction returns the color assocated with node index % this->GetSize(). Note that implementations must set the opacity (alpha) component of the color, even if they do not provide opacity values in their colormaps. In that case, alpha = 1 should be used.

Reimplemented from vtkColorTransferFunction.

void vtkDiscretizableColorTransferFunction::SetNumberOfIndexedColors ( unsigned int  count)

Set the number of indexed colors. These are used when IndexedLookup is true. If no indexed colors are specified, for backwards compatibility, this class reverts to using the RGBPoints for colors.

unsigned int vtkDiscretizableColorTransferFunction::GetNumberOfIndexedColors ( )

Set the number of indexed colors. These are used when IndexedLookup is true. If no indexed colors are specified, for backwards compatibility, this class reverts to using the RGBPoints for colors.

virtual void vtkDiscretizableColorTransferFunction::Build ( )
virtual

Generate discretized lookup table, if applicable. This method must be called after changes to the ColorTransferFunction otherwise the discretized version will be inconsistent with the non-discretized one.

Reimplemented from vtkScalarsToColors.

virtual void vtkDiscretizableColorTransferFunction::SetDiscretize ( int  )
virtual

Set if the values are to be mapped after discretization. The number of discrete values is set by using SetNumberOfValues(). Not set by default, i.e. color value is determined by interpolating at the scalar value.

virtual int vtkDiscretizableColorTransferFunction::GetDiscretize ( )
virtual

Set if the values are to be mapped after discretization. The number of discrete values is set by using SetNumberOfValues(). Not set by default, i.e. color value is determined by interpolating at the scalar value.

virtual void vtkDiscretizableColorTransferFunction::DiscretizeOn ( )
virtual

Set if the values are to be mapped after discretization. The number of discrete values is set by using SetNumberOfValues(). Not set by default, i.e. color value is determined by interpolating at the scalar value.

virtual void vtkDiscretizableColorTransferFunction::DiscretizeOff ( )
virtual

Set if the values are to be mapped after discretization. The number of discrete values is set by using SetNumberOfValues(). Not set by default, i.e. color value is determined by interpolating at the scalar value.

virtual void vtkDiscretizableColorTransferFunction::SetUseLogScale ( int  useLogScale)
virtual

Get/Set if log scale must be used while mapping scalars to colors. The default is 0.

virtual int vtkDiscretizableColorTransferFunction::GetUseLogScale ( )
virtual

Get/Set if log scale must be used while mapping scalars to colors. The default is 0.

virtual void vtkDiscretizableColorTransferFunction::SetNumberOfValues ( vtkIdType  )
virtual

Set the number of values i.e. colors to be generated in the discrete lookup table. This has no effect if Discretize is off. The default is

virtual vtkIdType vtkDiscretizableColorTransferFunction::GetNumberOfValues ( )
virtual

Set the number of values i.e. colors to be generated in the discrete lookup table. This has no effect if Discretize is off. The default is

virtual unsigned char* vtkDiscretizableColorTransferFunction::MapValue ( double  v)
virtual

Map one value through the lookup table and return a color defined as a RGBA unsigned char tuple (4 bytes).

Reimplemented from vtkColorTransferFunction.

virtual void vtkDiscretizableColorTransferFunction::GetColor ( double  v,
double  rgb[3] 
)
virtual

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

Reimplemented from vtkColorTransferFunction.

virtual double vtkDiscretizableColorTransferFunction::GetOpacity ( double  v)
virtual

Return the opacity of a given scalar.

Reimplemented from vtkScalarsToColors.

virtual vtkUnsignedCharArray* vtkDiscretizableColorTransferFunction::MapScalars ( vtkDataArray scalars,
int  colorMode,
int  component 
)
virtual

Internal methods that map a data array into a 4-component, unsigned char RGBA array. The color mode determines the behavior of mapping. If VTK_COLOR_MODE_DEFAULT is set, then unsigned char data arrays are treated as colors (and converted to RGBA if necessary); otherwise, the data is mapped through this instance of ScalarsToColors. The offset is used for data arrays with more than one component; it indicates which component to use to do the blending. When the component argument is -1, then the this object uses its own selected technique to change a vector into a scalar to map. When IndexedLookup (inherited from vtkScalarsToColors) is true, the scalar opacity function is not used regardless of EnableOpacityMapping.

Reimplemented from vtkScalarsToColors.

virtual vtkUnsignedCharArray* vtkDiscretizableColorTransferFunction::MapScalars ( vtkAbstractArray scalars,
int  colorMode,
int  component 
)
virtual

Internal methods that map a data array into a 4-component, unsigned char RGBA array. The color mode determines the behavior of mapping. If VTK_COLOR_MODE_DEFAULT is set, then unsigned char data arrays are treated as colors (and converted to RGBA if necessary); otherwise, the data is mapped through this instance of ScalarsToColors. The offset is used for data arrays with more than one component; it indicates which component to use to do the blending. When the component argument is -1, then the this object uses its own selected technique to change a vector into a scalar to map. When IndexedLookup (inherited from vtkScalarsToColors) is true, the scalar opacity function is not used regardless of EnableOpacityMapping.

Reimplemented from vtkScalarsToColors.

double* vtkDiscretizableColorTransferFunction::GetRGBPoints ( )

Returns the (x, r, g, b) values as an array. vtkColorTransferFunction::GetDataPointer(). Retained for backwards compatibility.

Deprecated:
Use GetDataPointer() instead.
virtual void vtkDiscretizableColorTransferFunction::SetAlpha ( double  alpha)
virtual

Specify an additional opacity (alpha) value to blend with. Values != 1 modify the resulting color consistent with the requested form of the output. This is typically used by an actor in order to blend its opacity. Overridden to pass the alpha to the internal vtkLookupTable.

Reimplemented from vtkScalarsToColors.

virtual void vtkDiscretizableColorTransferFunction::SetNanColor ( double  r,
double  g,
double  b 
)
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]. Overridden to pass the NanColor to the internal vtkLookupTable.

Reimplemented from vtkColorTransferFunction.

virtual void vtkDiscretizableColorTransferFunction::SetNanColor ( double  rgb[3])
inlinevirtual

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]. Overridden to pass the NanColor to the internal vtkLookupTable.

Reimplemented from vtkColorTransferFunction.

Definition at line 172 of file vtkDiscretizableColorTransferFunction.h.

virtual int vtkDiscretizableColorTransferFunction::UsingLogScale ( )
inlinevirtual

This should return 1 if the subclass is using log scale for mapping scalars to colors.

Reimplemented from vtkScalarsToColors.

Definition at line 180 of file vtkDiscretizableColorTransferFunction.h.

virtual vtkIdType vtkDiscretizableColorTransferFunction::GetNumberOfAvailableColors ( )
virtual

Get the number of available colors for mapping to.

Reimplemented from vtkColorTransferFunction.

virtual void vtkDiscretizableColorTransferFunction::SetScalarOpacityFunction ( vtkPiecewiseFunction function)
virtual

Set/get the opacity function to use.

virtual vtkPiecewiseFunction* vtkDiscretizableColorTransferFunction::GetScalarOpacityFunction ( ) const
virtual

Set/get the opacity function to use.

virtual void vtkDiscretizableColorTransferFunction::SetEnableOpacityMapping ( bool  )
virtual

Enable/disable the usage of the scalar opacity function.

virtual bool vtkDiscretizableColorTransferFunction::GetEnableOpacityMapping ( )
virtual

Enable/disable the usage of the scalar opacity function.

virtual void vtkDiscretizableColorTransferFunction::EnableOpacityMappingOn ( )
virtual

Enable/disable the usage of the scalar opacity function.

virtual void vtkDiscretizableColorTransferFunction::EnableOpacityMappingOff ( )
virtual

Enable/disable the usage of the scalar opacity function.

virtual unsigned long vtkDiscretizableColorTransferFunction::GetMTime ( )
virtual

Overridden to include the ScalarOpacityFunction's MTime.

Reimplemented from vtkObject.

void vtkDiscretizableColorTransferFunction::MapDataArrayToOpacity ( vtkDataArray scalars,
int  component,
vtkUnsignedCharArray colors 
)
protected

Member Data Documentation

int vtkDiscretizableColorTransferFunction::Discretize
protected

Flag indicating whether transfer function is discretized.

Definition at line 208 of file vtkDiscretizableColorTransferFunction.h.

int vtkDiscretizableColorTransferFunction::UseLogScale
protected

Flag indicating whether log scaling is to be used.

Definition at line 211 of file vtkDiscretizableColorTransferFunction.h.

vtkIdType vtkDiscretizableColorTransferFunction::NumberOfValues
protected

Number of values to use in discretized color map.

Definition at line 214 of file vtkDiscretizableColorTransferFunction.h.

vtkLookupTable* vtkDiscretizableColorTransferFunction::LookupTable
protected

Internal lookup table used for some aspects of the color mapping

Definition at line 217 of file vtkDiscretizableColorTransferFunction.h.

vtkTimeStamp vtkDiscretizableColorTransferFunction::BuildTime
protected

Definition at line 219 of file vtkDiscretizableColorTransferFunction.h.

bool vtkDiscretizableColorTransferFunction::EnableOpacityMapping
protected

Definition at line 221 of file vtkDiscretizableColorTransferFunction.h.

vtkSmartPointer<vtkPiecewiseFunction> vtkDiscretizableColorTransferFunction::ScalarOpacityFunction
protected

Definition at line 222 of file vtkDiscretizableColorTransferFunction.h.


The documentation for this class was generated from the following file: