PCL
pcl::UInt20PixelTraits Class Reference

20-bit unsigned integer pixel traits. More...

#include <PixelTraits.h>

+ Inheritance diagram for pcl::UInt20PixelTraits:

Public Types

using component = sample
 
using sample = traits_type::sample
 
using traits_type = GenericPixelTraits< uint32 >
 
- Public Types inherited from pcl::GenericPixelTraits< uint32 >
using sample = uint32
 

Static Public Member Functions

template<typename T >
static sample FloatToSample (T x) noexcept
 
template<typename T >
static void FromSample (Complex< T > &a, sample b) noexcept
 
static void FromSample (double &a, sample b) noexcept
 
static void FromSample (float &a, sample b) noexcept
 
static void FromSample (int16 &a, sample b) noexcept
 
static void FromSample (int32 &a, sample b) noexcept
 
static void FromSample (int8 &a, sample b) noexcept
 
static void FromSample (uint16 &a, sample b) noexcept
 
static void FromSample (uint32 &a, sample b) noexcept
 
static void FromSample (uint8 &a, sample b) noexcept
 
static constexpr sample HighestSampleValue () noexcept
 
static constexpr bool IsComplexSample () noexcept
 
static constexpr bool IsFloatSample () noexcept
 
static constexpr sample LowestSampleValue () noexcept
 
static constexpr sample MaxSampleValue () noexcept
 
static constexpr const char * SampleFormat () noexcept
 
template<typename T >
static constexpr sample ToSample (const Complex< T > &x) noexcept
 
static sample ToSample (double x) noexcept
 
static sample ToSample (float x) noexcept
 
static sample ToSample (int16 x) noexcept
 
static sample ToSample (int32 x) noexcept
 
static sample ToSample (int8 x) noexcept
 
static sample ToSample (uint16 x) noexcept
 
static sample ToSample (uint32 x) noexcept
 
static sample ToSample (uint8 x) noexcept
 
static sample ToSampleConstrained (double x) noexcept
 
static sample ToSampleConstrained (float x) noexcept
 
- Static Public Member Functions inherited from pcl::GenericPixelTraits< uint32 >
static constexpr int BitsPerSample () noexcept
 
static constexpr int BytesPerSample () noexcept
 
static constexpr sample MinSampleValue () noexcept
 

Detailed Description

UInt20PixelTraits is a template instantiation of GenericPixelTraits for unsigned 20-bit integers (stored as uint32 values).

This class does not represent an instantiable pixel sample type. It is used mainly for generation and management of 20-bit lookup tables (LUTs).

See also
GenericPixelTraits

Definition at line 5652 of file PixelTraits.h.

Member Typedef Documentation

◆ component

Represents a component of a complex pixel sample, or a pixel sample value for real pixel sample types. For UInt20PixelTraits, this is equivalent to uint32.

Definition at line 5671 of file PixelTraits.h.

◆ sample

Represents a pixel sample value.

Definition at line 5664 of file PixelTraits.h.

◆ traits_type

Represents this template instantiation.

Definition at line 5659 of file PixelTraits.h.

Member Function Documentation

◆ FloatToSample()

template<typename T >
static sample pcl::UInt20PixelTraits::FloatToSample ( x)
inlinestaticnoexcept

Conversion of any floating point value to a pixel sample value.

Definition at line 5736 of file PixelTraits.h.

◆ FromSample() [1/9]

template<typename T >
static void pcl::UInt20PixelTraits::FromSample ( Complex< T > &  a,
sample  b 
)
inlinestaticnoexcept

Conversion of a pixel sample value to any complex type.

Definition at line 5955 of file PixelTraits.h.

◆ FromSample() [2/9]

static void pcl::UInt20PixelTraits::FromSample ( double &  a,
sample  b 
)
inlinestaticnoexcept

Conversion of a pixel sample value to a 64-bit floating point real.

Definition at line 5942 of file PixelTraits.h.

◆ FromSample() [3/9]

static void pcl::UInt20PixelTraits::FromSample ( float &  a,
sample  b 
)
inlinestaticnoexcept

Conversion of a pixel sample value to a 32-bit floating point real.

Definition at line 5930 of file PixelTraits.h.

◆ FromSample() [4/9]

static void pcl::UInt20PixelTraits::FromSample ( int16 a,
sample  b 
)
inlinestaticnoexcept

Conversion of a pixel sample value to a 16-bit signed integer.

Definition at line 5894 of file PixelTraits.h.

◆ FromSample() [5/9]

static void pcl::UInt20PixelTraits::FromSample ( int32 a,
sample  b 
)
inlinestaticnoexcept

Conversion of a pixel sample value to a 32-bit signed integer.

Definition at line 5918 of file PixelTraits.h.

◆ FromSample() [6/9]

static void pcl::UInt20PixelTraits::FromSample ( int8 a,
sample  b 
)
inlinestaticnoexcept

Conversion of a pixel sample value to an 8-bit signed integer.

Definition at line 5870 of file PixelTraits.h.

◆ FromSample() [7/9]

static void pcl::UInt20PixelTraits::FromSample ( uint16 a,
sample  b 
)
inlinestaticnoexcept

Conversion of a pixel sample value to a 16-bit unsigned integer.

Definition at line 5882 of file PixelTraits.h.

◆ FromSample() [8/9]

static void pcl::UInt20PixelTraits::FromSample ( uint32 a,
sample  b 
)
inlinestaticnoexcept

Conversion of a pixel sample value to a 32-bit unsigned integer.

Definition at line 5906 of file PixelTraits.h.

◆ FromSample() [9/9]

static void pcl::UInt20PixelTraits::FromSample ( uint8 a,
sample  b 
)
inlinestaticnoexcept

