vtkLookupTable

Struct vtkLookupTable 

Source
pub struct vtkLookupTable(/* private fields */);
Expand description

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) 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.

A special color for NaN values in the data can be specified via SetNanColor(). In addition, a color for data values below the lookup table range minimum can be specified with SetBelowRangeColor(), and that color will be used for values below the range minimum when UseBelowRangeColor is on. Likewise, a color for data values above the lookup table range maximum can be specified with SetAboveRangeColor(), and it is used when UseAboveRangeColor is on.

This class behaves differently depending on how \a IndexedLookup is set. When true, vtkLookupTable enters a mode for representing categorical color maps. By setting \a IndexedLookup to true, you indicate that the annotated values are the only valid values for which entries in the color table should be returned. The colors in the lookup \a Table are assigned to annotated values by taking the modulus of their index in the list of annotations. \a IndexedLookup changes the behavior of \a GetIndex, which in turn changes the way \a MapScalarsThroughTable2 behaves; when \a IndexedLookup is true, \a MapScalarsThroughTable2 will search for scalar values in \a AnnotatedValues and use the resulting index to determine the color. If a scalar value is not present in \a AnnotatedValues, then \a NanColor will be used.

@warning You need to explicitly call Build() when constructing the LUT by hand.

@sa vtkLogLookupTable vtkWindowLevelLookupTable

Implementations§

Source§

impl vtkLookupTable

Source

pub fn new() -> Self

Creates a new vtkLookupTable wrapped inside vtkNew

Trait Implementations§

Source§

impl Default for vtkLookupTable

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Drop for vtkLookupTable

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.