The CImg Library - C++ Template Image Processing Toolkit





[ Main ] [ News] [ Download ] [ Screenshots ] [ FAQ ] [ Tutorial ] [ Documentation ] [ Forum ] [ Links ]

CImgList< T > Struct Template Reference

Class representing list of images CImg<T>. More...

List of all members.

Public Types

typedef CImg< T > * iterator
 Define a CImgList<T>::iterator.
typedef const CImg< T > * const_iterator
 Define a CImgList<T>::const_iterator.
typedef T value_type
 Value type.

Constructors / Destructor / Instance Management

 ~CImgList ()
 Destructor.
 CImgList ()
 Default constructor.
 CImgList (const unsigned int n)
 Construct an image list containing n empty images.
 CImgList (const unsigned int n, const unsigned int width, const unsigned int height=1, const unsigned int depth=1, const unsigned int spectrum=1)
 Construct an image list containing n images with specified size.
 CImgList (const unsigned int n, const unsigned int width, const unsigned int height, const unsigned int depth, const unsigned int spectrum, const T val)
 Construct an image list containing n images with specified size, filled with specified value.
 CImgList (const unsigned int n, const unsigned int width, const unsigned int height, const unsigned int depth, const unsigned int spectrum, const int val0, const int val1,...)
 Construct an image list containing n images with specified size and specified pixel values (int version).
 CImgList (const unsigned int n, const unsigned int width, const unsigned int height, const unsigned int depth, const unsigned int spectrum, const double val0, const double val1,...)
 Construct an image list containing n images with specified size and specified pixel values (double version).
template<typename t >
 CImgList (const unsigned int n, const CImg< t > &img, const bool shared=false)
 Construct a list containing n copies of the image img.
template<typename t >
 CImgList (const CImg< t > &img, const bool shared=false)
 Construct an image list from one image.
template<typename t1 , typename t2 >
 CImgList (const CImg< t1 > &img1, const CImg< t2 > &img2, const bool shared=false)
 Construct an image list from two images.
template<typename t1 , typename t2 , typename t3 >
 CImgList (const CImg< t1 > &img1, const CImg< t2 > &img2, const CImg< t3 > &img3, const bool shared=false)
 Construct an image list from three images.
template<typename t1 , typename t2 , typename t3 , typename t4 >
 CImgList (const CImg< t1 > &img1, const CImg< t2 > &img2, const CImg< t3 > &img3, const CImg< t4 > &img4, const bool shared=false)
 Construct an image list from four images.
template<typename t1 , typename t2 , typename t3 , typename t4 , typename t5 >
 CImgList (const CImg< t1 > &img1, const CImg< t2 > &img2, const CImg< t3 > &img3, const CImg< t4 > &img4, const CImg< t5 > &img5, const bool shared=false)
 Construct an image list from five images.
template<typename t1 , typename t2 , typename t3 , typename t4 , typename t5 , typename t6 >
 CImgList (const CImg< t1 > &img1, const CImg< t2 > &img2, const CImg< t3 > &img3, const CImg< t4 > &img4, const CImg< t5 > &img5, const CImg< t6 > &img6, const bool shared=false)
 Construct an image list from six images.
template<typename t1 , typename t2 , typename t3 , typename t4 , typename t5 , typename t6 , typename t7 >
 CImgList (const CImg< t1 > &img1, const CImg< t2 > &img2, const CImg< t3 > &img3, const CImg< t4 > &img4, const CImg< t5 > &img5, const CImg< t6 > &img6, const CImg< t7 > &img7, const bool shared=false)
 Construct an image list from seven images.
template<typename t1 , typename t2 , typename t3 , typename t4 , typename t5 , typename t6 , typename t7 , typename t8 >
 CImgList (const CImg< t1 > &img1, const CImg< t2 > &img2, const CImg< t3 > &img3, const CImg< t4 > &img4, const CImg< t5 > &img5, const CImg< t6 > &img6, const CImg< t7 > &img7, const CImg< t8 > &img8, const bool shared=false)
 Construct an image list from eight images.
template<typename t >
 CImgList (const CImgList< t > &list)
 Default copy constructor.
 CImgList (const CImgList< T > &list)
template<typename t >
 CImgList (const CImgList< t > &list, const bool shared)
 Advanced copy constructor.
 CImgList (const char *const filename)
 Construct an image list from a filename.
 CImgList (const CImgDisplay &disp)
 Construct an image list from a display.
CImgList< T > get_shared ()
 Return a shared instance of the list.
const CImgList< T > get_shared () const
 Return a shared instance of the list.
CImgList< T > & assign ()
 In-place version of the default constructor and default destructor.
CImgList< T > & assign (const unsigned int n)
 In-place version of the corresponding constructor.
CImgList< T > & assign (const unsigned int n, const unsigned int width, const unsigned int height=1, const unsigned int depth=1, const unsigned int spectrum=1)
 In-place version of the corresponding constructor.
CImgList< T > & assign (const unsigned int n, const unsigned int width, const unsigned int height, const unsigned int depth, const unsigned int spectrum, const T val)
 In-place version of the corresponding constructor.
CImgList< T > & assign (const unsigned int n, const unsigned int width, const unsigned int height, const unsigned int depth, const unsigned int spectrum, const int val0, const int val1,...)
 In-place version of the corresponding constructor.
CImgList< T > & assign (const unsigned int n, const unsigned int width, const unsigned int height, const unsigned int depth, const unsigned int spectrum, const double val0, const double val1,...)
 In-place version of the corresponding constructor.
CImgList< T > & assign (const CImgList< T > &list, const bool shared=false)
 In-place version of the copy constructor.
