Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Christian Butz
VTK
Commits
ce5575e3
Commit
ce5575e3
authored
Nov 05, 2017
by
Sean McBride
Browse files
Made vtkScalarsToColor::MapValue() return const
parent
94e4cec8
Changes
9
Hide whitespace changes
Inline
Side-by-side
Common/Core/vtkLookupTable.cxx
View file @
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
)
...
...
Common/Core/vtkLookupTable.h
View file @
ce5575e3
...
...
@@ -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
...
...
Common/Core/vtkScalarsToColors.cxx
View file @
ce5575e3
...
...
@@ -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
];
...
...
Common/Core/vtkScalarsToColors.h
View file @
ce5575e3
...
...
@@ -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
...
...
IO/GeoJSON/vtkGeoJSONWriter.cxx
View file @
ce5575e3
...
...
@@ -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
(
","
);
...
...
Rendering/Core/vtkColorTransferFunction.cxx
View file @
ce5575e3
...
...
@@ -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
);
...
...
Rendering/Core/vtkColorTransferFunction.h
View file @
ce5575e3
...
...
@@ -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
;
//@{
/**
...
...
Rendering/Core/vtkDiscretizableColorTransferFunction.cxx
View file @
ce5575e3
...
...
@@ -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
)
...
...
Rendering/Core/vtkDiscretizableColorTransferFunction.h
View file @
ce5575e3
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment