Commit d78993aa authored by Cory Quammen's avatar Cory Quammen Committed by Code Review

Merge topic 'MapScalarsBackwardsCompatibility' into master

dafe5a0b Added previous signature back for MapScalars() method
parents a8d8b475 dafe5a0b
......@@ -220,6 +220,13 @@ unsigned char *vtkScalarsToColors::MapValue(double v)
return this->RGBABytes;
}
//----------------------------------------------------------------------------
vtkUnsignedCharArray *vtkScalarsToColors::MapScalars(vtkDataArray *scalars,
int colorMode, int component)
{
return this->MapScalars(static_cast<vtkAbstractArray*>(scalars), colorMode, component);
}
//----------------------------------------------------------------------------
vtkUnsignedCharArray *vtkScalarsToColors::MapScalars(vtkAbstractArray *scalars,
int colorMode, int component)
......
......@@ -117,7 +117,7 @@ public:
vtkGetMacro(Alpha,double);
// Description:
// An internal method that maps a data array into a 4-component,
// 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
......@@ -132,6 +132,8 @@ public:
// 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.
virtual vtkUnsignedCharArray *MapScalars(vtkDataArray *scalars, int colorMode,
int component);
virtual vtkUnsignedCharArray *MapScalars(vtkAbstractArray *scalars, int colorMode,
int component);
......
......@@ -328,6 +328,13 @@ double vtkDiscretizableColorTransferFunction::GetOpacity(double v)
return this->ScalarOpacityFunction->GetValue(v);
}
//-----------------------------------------------------------------------------
vtkUnsignedCharArray* vtkDiscretizableColorTransferFunction::MapScalars(
vtkDataArray *scalars, int colorMode, int component)
{
return this->MapScalars(static_cast<vtkAbstractArray*>(scalars), colorMode, component);
}
//-----------------------------------------------------------------------------
vtkUnsignedCharArray* vtkDiscretizableColorTransferFunction::MapScalars(
vtkAbstractArray *scalars, int colorMode, int component)
......
......@@ -133,7 +133,7 @@ public:
virtual double GetOpacity(double v);
// Description:
// An internal method maps a data array into a 4-component, unsigned char
// 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,
......@@ -146,6 +146,8 @@ public:
// When \a IndexedLookup (inherited from vtkScalarsToColors) is true,
// the scalar opacity function is not used regardless of
// \a EnableOpacityMapping.
virtual vtkUnsignedCharArray *MapScalars(vtkDataArray *scalars, int colorMode,
int component);
virtual vtkUnsignedCharArray *MapScalars(vtkAbstractArray *scalars, int colorMode,
int component);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment