iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nrt::PixRGBD< T_rgb, T_d > Struct Template Reference

#include <nrt/Core/Image/PixelTypes.H>

template<class T_rgb, class T_d>
struct nrt::PixRGBD< T_rgb, T_d >

A pixel class to hold red-green-blue-depth color components and depth information.

Examples:
tests/test-Pixel.C.

Definition at line 416 of file PixelTypes.H.

Inheritance diagram for nrt::PixRGBD< T_rgb, T_d >:
nrt::PixRGB< T_rgb >

Public Types

typedef PixRGB< T_rgb > BaseType
 
typedef PixelWithDepth< T_d > ExtraType
 
- Public Types inherited from nrt::PixelWithDepth< T >
typedef T ExtraPODType
 

Public Member Functions

 PixRGBD ()
 Default Constructor. More...
 
template<class T_rgb2 , class T_d2 >
 PixRGBD (PixRGBD< T_rgb2, T_d2 > const &other)
 Copy Constructor.
 
template<typename T1 >
 PixRGBD (T1 val)
 initialize with a POD type or pixel
 
 PixRGBD (PixRGB< T_rgb > const &rgb, T_d depth)
 Construct from a PixRGB and a depth.
 
 PixRGBD (T_rgb r, T_rgb g, T_rgb b, T_d d)
 Value Constructor. More...
 
template<class rType , class gType , class bType , class dType >
 PixRGBD (rType r, gType g, bType b, dType d)
 Clamping Value Constructor. More...
 
PixRGB< T_rgb > & rgb ()
 Get just the RGB component.
 
PixRGB< T_rgb > const & rgb () const
 Get just the RGB component.
 
PixRGB< T_rgb > toRGB () const
 Convert this color space to RGB.
 
template<class Archive >
void serialize (Archive &ar)
 Serialization.
 
template<typename T1 >
 PixRGBD (T1 value)
 
template<class T_rgb , class T_d >
 PixRGBD (PixRGB< T_rgb > const &rgb, T_d depth)
 
template<class T_rgb , class T_d >
 PixRGBD (T_rgb r, T_rgb g, T_rgb b, T_d d)
 
template<class T_rgb2 , class T_d2 >
 PixRGBD (PixRGBD< T_rgb2, T_d2 > const &other)
 
template<class rType , class gType , class bType , class dType >
 PixRGBD (rType r, gType g, bType b, dType d)
 
- Public Member Functions inherited from nrt::PixRGB< T_rgb >
 PixRGB ()
 Default Constructor. More...
 
 PixRGB (PixRGB< T2 > const &other)
 Copy Constructor.
 
 PixRGB (T1 val)
 initialize with a POD type or pixel
 
 PixRGB (T_rgbr, T_rgbg, T_rgbb)
 Value Constructor. More...
 
 PixRGB (rType r, gType g, bType b)
 Clamping Value Constructor. More...
 
T_rgb r () const
 Read the red channel.
 
T_rgb g () const
 Read the green channel.
 
T_rgb b () const
 Read the blue channel.
 
void setR (T_rgbvalue)
 Set the red channel.
 
void setR (T2 value)
 Set the red channel and clamp/round if necessary.
 
void setG (T_rgbvalue)
 Set the green channel.
 
void setG (T2 value)
 Set the green channel and clamp/round if necessary.
 
void setB (T_rgbvalue)
 Set the blue channel.
 
void setB (T2 value)
 Set the blue channel and clamp/round if necessary.
 
PixRGB< T_rgb > toRGB () const
 Convert this color space to RGB.
 
- Public Member Functions inherited from nrt::PixelBase< T, numChans, PixType >
T * begin ()
 Access beginning of underlying array.
 
T * end ()
 Access the end of underlying array.
 
T const * begin () const
 Access the beginning of underlying array.
 
T const * end () const
 Access the end of underlying array.
 
std::string toString ()
 Convenience function to print out the values as a nicely formatted string.
 
template<class Archive >
void serialize (Archive &ar)
 
