SampleLayout

Description

struct Tinman.Terrain.Imaging.SampleLayout

Describes the layout of the samples of a raw pixel.

Public / Constants

Float16BE


public static readonly attribute Float16BE → (SampleLayout)

16-bit big-endian floating point value.

Float16LE


public static readonly attribute Float16LE → (SampleLayout)

16-bit little-endian floating point value.

Float32BE


public static readonly attribute Float32BE → (SampleLayout)

32-bit big-endian floating point value.

Float32LE


public static readonly attribute Float32LE → (SampleLayout)

32-bit little-endian floating point value.

Float64BE


public static readonly attribute Float64BE → (SampleLayout)

64-bit big-endian floating point value.

Float64LE


public static readonly attribute Float64LE → (SampleLayout)

64-bit little-endian floating point value.

Int16BE


public static readonly attribute Int16BE → (SampleLayout)

Signed 16-bit big-endian integer.

Int16LE


public static readonly attribute Int16LE → (SampleLayout)

Signed 16-bit little-endian integer.

Int32BE


public static readonly attribute Int32BE → (SampleLayout)

Signed 32-bit big-endian integer.

Int32LE


public static readonly attribute Int32LE → (SampleLayout)

Signed 32-bit little-endian integer.

Int8


public static readonly attribute Int8 → (SampleLayout)

Signed 8-bit integer.

UInt16BE


public static readonly attribute UInt16BE → (SampleLayout)

Unsigned 16-bit big-endian integer.

UInt16LE


public static readonly attribute UInt16LE → (SampleLayout)

Unsigned 16-bit little-endian integer.

UInt32BE


public static readonly attribute UInt32BE → (SampleLayout)

Unsigned 32-bit big-endian integer.

UInt32LE


public static readonly attribute UInt32LE → (SampleLayout)

Unsigned 32-bit little-endian integer.

UInt8


public static readonly attribute UInt8 → (SampleLayout)

Unsigned 8-bit integer.

Unknown


public static readonly attribute Unknown → (SampleLayout)

The unknown or non-representable sample layout.

Public / Methods

Grayscale


[Pure]
public method Grayscale → (3)

sampleCount opt : int32 = 1

[>0]
Number of raw sample values per pixel.

sampleIntensity opt : int32 = 0

[-1..sampleCount-1]
Index of raw sample value that maps to the grayscale intensity channel or -1 if no mapping shall be done.

sampleAlpha opt : int32 = -1

[-1..sampleCount-1]
Index of raw sample value that maps to the alpha channel or -1 if no mapping shall be done.

returns → SampleLayout

The resulting sample layout.

Configures the mapping between raw sample values and pixel channels (i.e. red, green, blue and alpha).

Transform


[Pure]
public method Transform → (2)

scale opt : float64 = 1

The scale factor, see Scale.

offset opt : float64 = 0

The offset value, see Offset.

returns → SampleLayout

The resulting sample layout.

Configures the transformation from stored pixel values to raw pixel values.

Truecolor


[Pure]
public method Truecolor → (5)

sampleCount opt : int32 = 3

[>0]
Number of raw sample values per pixel.

sampleRed opt : int32 = 0

[-1..sampleCount-1]
Index of raw sample value that maps to the red channel or -1 if no mapping shall be done.

sampleGreen opt : int32 = 1

[-1..sampleCount-1]
Index of raw sample value that maps to the green channel or -1 if no mapping shall be done.

sampleBlue opt : int32 = 2

[-1..sampleCount-1]
Index of raw sample value that maps to the blue channel or -1 if no mapping shall be done.

sampleAlpha opt : int32 = -1

[-1..sampleCount-1]
Index of raw sample value that maps to the alpha channel or -1 if no mapping shall be done.

returns → SampleLayout

The resulting sample layout.

Configures the mapping between raw sample values and pixel channels (i.e. red, green, blue and alpha).

Public / Attributes

Bit­Depth


public attribute BitDepth → (get)

value : int32

The sample bit-depth: 8, 16, 32, or 64. Will be 0 for Unknown.

Returns the bit-depth of the sample layout.

Endianness


public readonly attribute Endianness → (ByteOrder)

Byte order of multibyte sample value.

Is­Float


public attribute IsFloat → (get)

value : bool

true if the sample type is SampleType.Float16, SampleType.Float32 or SampleType.Float64.
false if it is not.

Is this a floating-point sample layout?

Is­Integer


public attribute IsInteger → (get)

value : bool

true if the sample type is SampleType.Int8, SampleType.Int16, SampleType.Int32, SampleType.UInt8, SampleType.UInt16 or SampleType.UInt32.
false if it is not.

Is this an integer sample layout?

Is­Signed


public attribute IsSigned → (get)

value : bool

true if this sample layout allows negative sample values,
false if this sample layout does not allow negative sample values.

Is this sample layout signed?

Is­Unsigned


public attribute IsUnsigned → (get)

value : bool

true if this sample layout does not allow negative sample values,
false if this sample layout allows negative sample values.

Is this sample layout unsigned?

Is­Valid


public attribute IsValid → (get)

value : bool

true if the layout is valid, false if not.

Is this raw sample layout valid?

Offset


public readonly attribute Offset → (float64)

The translation offset that is applied to stored pixel values to produce raw pixel values:

raw = stored * Scale + Offset

Pixel­Format


public attribute PixelFormat → (get)

value : PixelFormat

The image pixel format.

Returns the image pixel format for this raw sample layout.

Sample­Alpha


public readonly attribute SampleAlpha → (int32)

Zero-based index of sample that maps to the alpha channel.

If -1, no value is output to the alpha channel.

Sample­Blue


public readonly attribute SampleBlue → (int32)

Zero-based index of sample that maps to the blue channel.

If -1, no value is output to the blue channel.

Sample­Count


public readonly attribute SampleCount → (int32)

Number of raw samples per pixel.

Sample­Green


public readonly attribute SampleGreen → (int32)

Zero-based index of sample that maps to the green channel.

If -1, no value is output to the green channel.

Sample­Red


public readonly attribute SampleRed → (int32)

Zero-based index of sample that maps to the red channel.

If -1, no value is output to the red channel.

Scale


public readonly attribute Scale → (float64)

The scale factor that is applied to stored pixel values to produce raw pixel values:

raw = stored * Scale + Offset

Type


public readonly attribute Type → (SampleType)

The sample data type.

Configuration

Config


public static attribute Config → (get)

value : IConfigurator<SampleLayout>

[not-null]
The configurator object.

The configurator object for this type.

Config­Sample­Type


public static attribute ConfigSampleType → (get)

value : IConfigurator<SampleType>

[not-null]
The configurator object.

The configurator object for SampleType.