Public Types | Public Member Functions | Public Attributes | Static Protected Member Functions | List of all members
ImageTray< T > Class Template Reference

Container applicable for Channels and Images, with alpha support. More...

#include <ImageTray.h>

Inheritance diagram for ImageTray< T >:
Inheritance graph
[legend]
Collaboration diagram for ImageTray< T >:
Collaboration graph
[legend]

Public Types

typedef Tray< T >::image_t image_t
 
typedef Tray< T >::map_t map_t
 
- Public Types inherited from Tray< T >
typedef T image_t
 
typedef std::map< size_t, image_t & > map_t
 

Public Member Functions

template<class T2 >
 ImageTray (const ImageTray< T2 > &t)
 
template<class T2 >
 ImageTray (ImageTray< T2 > &t)
 
const GeometrygetGeometry () const
 Appends the whole single image. More...
 
bool hasAlpha () const
 
const image_t & getAlpha (size_t i=0) const
 Returns the i'th alpha image.
 
void clear ()
 
template<class T2 >
void copy (const Tray< T2 > &t)
 Add image sequence.
 
template<class T2 >
void copy (Tray< T2 > &t)
 Add image sequence.
 
template<class T2 >
void copy (ImageTray< T2 > &t)
 
template<class T2 >
void copy (const ImageTray< T2 > &t)
 
void setAlpha (image_t &img, size_t i=0)
 Replace image in position i.
 
image_t & getAlpha (size_t i=0)
 Returns the i'th alpha image.
 
void appendAlpha (image_t &img)
 Add image to the end of the container.
 
template<class T2 >
void setChannels (T2 &img)
 Splits. More...
 
template<class T2 >
void setChannels (const T2 &img)
 
template<class T2 >
void setChannels (T2 &img, T2 &alphaImg)
 
template<class T2 >
void setChannels (const T2 &img, const T2 &alphaImg)
 
template<class T2 >
void setAlphaChannels (T2 &img)
 Splits. More...
 
template<class T2 >
void setAlphaChannels (const T2 &img)
 Splits. More...
 
void toOStr (std::ostream &ostr=std::cout) const
 
- Public Member Functions inherited from Tray< T >
 Tray (const Tray< image_t > &t)
 
const image_t & get (size_t i=0) const
 Returns the i'th image.
 
image_t & get (size_t i=0)
 Returns the i'th image.
 
void set (image_t &img, size_t i=0)
 Replace image in position i.
 
virtual void appendImage (image_t &img)
 Add image to the end.
 
template<class T2 >
void copy (const Tray< T2 > &t)
 Add image sequence. Replaces old values.
 
template<class T2 >
void copyVector (std::vector< T2 > &v)
 Add image sequence.
 
virtual bool checkGeometry (const Geometry &g) const
 Returns true, if all the frames have the same width and height.
 
bool checkGeometry () const
 Returns true, if all the frames have the same width and height.
 
template<class T2 >
void putPixel (const Point2D< int > &p, const std::vector< T2 > &v)
 Put intensity vector.
 
template<class T2 >
void getPixel (const Point2D< int > &p, std::vector< T2 > &v) const
 Get intensity vector.
 
template<class T2 >
bool hasOverlap (const Tray< T2 > &tray) const
 
void toOStr (std::ostream &ostr) const
 
void createVector (std::vector< Image > &v) const
 

Public Attributes

Tray< T > alpha
 

Static Protected Member Functions

template<class T2 >
static void takeImageChannels (Tray< T > &tray, T2 &img)
 Splits. More...
 
template<class T2 >
static void takeAlphaChannels (Tray< T > &tray, T2 &img)
 
template<class T2 >
static void takeImageChannels (Tray< const T > &tray, const T2 &img)
 Splits. More...
 
template<class T2 >
static void takeAlphaChannels (Tray< const T > &tray, const T2 &img)
 

Additional Inherited Members

- Protected Attributes inherited from Tray< T >
Geometry geometry
 

Detailed Description

template<class T>
class drain::image::ImageTray< T >

Container applicable for Channels and Images, with alpha support.

Template Parameters
T- ImageFrame or Image, const or non-const.

Member Function Documentation

◆ getGeometry()

const Geometry& getGeometry ( ) const
inlinevirtual

Appends the whole single image.

Split image and alpha image to channels. This is different from Tray(image_t &) which appends the whole single image.

Parameters
image- image object, the image channels of which will referenced.
alpha- image object, the image channels of which will referenced as alpha channels. Notice: if first argument contains alpha channels, they will be appended before those given as second argument (alpha).

Reimplemented from Tray< T >.

◆ setAlphaChannels() [1/2]

void setAlphaChannels ( const T2 &  img)
inline

Splits.

Template Parameters
-

◆ setAlphaChannels() [2/2]

void setAlphaChannels ( T2 &  img)
inline

Splits.

Template Parameters
-

◆ setChannels()

void setChannels ( T2 &  img)
inline

Splits.

Template Parameters
-

◆ takeImageChannels() [1/2]

static void takeImageChannels ( Tray< const T > &  tray,
const T2 &  img 
)
inlinestaticprotected

Splits.

Template Parameters
-

◆ takeImageChannels() [2/2]

static void takeImageChannels ( Tray< T > &  tray,
T2 &  img 
)
inlinestaticprotected

Splits.

Template Parameters
tray-

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