Commit dafe5a0b authored by Cory Quammen's avatar Cory Quammen

Added previous signature back for MapScalars() method

Even though the MapScalars() method is designated an internal method
in vtkScalarsToColors and vtkDiscretizableColorTransferFunction
classes, backwards compatibily for outside classes that override this
method was broken by a signature change for the method in commit
94498364. Hat tip to Marcus Hanwell
for identifying the problem with the previous commit and suggesting
the fix.

Change-Id: I78c05ae4041bb07c9ec3978c4e6cc6e80433d871
parent a8d8b475
......@@ -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