PCL
|
Base class of all pixel traits classes. More...
#include <PixelTraits.h>
Public Types | |
using | sample = S |
Static Public Member Functions | |
static constexpr int | BitsPerSample () noexcept |
static constexpr int | BytesPerSample () noexcept |
static constexpr sample | MinSampleValue () noexcept |
GenericPixelTraits defines fundamental properties and functionality common to pixel sample types.
The purpose of a pixel traits class is to characterize a data type to represent a single component of a pixel, or pixel sample. For example, a pixel traits class must provide primitive routines to copy samples between pixels and images, and to transform sample values between different numeric data types, among many other critical, low-level tasks.
GenericPixelTraits is in the core of PixInsight's scalable design: by isolating low-level pixel sample manipulations from medium-level pixel management and high-level image transformations, the whole platform achieves optimum efficiency and versatility for multiple pixel data types.
GenericPixelTraits is a template class that must be instantiated for suitable data types. Seven instantiations of GenericPixelTraits have already been predefined in PCL, namely:
FloatPixelTraits | 32-bit IEEE 754 floating point real pixel samples |
DoublePixelTraits | 64-bit IEEE 754 floating point real pixel samples |
ComplexPixelTraits | 32-bit IEEE 754 floating point complex pixel samples |
DComplexPixelTraits | 64-bit IEEE 754 floating point complex pixel samples |
UInt8PixelTraits | 8-bit unsigned integer pixel samples |
UInt16PixelTraits | 16-bit unsigned integer pixel samples |
UInt32PixelTraits | 32-bit unsigned integer pixel samples |
In coordination with the GenericImage
class, these template instantiations originate the corresponding seven fundamental two-dimensional image classes that have been predefined in PCL:
Image | 32-bit IEEE 754 floating point real image |
DImage | 64-bit IEEE 754 floating point real image |
ComplexImage | 32-bit IEEE 754 floating point complex image |
DComplexImage | 64-bit IEEE 754 floating point complex image |
UInt8Image | 8-bit unsigned integer image |
UInt16Image | 16-bit unsigned integer image |
UInt32Image | 32-bit unsigned integer image |
Definition at line 176 of file PixelTraits.h.
using pcl::GenericPixelTraits< S >::sample = S |
Represents a pixel sample value.
Definition at line 183 of file PixelTraits.h.
|
inlinestaticconstexprnoexcept |
Returns the number of bits in a pixel sample.
Definition at line 199 of file PixelTraits.h.
|
inlinestaticconstexprnoexcept |
Returns the number of bytes necessary to store a pixel sample.
Definition at line 191 of file PixelTraits.h.
|
inlinestaticconstexprnoexcept |
Returns the minimum valid sample value. This is usually a value of zero in the numeric data type represented by sample
.
Definition at line 208 of file PixelTraits.h.