template<typename t >
CImgList< T > & assign (const CImgList< t > &list, const bool shared=false)
template<typename t >
CImgList< T > & assign (const unsigned int n, const CImg< t > &img, const bool shared=false)
 In-place version of the corresponding constructor.
template<typename t >
CImgList< T > & assign (const CImg< t > &img, const bool shared=false)
 In-place version of the corresponding constructor.
template<typename t1 , typename t2 >
CImgList< T > & assign (const CImg< t1 > &img1, const CImg< t2 > &img2, const bool shared=false)
 In-place version of the corresponding constructor.
template<typename t1 , typename t2 , typename t3 >
CImgList< T > & assign (const CImg< t1 > &img1, const CImg< t2 > &img2, const CImg< t3 > &img3, const bool shared=false)
 In-place version of the corresponding constructor.
template<typename t1 , typename t2 , typename t3 , typename t4 >
CImgList< T > & assign (const CImg< t1 > &img1, const CImg< t2 > &img2, const CImg< t3 > &img3, const CImg< t4 > &img4, const bool shared=false)
 In-place version of the corresponding constructor.
template<typename t1 , typename t2 , typename t3 , typename t4 , typename t5 >
CImgList< T > & assign (const CImg< t1 > &img1, const CImg< t2 > &img2, const CImg< t3 > &img3, const CImg< t4 > &img4, const CImg< t5 > &img5, const bool shared=false)
 In-place version of the corresponding constructor.
template<typename t1 , typename t2 , typename t3 , typename t4 , typename t5 , typename t6 >
CImgList< T > & assign (const CImg< t1 > &img1, const CImg< t2 > &img2, const CImg< t3 > &img3, const CImg< t4 > &img4, const CImg< t5 > &img5, const CImg< t6 > &img6, const bool shared=false)
 In-place version of the corresponding constructor.
template<typename t1 , typename t2 , typename t3 , typename t4 , typename t5 , typename t6 , typename t7 >
CImgList< T > & assign (const CImg< t1 > &img1, const CImg< t2 > &img2, const CImg< t3 > &img3, const CImg< t4 > &img4, const CImg< t5 > &img5, const CImg< t6 > &img6, const CImg< t7 > &img7, const bool shared=false)
 In-place version of the corresponding constructor.
template<typename t1 , typename t2 , typename t3 , typename t4 , typename t5 , typename t6 , typename t7 , typename t8 >
CImgList< T > & assign (const CImg< t1 > &img1, const CImg< t2 > &img2, const CImg< t3 > &img3, const CImg< t4 > &img4, const CImg< t5 > &img5, const CImg< t6 > &img6, const CImg< t7 > &img7, const CImg< t8 > &img8, const bool shared=false)
 In-place version of the corresponding constructor.
CImgList< T > & assign (const char *const filename)
 In-place version of the corresponding constructor.
CImgList< T > & assign (const CImgDisplay &disp)
 In-place version of the corresponding constructor.
CImgList< T > & clear ()
 In-place version of the default constructor.
template<typename t >
CImgList< t > & move_to (CImgList< t > &list)
 Move the content of the image instance list into another one.
template<typename t >
CImgList< t > & move_to (CImgList< t > &list, const unsigned int pos)
CImgList< T > & swap (CImgList< T > &list)
 Swap all fields of two CImgList instances (use with care !)
static CImgList< T > & empty ()
 Return a reference to an empty list.

Overloaded Operators

CImg< T > & operator() (const unsigned int pos)
 Return a reference to the i-th element of the image list.
const CImg< T > & operator() (const unsigned int pos) const
T & operator() (const unsigned int pos, const unsigned int x, const unsigned int y=0, const unsigned int z=0, const unsigned int c=0)
 Return a reference to (x,y,z,c) pixel of the pos-th image of the list.
const T & operator() (const unsigned int pos, const unsigned int x, const unsigned int y=0, const unsigned int z=0, const unsigned int c=0) const
 operator const CImg< T > * () const
 Return address of the image vector.
 operator CImg< T > * ()
template<typename t >
CImgList< T > & operator= (const CImg< t > &img)
 Operator=().
CImgList< T > & operator= (const CImgDisplay &disp)
 Operator=().
template<typename t >
CImgList< T > & operator= (const CImgList< t > &list)
 Operator=().
CImgList< T > & operator= (const CImgList< T > &list)
CImgList< T > & operator= (const char *const filename)
 Operator=().
CImgList< T > operator+ () const
 Operator+() (unary).
template<typename t >
CImgList< T > & operator, (const CImg< t > &img)
 Operator,().
template<typename t >
CImgList< T > & operator, (const CImgList< t > &list)
 Operator,().
CImg< T > operator> (const char axis) const
 Operator>().
CImgList< T > operator< (const char axis) const
 Operator<().

Instance Characteristics

int width () const
 Return the size of the list.
unsigned int size () const
 Return the size of the list.
CImg< T > * data ()
 Return a pointer to the image buffer.
const CImg< T > * data () const
CImg< T > * data (const unsigned int l)
 Return a pointer to the image buffer.
const CImg< T > * data (const unsigned int l) const
iterator begin ()
 Returns an iterator to the beginning of the vector (STL-compliant name).
const_iterator begin () const
iterator end ()
 Returns an iterator just past the last element (STL-compliant name).
const_iterator end () const
CImg< T > & front ()
 Returns a reference to the first element (STL-compliant name).
const CImg< T > & front () const
const CImg< T > & back () const
 Return a reference to the last image (STL-compliant name).
CImg< T > & back ()
CImg< T > & at (const int pos)
 Read an image in specified position.