template<typename T1 , typename >
 PixelBase (T1 const &val)
 
template<class T2 >
 PixelBase (PixelBase< T2, numChans, PixType > const &other)
 
template<class T1 , template< typename > class PixType2>
 PixelBase (PixelBase< T1, 1, PixType2 > const &other)
 
template<template< typename...> class PixType2, typename... PixType2Args, typename >
 PixelBase (PixType2< PixType2Args...> const &other)
 
- Public Member Functions inherited from nrt::PixelWithDepth< T >
template<typename T1 , typename = typename std::enable_if<std::is_arithmetic<T1>::value>::type>
 PixelWithDepth (T1 const &val)
 
template<typename T1 >
 PixelWithDepth (PixelWithDepth< T1 > const &other)
 
d () const
 
void setD (T d)
 
template<class T2 >
void setD (T2 d)
 
template<class Archive >
void serialize (Archive &ar)
 

Static Public Member Functions

static PixRGBD< T_rgb, T_d > fromRGB (PixRGB< T_rgb > const &other)
 Convert to this color space from RGB.
 
- Static Public Member Functions inherited from nrt::PixRGB< T_rgb >
static PixRGB< T_rgb > fromRGB (PixRGB< T_rgb > const &other)
 Convert to this color space from RGB.
 

Related Functions

(Note that these are not member functions.)

template<class T_rgb , class T_d >
std::ostream & operator<< (std::ostream &out, PixRGBD< T_rgb, T_d > pix)
 Stream out as PixRGBD(r,g,b,d) More...
 

Additional Inherited Members

- Public Attributes inherited from nrt::PixelBase< T, numChans, PixType >
std::array< T, numChans > channels
 The actual data held by this pixel type.
 
- Public Attributes inherited from nrt::PixelWithDepth< T >
depth
 
- Static Public Attributes inherited from nrt::PixelBase< T, numChans, PixType >
static const size_t numChannels = numChans
 The number of channels contained in this Pixel.
 
- Protected Member Functions inherited from nrt::PixelBase< T, numChans, PixType >
 PixelBase ()
 Default Constructor.
 
template<typename T1 , typename = typename std::enable_if<std::is_arithmetic<T1>::value>::type>
 PixelBase (T1 const &val)
 Uniform Constructor.
 
 PixelBase (PixelBase< T, numChans, PixType > const &other)=default
 Copy Constructor.
 
template<class T2 >
 PixelBase (PixelBase< T2, numChans, PixType > const &other)
 Conversion Copy Constructor. More...
 
template<class T1 , template< typename > class PixType1>
 PixelBase (PixelBase< T1, 1, PixType1 > const &other)
 construct from a single channel pixel
 
template<template< typename...> class PixType2, typename... PixType2Args, typename = typename std::enable_if<pixel_traits<PixType2<PixType2Args...>>::is_multi_channel>::type>
 PixelBase (PixType2< PixType2Args...> const &other)
 Colorspace Conversion Copy Constructor.
 

Constructor & Destructor Documentation

template<class T_rgb, class T_d>
nrt::PixRGBD< T_rgb, T_d >::PixRGBD ( )

Default Constructor.

All components will be uninitialized

template<class T_rgb, class T_d>
nrt::PixRGBD< T_rgb, T_d >::PixRGBD ( T_rgb  r,
T_rgb  g,
T_rgb  b,
T_d  d 
)

Value Constructor.

All components will be initialized to the given values

template<class T_rgb, class T_d>
template<class rType , class gType , class bType , class dType >
nrt::PixRGBD< T_rgb, T_d >::PixRGBD ( rType  r,
gType  g,
bType  b,
dType  d 
)

Clamping Value Constructor.

All components will be initialized to the given values and clamped/rounded if necessary

Friends And Related Function Documentation

template<class T_rgb , class T_d >
std::ostream & operator<< ( std::ostream &  out,
PixRGBD< T_rgb, T_d >  pix 
)
related

Stream out as PixRGBD(r,g,b,d)


The documentation for this struct was generated from the following files: