Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ScalarMapperContinuous

Maps scalar values to texture coordinates/colors using a filled contours style color map with levels of uniform size.

Configured by specifying the number of level colors ([[colorArray]]) and the range (setRange).

To show a color legend in the view representing this mapper, use the Overlay.addCustomColorLegendForScalarMapper function.

Hierarchy

Implements

Index

Constructors

constructor

Accessors

aboveRangeColor

aboveRangeColor: Color4Like

The color to assign values that are above the given range.

Default is undefined, which indicates that the last color in the color array will be used.

belowRangeColor

belowRangeColor: Color4Like

The color to assign values that are below the given range.

Default is undefined, which indicates that the first color in the color array will be used.

Readonly logarithmic

logarithmic: boolean

True if the mapper is setup to logarithmic mapping

Readonly rangeMaximum

rangeMaximum: number

The maximum range of the mapper

Readonly rangeMinimum

rangeMinimum: number

The minimum range of the mapper

undefinedColor

undefinedColor: Color4Like

The color used for undefined values.

Default is undefined, which indicates that the last color in the color array will be used.

Methods

createTexture

  • Creates and returns texture for this scalar mapper

    Returns Texture

domainValue

  • domainValue(normalizedPosition: number): number
  • Map normalized value (0 -> 1) into a domain value (range_min -> range_max)

    Parameters

    • normalizedPosition: number

    Returns number

mapToColor

  • Maps the given domain value to a color using the current range and color array.

    Parameters

    • scalarValue: number

    Returns Color4Like

mapToTextureCoordinate

  • mapToTextureCoordinate(scalarValue: number): Vec2Like
  • Maps the given domain value to a color using the current range and color array.

    Parameters

    • scalarValue: number

    Returns Vec2Like

normalizedValue

  • normalizedValue(domainValue: number): number
  • Map domain value (range_min -> range_max) into a normalized value (0 -> 1)

    Parameters

    • domainValue: number

    Returns number

setColors

setColorsAtValues

  • setColorsAtValues(colorArr: ArrayLike<Color4Like>, valueArr: ArrayLike<number>): void
  • Parameters

    • colorArr: ArrayLike<Color4Like>
    • valueArr: ArrayLike<number>

    Returns void

setColorsFromColorTable

  • setColorsFromColorTable(colorTable: ColorTable): void

setRange

  • setRange(min: number, max: number): void
  • Sets the range of the mapper. The mapper will map domain values to colors based on an even distribution between the given min and max values.

    Parameters

    • min: number
    • max: number

    Returns void

setRangeLogarithmic

  • setRangeLogarithmic(min: number, max: number): void
  • Sets a logarithmic range of the mapper.

    Parameters

    • min: number
    • max: number

    Returns void

tickValuesHint

  • tickValuesHint(): ArrayLike<number>
  • Returns ArrayLike<number>

version

  • version(): number
  • Returns number

Generated using TypeDoc