Conversion of a pixel sample value to an 8-bit unsigned integer.

Definition at line 5858 of file PixelTraits.h.

◆ HighestSampleValue()

static constexpr sample pcl::UInt20PixelTraits::HighestSampleValue ( )
inlinestaticconstexprnoexcept

Returns the highest finite value representable by this pixel sample type.

For UInt20PixelTraits, this member function returns 1048576.

Definition at line 5727 of file PixelTraits.h.

References uint20_max.

◆ IsComplexSample()

static constexpr bool pcl::UInt20PixelTraits::IsComplexSample ( )
inlinestaticconstexprnoexcept

Returns true if this pixel traits class corresponds to a complex pixel sample type; false if it represents a real pixel sample type.

Definition at line 5686 of file PixelTraits.h.

◆ IsFloatSample()

static constexpr bool pcl::UInt20PixelTraits::IsFloatSample ( )
inlinestaticconstexprnoexcept

Returns true iff this pixel traits class corresponds to a floating point real pixel sample type.

Definition at line 5677 of file PixelTraits.h.

◆ LowestSampleValue()

static constexpr sample pcl::UInt20PixelTraits::LowestSampleValue ( )
inlinestaticconstexprnoexcept

Returns the lowest finite value representable by this pixel sample type.

For UInt20PixelTraits, this member function returns 0.

Definition at line 5717 of file PixelTraits.h.

◆ MaxSampleValue()

static constexpr sample pcl::UInt20PixelTraits::MaxSampleValue ( )
inlinestaticconstexprnoexcept

Returns the maximum valid pixel sample value.

For UInt20PixelTraits, this member function returns 1048576.

Definition at line 5707 of file PixelTraits.h.

References uint20_max.

◆ SampleFormat()

static constexpr const char* pcl::UInt20PixelTraits::SampleFormat ( )
inlinestaticconstexprnoexcept

Returns the address of a static null-terminated string identifying the sample data type represented by this pixel traits class.

For UInt20PixelTraits, this member function returns "UInt20".

Definition at line 5697 of file PixelTraits.h.

◆ ToSample() [1/9]

template<typename T >
static constexpr sample pcl::UInt20PixelTraits::ToSample ( const Complex< T > &  x)
inlinestaticconstexprnoexcept

Conversion of any complex value to a pixel sample value.

Definition at line 5850 of file PixelTraits.h.

References pcl::Abs().

◆ ToSample() [2/9]

static sample pcl::UInt20PixelTraits::ToSample ( double  x)
inlinestaticnoexcept

Conversion of a 64-bit floating point value to a pixel sample value.

Definition at line 5831 of file PixelTraits.h.

References uint20_max.

◆ ToSample() [3/9]

static sample pcl::UInt20PixelTraits::ToSample ( float  x)
inlinestaticnoexcept

Conversion of a 32-bit floating point value to a pixel sample value.

Definition at line 5813 of file PixelTraits.h.

References uint20_max.

◆ ToSample() [4/9]

static sample pcl::UInt20PixelTraits::ToSample ( int16  x)
inlinestaticnoexcept

Conversion of a 16-bit signed integer value to a pixel sample value.

Definition at line 5785 of file PixelTraits.h.

References int16_min, pcl::RoundInt(), and uint16_to_uint20.

◆ ToSample() [5/9]

static sample pcl::UInt20PixelTraits::ToSample ( int32  x)
inlinestaticnoexcept

Conversion of a 32-bit signed integer value to a pixel sample value.

Definition at line 5805 of file PixelTraits.h.

References int32_min, pcl::RoundInt(), and uint32_to_uint20.

◆ ToSample() [6/9]

static sample pcl::UInt20PixelTraits::ToSample ( int8  x)
inlinestaticnoexcept

Conversion of an 8-bit signed integer value to a pixel sample value.

Definition at line 5761 of file PixelTraits.h.

References int8_min, pcl::RoundInt(), and uint8_to_uint20.

◆ ToSample() [7/9]

static sample pcl::UInt20PixelTraits::ToSample ( uint16  x)
inlinestaticnoexcept

Conversion of a 16-bit unsigned integer value to a pixel sample value.

Definition at line 5773 of file PixelTraits.h.

References pcl::RoundInt(), and uint16_to_uint20.

◆ ToSample() [8/9]

static sample pcl::UInt20PixelTraits::ToSample ( uint32  x)
inlinestaticnoexcept

Conversion of a 32-bit unsigned integer value to a pixel sample value.

Definition at line 5797 of file PixelTraits.h.

References pcl::RoundInt(), and uint32_to_uint20.

◆ ToSample() [9/9]

static sample pcl::UInt20PixelTraits::ToSample ( uint8  x)
inlinestaticnoexcept

Conversion of an 8-bit unsigned integer value to a pixel sample value.

Definition at line 5749 of file PixelTraits.h.

References pcl::RoundInt(), and uint8_to_uint20.

◆ ToSampleConstrained() [1/2]

static sample pcl::UInt20PixelTraits::ToSampleConstrained ( double  x)
inlinestaticnoexcept

Conversion of a 64-bit floating point value to a pixel sample value. This function guarantees that the result will never overflow as a result of an out-of-range argument value.

Definition at line 5841 of file PixelTraits.h.

References pcl::Range(), and uint20_max.

◆ ToSampleConstrained() [2/2]

static sample pcl::UInt20PixelTraits::ToSampleConstrained ( float  x)
inlinestaticnoexcept

Conversion of a 32-bit floating point value to a pixel sample value. This function guarantees that the result will never overflow as a result of an out-of-range argument value.

Definition at line 5823 of file PixelTraits.h.

References pcl::Range(), and uint20_max.


The documentation for this class was generated from the following file: