An abstract representation of a colormap for storing in the distributed database.
More...
#include <icolormap.h>
Inherits mi::base::Interface_declare< 0x68ba9632, ... >.
|
virtual mi::math::Color_struct | get_color (mi::Uint32 idx) const =0 |
| Returns an entry of the colormap. More...
|
|
virtual void | set_color (mi::Uint32 idx, const mi::math::Color_struct &color)=0 |
| Sets an entry of the colormap. More...
|
|
virtual void | set_colormap (const mi::math::Color_struct *colormap_values, mi::Uint32 nb_entries)=0 |
| Set the colormap values using an array of color values. More...
|
|
virtual const mi::math::Color_struct * | get_colormap () const =0 |
| Returns a reference to the colormap array. More...
|
|
virtual mi::Uint32 | get_number_of_entries () const =0 |
| Returns the number of entries in the colormap. More...
|
|
virtual void | get_non_transparent_range (mi::Uint32 &min, mi::Uint32 &max) const =0 |
| Returns the range of colormap indices in which color values are non-transparent. More...
|
|
virtual void | set_domain (mi::Float32 value_first, mi::Float32 value_last)=0 |
| Sets the domain of the colormap, describing how source data (e.g. More...
|
|
virtual void | get_domain (mi::Float32 &value_first, mi::Float32 &value_last) const =0 |
| Returns the domain of the colormap. More...
|
|
virtual void | set_domain_boundary_mode (Domain_boundary_mode mode)=0 |
| Sets the mode for handling data values outside of the colormap's domain. More...
|
|
virtual Domain_boundary_mode | get_domain_boundary_mode () const =0 |
| Returns the mode for handling data values outside of the colormap's domain. More...
|
|
An abstract representation of a colormap for storing in the distributed database.
◆ Domain_boundary_mode
Controls how data values that are outside of the colormap's domain should be treated.
Enumerator |
---|
CLAMP_TO_EDGE | Data values outside of the domain will be clamped to the domain, i.e.
will be mapped to either the first or last entry of the colormap.
|
CLAMP_TO_TRANSPARENT | Data values outside of the domain will be considered fully transparent and therefore ignored for rendering.
|
◆ get_color()
virtual mi::math::Color_struct nv::index::IColormap::get_color |
( |
mi::Uint32 |
idx | ) |
const |
|
pure virtual |
Returns an entry of the colormap.
- Note
- This method is not used in the IndeX library to access the colormap array. It should be used by an application.
- Parameters
-
[in] | idx | Index in the colormap |
- Returns
- Color at the given index
◆ get_colormap()
virtual const mi::math::Color_struct * nv::index::IColormap::get_colormap |
( |
| ) |
const |
|
pure virtual |
Returns a reference to the colormap array.
- Note
- This method is used internally by the IndeX library to access the colormap data.
- Returns
- Constant reference to the internal colormap array
◆ get_domain()
virtual void nv::index::IColormap::get_domain |
( |
mi::Float32 & |
value_first, |
|
|
mi::Float32 & |
value_last |
|
) |
| const |
|
pure virtual |
Returns the domain of the colormap.
- Parameters
-
[out] | value_first | Data value (normalized) that should be mapped to the first entry of the colormap. |
[out] | value_last | Data value (normalized) that should be mapped to the last entry of the colormap. |
◆ get_domain_boundary_mode()
Returns the mode for handling data values outside of the colormap's domain.
- Returns
- Current domain boundary mode
◆ get_non_transparent_range()
virtual void nv::index::IColormap::get_non_transparent_range |
( |
mi::Uint32 & |
min, |
|
|
mi::Uint32 & |
max |
|
) |
| const |
|
pure virtual |
Returns the range of colormap indices in which color values are non-transparent.
- Parameters
-
[out] | min | Minimum index with non-transparent color (inclusive). |
[out] | max | Maximum index with non-transparent color (inclusive). |
◆ get_number_of_entries()
virtual mi::Uint32 nv::index::IColormap::get_number_of_entries |
( |
| ) |
const |
|
pure virtual |
Returns the number of entries in the colormap.
- Returns
- number of colormap entries
◆ set_color()
virtual void nv::index::IColormap::set_color |
( |
mi::Uint32 |
idx, |
|
|
const mi::math::Color_struct & |
color |
|
) |
| |
|
pure virtual |
Sets an entry of the colormap.
- Parameters
-
[in] | idx | Index in the colormap |
[in] | color | Color to be set |
◆ set_colormap()
virtual void nv::index::IColormap::set_colormap |
( |
const mi::math::Color_struct * |
colormap_values, |
|
|
mi::Uint32 |
nb_entries |
|
) |
| |
|
pure virtual |
Set the colormap values using an array of color values.
- Parameters
-
[in] | colormap_values | Array of color values. |
[in] | nb_entries | Number of color values. |
◆ set_domain()
virtual void nv::index::IColormap::set_domain |
( |
mi::Float32 |
value_first, |
|
|
mi::Float32 |
value_last |
|
) |
| |
|
pure virtual |
Sets the domain of the colormap, describing how source data (e.g.
voxel values) should be mapped to color values.
The domain is normalized to support different types of source values: The default domain [0.0, 1.0] corresponds to raw data values in the range [0, 255] for 8-bit unsigned integer data, [0, 65535] for 16-bit unsigned integer data, or [0.0, 1.0] for normalized float data. For non-normalized float data the domain should be set to the actual value range found in the data. When using signed integer data, the domain [-1.0, 1.0] would need to be used to cover the full value range, e.g. [-128, 127] for 8-bit signed integer.
The domain may also be outside of the actual value range of the data, or just cover part of the value range. Data values outside of the specified domain treated according to the Domain_boundary_mode
controlled by set_domain_boundary_mode()
.
Note that value_first
> value_last
is valid, and will effectively flip the colormap. If value_first
is equal to value_last
then the default domain [0.0, 1.0] will be used.
- Parameters
-
[in] | value_first | Data value (normalized) that should be mapped to the first entry of the colormap. |
[in] | value_last | Data value (normalized) that should be mapped to the last entry of the colormap. |
◆ set_domain_boundary_mode()
Sets the mode for handling data values outside of the colormap's domain.
- Parameters
-
[in] | mode | Domain boundary mode |
The documentation for this class was generated from the following file: