Updates will be applied on October 27th between 12pm - 12:45pm EDT (UTC-0400). Gitlab may be slow during the maintenance window.

Commit 8f4ec2da authored by Sean McBride's avatar Sean McBride Committed by Kitware Robot
Browse files

Merge topic 'MapValueConst'

ce5575e3

 Made vtkScalarsToColor::MapValue() return const
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Reviewed-by: David Gobbi's avatarDavid Gobbi <david.gobbi@gmail.com>
Merge-request: !3639
parents ff59046e ce5575e3
......@@ -737,7 +737,7 @@ unsigned char* vtkLookupTable::GetNanColorAsUnsignedChars()
//----------------------------------------------------------------------------
// Given a scalar value v, return an RGBA color value from lookup table.
unsigned char* vtkLookupTable::MapValue(double v)
const unsigned char* vtkLookupTable::MapValue(double v)
{
vtkIdType index = this->GetIndex(v);
if (index < 0)
......
......@@ -264,7 +264,7 @@ public:
/**
* Map one value through the lookup table, returning an RBGA[4] color.
*/
unsigned char* MapValue(double v) override;
const unsigned char* MapValue(double v) override;
/**
* Map one value through the lookup table and return the color as
......
......@@ -205,7 +205,7 @@ double vtkScalarsToColors::GetOpacity(double vtkNotUsed(v))
}
//----------------------------------------------------------------------------
unsigned char *vtkScalarsToColors::MapValue(double v)
const unsigned char *vtkScalarsToColors::MapValue(double v)
{
double rgb[3];
......
......@@ -90,7 +90,7 @@ public:
* Map one value through the lookup table and return a color defined
* as an RGBA unsigned char tuple (4 bytes).
*/
virtual unsigned char *MapValue(double v);
virtual const unsigned char *MapValue(double v);
/**
* Map one value through the lookup table and store the color as
......
......@@ -225,7 +225,7 @@ public:
this->SetLookupTable(lut);
lut->Delete();
}
unsigned char *color = lut->MapValue(b);
const unsigned char *color = lut->MapValue(b);
this->WriterHelper->append(",");
this->WriterHelper->append((double)color[0]/255.0);
this->WriterHelper->append(",");
......
......@@ -654,7 +654,7 @@ void vtkColorTransferFunction::AddHSVSegment( double x1, double h1,
//----------------------------------------------------------------------------
// Returns the RGBA color evaluated at the specified location
unsigned char *vtkColorTransferFunction::MapValue( double x )
const unsigned char *vtkColorTransferFunction::MapValue( double x )
{
double rgb[3];
this->GetColor( x, rgb );
......
......@@ -129,7 +129,7 @@ public:
/**
* Map one value through the lookup table.
*/
unsigned char *MapValue(double v) override;
const unsigned char *MapValue(double v) override;
//@{
/**
......
......@@ -305,7 +305,7 @@ void vtkDiscretizableColorTransferFunction::SetNanColor(double r, double g, doub
}
//-----------------------------------------------------------------------------
unsigned char* vtkDiscretizableColorTransferFunction::MapValue(double v)
const unsigned char* vtkDiscretizableColorTransferFunction::MapValue(double v)
{
this->Build();
if (this->Discretize || this->IndexedLookup)
......
......@@ -147,7 +147,7 @@ public:
* Map one value through the lookup table and return a color defined
* as a RGBA unsigned char tuple (4 bytes).
*/
unsigned char *MapValue(double v) override;
const unsigned char *MapValue(double v) override;
/**
* Map one value through the lookup table and return the color as
......
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