Updates will be applied April 15th at 12pm EDT (UTC-0400). GitLab could be a little slow between 12 - 12:45pm EDT.

Commit 63366102 authored by Sean McBride's avatar Sean McBride

General review and cleanup of vtkLookupTable and friends

- made vtkScalarsToColors::SetRange(double[2]) virtual, since the other SetRange() is.  Likewise vtkLookupTable::SetTableRange(double[2]).
- changed most uses of dangerous GetTableValue() (that returns inner buffer) in favour of version that copies the values out.
- use fixed-size memcpy in a few places for a potential speedup
- improved some comments
- added a few consts, especially with buffers
- removed const on plain old ints
- moved a nan check earlier, saving work when true
- moved some variable declarations closer to initialization
- removed some unneeded semi colons
- removed some useless casts, added others for clarity
parent 4b500b22
......@@ -176,7 +176,7 @@ void vtkCompositeControlPointsItem::DrawPoint(vtkContext2D* painter, vtkIdType i
{
double xvms[4];
this->OpacityFunction->GetNodeValue(index, xvms);
unsigned char* rgb = this->ColorTransferFunction->MapValue(xvms[0]);
const unsigned char* rgb = this->ColorTransferFunction->MapValue(xvms[0]);
painter->GetBrush()->SetColorF(
rgb[0] / 255., rgb[1] / 255., rgb[2] / 255., 0.55);
}
......
......@@ -228,11 +228,10 @@ void vtkPlot3D::SetColors(vtkDataArray *colorArr)
for (unsigned int i = 0; i < this->Points.size(); ++i)
{
double value = colorArr->GetComponent(i, 0);
unsigned char *rgb = lookupTable->MapValue(value);
const unsigned char constRGB[3] = { rgb[0], rgb[1], rgb[2] };
this->Colors->InsertNextTypedTuple(&constRGB[0]);
this->Colors->InsertNextTypedTuple(&constRGB[1]);
this->Colors->InsertNextTypedTuple(&constRGB[2]);
const unsigned char *rgb = lookupTable->MapValue(value);
this->Colors->InsertNextTypedTuple(&rgb[0]);
this->Colors->InsertNextTypedTuple(&rgb[1]);
this->Colors->InsertNextTypedTuple(&rgb[2]);
}
this->Modified();
......
......@@ -235,11 +235,10 @@ void vtkPlotSurface::InsertSurfaceVertex(float *data, float value, int i,
data[pos] = value;
++pos;
unsigned char *rgb = this->LookupTable->MapValue(data[pos-1]);
const unsigned char constRGB[3] = { rgb[0], rgb[1], rgb[2] };
this->Colors->InsertNextTypedTuple(&constRGB[0]);
this->Colors->InsertNextTypedTuple(&constRGB[1]);
this->Colors->InsertNextTypedTuple(&constRGB[2]);
const unsigned char *rgb = this->LookupTable->MapValue(data[pos-1]);
this->Colors->InsertNextTypedTuple(&rgb[0]);
this->Colors->InsertNextTypedTuple(&rgb[1]);
this->Colors->InsertNextTypedTuple(&rgb[2]);
}
//-----------------------------------------------------------------------------
......
......@@ -36,7 +36,7 @@ if (!(t)) \
&& vtkMathUtilities::FuzzyCompare<double>(t1[2], t2[2]) \
&& vtkMathUtilities::FuzzyCompare<double>(t1[3], t2[3])))
int TestColor4uc(unsigned char* expected, unsigned char* test)
int TestColor4uc(const unsigned char* expected, const unsigned char* test)
{
int failed = expected[0] != test[0] || expected[1] != test[1] ||
expected[2] != test[2] || expected[3] != test[3] ? 1 : 0;
......@@ -113,7 +113,7 @@ int TestLookupTable(int,char *[])
TestAssert(table->GetUseBelowRangeColor() == 0);
TestAssert(table->GetUseAboveRangeColor() == 0);
unsigned char expected[4], *result;
unsigned char expected[4];
// Test handling of below-range colors
vtkMath::HSVToRGB(table->GetHueRange()[0],
......@@ -125,7 +125,7 @@ int TestLookupTable(int,char *[])
vtkLookupTable::GetColorAsUnsignedChars(rgba, expected);
table->UseBelowRangeColorOff();
table->Build();
result = table->MapValue(lo);
const unsigned char *result = table->MapValue(lo);
TestAssert(TestColor4uc(expected, result));
table->GetBelowRangeColor(rgba);
......
......@@ -81,7 +81,7 @@ vtkLookupTable::vtkLookupTable(int sze, int ext)
this->Ramp = VTK_RAMP_SCURVE;
this->Scale = VTK_SCALE_LINEAR;
this->OpaqueFlag=1;
this->OpaqueFlag = 1;
}
//----------------------------------------------------------------------------
......@@ -94,7 +94,7 @@ vtkLookupTable::~vtkLookupTable()
//----------------------------------------------------------------------------
// Description:
// Return true if all of the values defining the mapping have an opacity
// equal to 1. Default implementation return true.
// equal to 1. Default implementation returns true.
int vtkLookupTable::IsOpaque()
{
if(this->OpaqueFlagBuildTime<this->GetMTime())
......@@ -105,7 +105,7 @@ int vtkLookupTable::IsOpaque()
if (this->UseAboveRangeColor && this->AboveRangeColor[3] < 1.0) { opaque = 0; }
vtkIdType size=this->Table->GetNumberOfTuples();
vtkIdType i=0;
unsigned char *ptr=this->Table->GetPointer(0);
const unsigned char *ptr=this->Table->GetPointer(0);
while(opaque && i<size)
{
opaque=ptr[3]==255;
......@@ -120,9 +120,7 @@ int vtkLookupTable::IsOpaque()
}
//----------------------------------------------------------------------------
// Scalar values greater than maximum range value are clamped to maximum
// range value.
void vtkLookupTable::SetTableRange(double r[2])
void vtkLookupTable::SetTableRange(const double r[2])
{
this->SetTableRange(r[0],r[1]);
}
......@@ -196,12 +194,9 @@ int vtkLookupTable::Allocate(int sz, int ext)
// Force the lookup table to rebuild
void vtkLookupTable::ForceBuild()
{
double hue, sat, val, hinc, sinc, vinc, ainc;
double rgba[4], alpha;
unsigned char *c_rgba;
vtkIdType maxIndex = this->NumberOfColors - 1;
double hinc, sinc, vinc, ainc;
if( maxIndex > 0 )
{
hinc = (this->HueRange[1] - this->HueRange[0])/maxIndex;
......@@ -214,17 +209,18 @@ void vtkLookupTable::ForceBuild()
hinc = sinc = vinc = ainc = 0.0;
}
double rgba[4];
for (vtkIdType i = 0; i <= maxIndex; i++)
{
hue = this->HueRange[0] + i*hinc;
sat = this->SaturationRange[0] + i*sinc;
val = this->ValueRange[0] + i*vinc;
alpha = this->AlphaRange[0] + i*ainc;
double hue = this->HueRange[0] + i*hinc;
double sat = this->SaturationRange[0] + i*sinc;
double val = this->ValueRange[0] + i*vinc;
double alpha = this->AlphaRange[0] + i*ainc;
vtkMath::HSVToRGB(hue, sat, val, &rgba[0], &rgba[1], &rgba[2]);
rgba[3] = alpha;
c_rgba = this->Table->WritePointer(4*i,4);
unsigned char *c_rgba = this->Table->WritePointer(4*i,4);
switch(this->Ramp)
{
......@@ -294,7 +290,6 @@ void vtkLookupTable::Build()
}
}
//----------------------------------------------------------------------------
void vtkLookupTable::BuildSpecialColors()
{
......@@ -385,7 +380,7 @@ void vtkLookupTable::BuildSpecialColors()
// get the color for a scalar value
void vtkLookupTable::GetColor(double v, double rgb[3])
{
unsigned char *rgb8 = this->MapValue(v);
const unsigned char *rgb8 = this->MapValue(v);
rgb[0] = rgb8[0]/255.0;
rgb[1] = rgb8[1]/255.0;
......@@ -396,7 +391,7 @@ void vtkLookupTable::GetColor(double v, double rgb[3])
// get the opacity (alpha) for a scalar value
double vtkLookupTable::GetOpacity(double v)
{
unsigned char *rgb8 = this->MapValue(v);
const unsigned char *rgb8 = this->MapValue(v);
return rgb8[3]/255.0;
}
......@@ -641,6 +636,14 @@ vtkIdType vtkLookupTable::GetIndex(double v)
return this->GetAnnotatedValueIndex( v ) % this->GetNumberOfTableValues();
}
// Map to an index:
// First, check whether we have a number...
if ( vtkMath::IsNan( v ) )
{
// For backwards compatibility
return -1;
}
TableParameters p;
p.NumColors = this->NumberOfColors;
......@@ -660,14 +663,6 @@ vtkIdType vtkLookupTable::GetIndex(double v)
p.Range[1] = this->TableRange[1];
}
// Map to an index:
// First, check whether we have a number...
if ( vtkMath::IsNan( v ) )
{
// For backwards compatibility
return -1;
}
vtkIdType index = vtkLinearIndexLookupMain(v, p);
// For backwards compatibility, if the index indicates an
......@@ -741,7 +736,7 @@ unsigned char* vtkLookupTable::GetNanColorAsUnsignedChars()
}
//----------------------------------------------------------------------------
// Given a scalar value v, return an rgba color value from lookup table.
// Given a scalar value v, return an RGBA color value from lookup table.
unsigned char* vtkLookupTable::MapValue(double v)
{
vtkIdType index = this->GetIndex(v);
......@@ -782,7 +777,6 @@ void vtkLookupTableMapData(vtkLookupTable *self,
int i = length;
const double *range = self->GetTableRange();
const unsigned char *cptr;
double alpha;
// Resize the internal table to hold the special colors at the
// end. When this function is called repeatedly with the same size
......@@ -793,7 +787,8 @@ void vtkLookupTableMapData(vtkLookupTable *self,
const unsigned char* table = lookupTable->GetPointer(0);
if ( (alpha=self->GetAlpha()) >= 1.0 ) //no blending required
double alpha = self->GetAlpha();
if ( alpha >= 1.0 ) //no blending required
{
if (self->GetScale() == VTK_SCALE_LOG10)
{
......@@ -1035,22 +1030,21 @@ void vtkLookupTableMapData(vtkLookupTable *self,
}//alpha blending
}
//----------------------------------------------------------------------------
template<class T>
void vtkLookupTableIndexedMapData(
vtkLookupTable* self, T* input, unsigned char* output, int length,
vtkLookupTable* self, const T* input, unsigned char* output, int length,
int inIncr, int outFormat )
{
int i = length;
unsigned char* cptr;
double alpha;
unsigned char nanColor[4];
vtkLookupTable::GetColorAsUnsignedChars(self->GetNanColor(), nanColor);
vtkVariant vin;
if ( (alpha=self->GetAlpha()) >= 1.0 ) //no blending required
double alpha = self->GetAlpha();
if ( alpha >= 1.0 ) //no blending required
{
if (outFormat == VTK_RGBA)
{
......@@ -1060,10 +1054,7 @@ void vtkLookupTableIndexedMapData(
vtkIdType idx = self->GetAnnotatedValueIndexInternal( vin );
cptr = idx < 0 ? nanColor : self->GetPointer( idx );
output[0] = cptr[0];
output[1] = cptr[1];
output[2] = cptr[2];
output[3] = cptr[3];
memcpy(output, cptr, 4);
input += inIncr;
output += 4;
}
......@@ -1076,9 +1067,7 @@ void vtkLookupTableIndexedMapData(
vtkIdType idx = self->GetAnnotatedValueIndexInternal( vin );
cptr = idx < 0 ? nanColor : self->GetPointer( idx );
output[0] = cptr[0];
output[1] = cptr[1];
output[2] = cptr[2];
memcpy(output, cptr, 3);
input += inIncr;
output += 3;
}
......@@ -1120,9 +1109,7 @@ void vtkLookupTableIndexedMapData(
vin = *input;
vtkIdType idx = self->GetAnnotatedValueIndexInternal( vin );
cptr = idx < 0 ? nanColor : self->GetPointer( idx );
output[0] = cptr[0];
output[1] = cptr[1];
output[2] = cptr[2];
memcpy(output, cptr, 3);
output[3] = static_cast<unsigned char>(cptr[3]*alpha + 0.5);
input += inIncr;
output += 4;
......@@ -1135,9 +1122,7 @@ void vtkLookupTableIndexedMapData(
vin = *input;
vtkIdType idx = self->GetAnnotatedValueIndexInternal( vin );
cptr = idx < 0 ? nanColor : self->GetPointer( idx );
output[0] = cptr[0];
output[1] = cptr[1];
output[2] = cptr[2];
memcpy(output, cptr, 3);
input += inIncr;
output += 3;
}
......@@ -1197,7 +1182,7 @@ void vtkLookupTable::MapScalarsThroughTable2(void *input,
newInput->SetValue(i, bitArray->GetValue(id));
}
vtkLookupTableIndexedMapData(this,
static_cast<unsigned char*>(newInput->GetPointer(0)),
newInput->GetPointer(0),
output,numberOfValues,
inputIncrement,outputFormat);
newInput->Delete();
......@@ -1238,7 +1223,7 @@ void vtkLookupTable::MapScalarsThroughTable2(void *input,
{
newInput->SetValue(i, bitArray->GetValue(id));
}
vtkLookupTableMapData(this, static_cast<unsigned char*>(newInput->GetPointer(0)),
vtkLookupTableMapData(this, newInput->GetPointer(0),
output, numberOfValues,
inputIncrement, outputFormat, p);
newInput->Delete();
......@@ -1278,7 +1263,7 @@ void vtkLookupTable::SetNumberOfTableValues(vtkIdType number)
// Directly load color into lookup table. Use [0,1] double values for color
// component specification. Make sure that you've either used the
// Build() method or used SetNumberOfTableValues() prior to using this method.
void vtkLookupTable::SetTableValue(vtkIdType indx, double rgba[4])
void vtkLookupTable::SetTableValue(vtkIdType indx, const double rgba[4])
{
// Check the index to make sure it is valid
if (indx < 0)
......@@ -1322,22 +1307,19 @@ void vtkLookupTable::SetTableValue(vtkIdType indx, double rgba[4])
void vtkLookupTable::SetTableValue(vtkIdType indx, double r, double g, double b,
double a)
{
double rgba[4];
rgba[0] = r; rgba[1] = g; rgba[2] = b; rgba[3] = a;
const double rgba[4] = {r, g, b, a};
this->SetTableValue(indx,rgba);
}
//----------------------------------------------------------------------------
// Return a rgba color value for the given index into the lookup Table. Color
// Return an RGBA color value for the given index into the lookup Table. Color
// components are expressed as [0,1] double values.
void vtkLookupTable::GetTableValue(vtkIdType indx, double rgba[4])
{
unsigned char *_rgba;
indx = (indx < 0 ? 0 : (indx >= this->NumberOfColors ?
this->NumberOfColors-1 : indx));
_rgba = this->Table->GetPointer(indx*4);
const unsigned char *_rgba = this->Table->GetPointer(indx*4);
rgba[0] = _rgba[0]/255.0;
rgba[1] = _rgba[1]/255.0;
......@@ -1345,7 +1327,7 @@ void vtkLookupTable::GetTableValue(vtkIdType indx, double rgba[4])
rgba[3] = _rgba[3]/255.0;
}
// Return a rgba color value for the given index into the lookup table. Color
// Return an RGBA color value for the given index into the lookup table. Color
// components are expressed as [0,1] double values.
double *vtkLookupTable::GetTableValue(vtkIdType indx)
{
......
......@@ -17,7 +17,7 @@
* @brief map scalar values into colors via a lookup table
*
* vtkLookupTable is an object that is used by mapper objects to map scalar
* values into RGBA (red-green-blue-alpha transparency) color specification,
* values into RGBA (red-green-blue-alpha) color specification,
* or RGBA into scalar values. The color table can be created by direct
* insertion of color values, or by specifying a hue, saturation, value, and
* alpha range and generating a table.
......@@ -72,6 +72,7 @@ public:
/**
* Constants for offsets of special colors (e.g., NanColor, BelowRangeColor,
* AboveRangeColor) from the maximum index in the lookup table.
* These should be considered private and not be used by clients of this class.
*/
static const vtkIdType REPEATED_LAST_COLOR_INDEX;
static const vtkIdType BELOW_RANGE_COLOR_INDEX;
......@@ -97,6 +98,7 @@ public:
/**
* Allocate a color table of specified size.
* Note that ext is no longer used.
*/
int Allocate(int sz=256, int ext=256);
......@@ -122,18 +124,21 @@ public:
//@{
/**
* Set the shape of the table ramp to either linear or S-curve.
* Set the shape of the table ramp to either S-curve, linear, or sqrt.
* The default is S-curve, which tails off gradually at either end.
*
* The equation used for the S-curve is y = (sin((x - 1/2)*pi) + 1)/2,
* while the equation for the linear ramp is simply y = x. For an
* S-curve greyscale ramp, you should set NumberOfTableValues to 402
* (which is 256*pi/2) to provide room for the tails of the ramp.
* For an S-curve greyscale ramp, you should set NumberOfTableValues
* to 402 (which is 256*pi/2) to provide room for the tails of the ramp.
*
* The equation for the linear ramp is simply y = x.
*
* The equation for the SQRT is y = sqrt(x).
*/
vtkSetMacro(Ramp,int);
void SetRampToLinear() { this->SetRamp(VTK_RAMP_LINEAR); };
void SetRampToSCurve() { this->SetRamp(VTK_RAMP_SCURVE); };
void SetRampToSQRT() { this->SetRamp(VTK_RAMP_SQRT); };
void SetRampToLinear() { this->SetRamp(VTK_RAMP_LINEAR); }
void SetRampToSCurve() { this->SetRamp(VTK_RAMP_SCURVE); }
void SetRampToSQRT() { this->SetRamp(VTK_RAMP_SQRT); }
vtkGetMacro(Ramp,int);
//@}
......@@ -144,8 +149,8 @@ public:
* cross the value zero.
*/
void SetScale(int scale);
void SetScaleToLinear() { this->SetScale(VTK_SCALE_LINEAR); };
void SetScaleToLog10() { this->SetScale(VTK_SCALE_LOG10); };
void SetScaleToLinear() { this->SetScale(VTK_SCALE_LINEAR); }
void SetScaleToLog10() { this->SetScale(VTK_SCALE_LOG10); }
vtkGetMacro(Scale,int);
//@}
......@@ -158,7 +163,7 @@ public:
* The \a TableRange values are only used when \a IndexedLookup is false.
*/
void SetTableRange(double r[2]);
virtual void SetTableRange(const double r[2]);
virtual void SetTableRange(double min, double max);
vtkGetVectorMacro(TableRange,double,2);
//@}
......@@ -215,8 +220,7 @@ public:
unsigned char* GetNanColorAsUnsignedChars();
/**
* Cast a double color in a type T color. colorIn and colorOut are
* expected to be RGBA[4] and colorIn to be in [0.0, 1.0]
* Given an RGBA[4] color in the [0,1] range, convert it to RGBA[4] in the [0,255] range.
*/
static void GetColorAsUnsignedChars(const double colorIn[4],
unsigned char colorOut[4]);
......@@ -258,13 +262,13 @@ public:
//@}
/**
* Map one value through the lookup table.
* Map one value through the lookup table, returning an RBGA[4] color.
*/
unsigned char* MapValue(double v) override;
/**
* Map one value through the lookup table and return the color as
* an RGB array of doubles between 0 and 1.
* an RGB[3] array of doubles between 0 and 1. Note lack of alpha.
*/
void GetColor(double x, double rgb[3]) override;
......@@ -276,6 +280,7 @@ public:
/**
* Return the table index associated with a particular value.
* Returns -1 if \a v is NaN.
* Do not use this function when \a IndexedLookup is true:
* in that case, the set of values \a v may take on is exactly the integers
......@@ -286,11 +291,10 @@ public:
//@{
/**
* Specify the number of values (i.e., colors) in the lookup
* table.
* Specify the number of values (i.e., colors) in the lookup table.
*/
void SetNumberOfTableValues(vtkIdType number);
vtkIdType GetNumberOfTableValues() { return this->NumberOfColors; };
vtkIdType GetNumberOfTableValues() { return this->NumberOfColors; }
//@}
/**
......@@ -299,33 +303,33 @@ public:
* Build() method or used SetNumberOfTableValues() prior to using this
* method.
*/
virtual void SetTableValue(vtkIdType indx, double rgba[4]);
virtual void SetTableValue(vtkIdType indx, const double rgba[4]);
/**
* Directly load color into lookup table. Use [0,1] double values for color
* component specification.
* component specification. Alpha defaults to 1 if unspecified.
*/
virtual void SetTableValue(vtkIdType indx,
double r, double g, double b, double a=1.0);
/**
* Return a rgba color value for the given index into the lookup table. Color
* Return an RGBA color value for the given index into the lookup table. Color
* components are expressed as [0,1] double values.
*/
double *GetTableValue(vtkIdType id);
/**
* Return a rgba color value for the given index into the lookup table. Color
* Return an RGBA color value for the given index into the lookup table. Color
* components are expressed as [0,1] double values.
*/
void GetTableValue(vtkIdType id, double rgba[4]);
/**
* Get pointer to color table data. Format is array of unsigned char
* r-g-b-a-r-g-b-a...
* R-G-B-A...R-G-B-A.
*/
unsigned char *GetPointer(const vtkIdType id) {
return this->Table->GetPointer(4*id); };
unsigned char *GetPointer(vtkIdType id) {
return this->Table->GetPointer(4*id); }
/**
* Get pointer to data. Useful for direct writes into object. MaxId is bumped
......@@ -337,7 +341,7 @@ public:
* afterwards to ensure that the special colors (below/above range and NaN
* value) are up-to-date.
*/
unsigned char *WritePointer(const vtkIdType id, const int number);
unsigned char *WritePointer(vtkIdType id, int number);
//@{
/**
......@@ -345,10 +349,10 @@ public:
* of Get/SetTableRange.
*/
double *GetRange() override
{ return this->GetTableRange(); };
{ return this->GetTableRange(); }
void SetRange(double min, double max) override
{ this->SetTableRange(min, max); };
void SetRange(double rng[2]) { this->SetRange(rng[0], rng[1]); };
{ this->SetTableRange(min, max); }
void SetRange(const double rng[2]) override { this->SetRange(rng[0], rng[1]); }
//@}
/**
......@@ -387,7 +391,7 @@ public:
//@}
/**
* map a set of scalars through the lookup table
* Map a set of scalars through the lookup table.
* This member function is thread safe.
*/
......@@ -399,17 +403,17 @@ public:
int outputIncrement) override;
/**
* Copy the contents from another LookupTable
* Copy the contents from another LookupTable.
*/
void DeepCopy(vtkScalarsToColors *lut) override;
/**
* This should return 1 is the subclass is using log scale for mapping scalars
* This should return 1 if the subclass is using log scale for mapping scalars
* to colors. Returns 1 is scale == VTK_SCALE_LOG10.
*/
int UsingLogScale() override
{
return (this->GetScale() == VTK_SCALE_LOG10)? 1 : 0;
return (this->GetScale() == VTK_SCALE_LOG10) ? 1 : 0;
}
/**
......@@ -465,11 +469,11 @@ private:
};
//----------------------------------------------------------------------------
inline unsigned char *vtkLookupTable::WritePointer(const vtkIdType id,
const int number)
inline unsigned char *vtkLookupTable::WritePointer(vtkIdType id,
int number)
{
this->InsertTime.Modified();
return this->Table->WritePointer(4*id,4*number);
return this->Table->WritePointer(4*id, 4*number);
}
#endif
......@@ -430,6 +430,7 @@ namespace
#define vtkScalarsToColorsLuminance(r, g, b) \
((r)*0.30 + (g)*0.59 + (b)*0.11)
//----------------------------------------------------------------------------
void vtkScalarsToColorsLuminanceToLuminance(
const unsigned char *inPtr, unsigned char *outPtr, vtkIdType count,
int numComponents)
......@@ -442,6 +443,7 @@ void vtkScalarsToColorsLuminanceToLuminance(
while (--count);
}
//----------------------------------------------------------------------------
void vtkScalarsToColorsLuminanceToRGB(
const unsigned char *inPtr, unsigned char *outPtr, vtkIdType count,
int numComponents)
......@@ -458,6 +460,7 @@ void vtkScalarsToColorsLuminanceToRGB(
while (--count);
}
//----------------------------------------------------------------------------
void vtkScalarsToColorsRGBToLuminance(
const unsigned char *inPtr, unsigned char *outPtr, vtkIdType count,
int numComponents)
......@@ -474,6 +477,7 @@ void vtkScalarsToColorsRGBToLuminance(
while (--count);
}
//----------------------------------------------------------------------------
void vtkScalarsToColorsRGBToRGB(
const unsigned char *inPtr, unsigned char *outPtr, vtkIdType count,
int numComponents)
......@@ -489,6 +493,7 @@ void vtkScalarsToColorsRGBToRGB(
while (--count);
}
//----------------------------------------------------------------------------
void vtkScalarsToColorsLuminanceToLuminanceAlpha(
const unsigned char *inPtr, unsigned char *outPtr, vtkIdType count,
int