C++ Template Image Processing Library. |
[ Introduction ]-[ News ]-[ Download ]-[ Screenshots ]-[ Tutorial ]-[ Links ]-[ Forums-Eng ]-[ Forums-Fr ]-[ Reference ]-[ SourceForge Repository ]

- Main Page
- Modules
- Namespaces
- Classes

- Class List
- Class Hierarchy
- Class Members

# CImgList Struct Template Reference

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

List of all members.

## Constructors - Destructor - Copy
| CImgList ()
| Default constructor.
| ~CImgList ()
| Destructor.
CImgList & | assign ()
| In-place version of the default constructor and default destructor.
CImgList & | clear ()
| Equivalent to assign() (STL-compliant name).
template<typename t>
| CImgList (const CImgList< t > &list)
| Copy constructor.
template<typename t>
| CImgList (const CImgList< t > &list, const bool shared)
| Copy constructor that create a shared object.
template<typename t>
CImgList & | assign (const CImgList< t > &list, const bool shared=false)
| In-place version of the copy constructor.
| CImgList (const unsigned int n)
| Construct an image list containing n empty images.
CImgList & | assign (const unsigned int n)
| In-place version of the previous constructor.
| CImgList (const unsigned int n, const unsigned int width, const unsigned int height=1, const unsigned int depth=1, const unsigned int dim=1)
| Construct an image list containing n images with specified size.
CImgList & | assign (const unsigned int n, const unsigned int width, const unsigned int height=1, const unsigned int depth=1, const unsigned int dim=1)
| In-place version of the previous constructor.
| CImgList (const unsigned int n, const unsigned int width, const unsigned int height, const unsigned int depth, const unsigned int dim, const T &val)
| Construct an image list containing n images with specified size, filled with val.
CImgList & | assign (const unsigned int n, const unsigned int width, const unsigned int height, const unsigned int depth, const unsigned int dim, const T &val)
| In-place version of the previous constructor.
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 & | assign (const unsigned int n, const CImg< t > &img, const bool shared=false)
| In-place version of the previous constructor.
template<typename t>
| CImgList (const CImg< t > &img, const bool shared=false)
| Construct an image list from one image.
template<typename t>
CImgList & | assign (const CImg< t > &img, const bool shared=false)
| In-place version of the previous constructor.
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>
CImgList & | assign (const CImg< t1 > &img1, const CImg< t2 > &img2, const bool shared=false)
| In-place version of the previous constructor.
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>
CImgList & | assign (const CImg< t1 > &img1, const CImg< t2 > &img2, const CImg< t3 > &img3, const bool shared=false)
| In-place version of the previous constructor.
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>
CImgList & | 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 previous constructor.
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>
CImgList & | 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 previous constructor.
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>
CImgList & | 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 previous constructor.
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>
CImgList & | 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 previous constructor.
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 t1, typename t2, typename t3, typename t4, typename t5, typename t6, typename t7, typename t8>
CImgList & | 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 previous constructor.
template<typename t1, typename t2, typename t3, typename t4, typename t5, typename t6, typename t7, typename t8, typename t9>
| 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 CImg< t9 > &img9, const bool shared=false)
| Construct an image list from nine images.
template<typename t1, typename t2, typename t3, typename t4, typename t5, typename t6, typename t7, typename t8, typename t9>
CImgList & | 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 CImg< t9 > &img9, const bool shared=false)
| In-place version of the previous constructor.
template<typename t1, typename t2, typename t3, typename t4, typename t5, typename t6, typename t7, typename t8, typename t9, typename t10>
| 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 CImg< t9 > &img9, const CImg< t10 > &img10, const bool shared=false)
| Construct an image list from ten images.
template<typename t1, typename t2, typename t3, typename t4, typename t5, typename t6, typename t7, typename t8, typename t9, typename t10>
CImgList & | 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 CImg< t9 > &img9, const CImg< t10 > &img10, const bool shared=false)
| In-place version of the previous constructor.
| CImgList (const char *filename)
| Construct an image list from a filename.
CImgList & | assign (const char *filename)
| In-place version of the previous constructor.
bool | is_empty () const
| Return `true` if list is empty.
static const char * | pixel_type ()
| Return a string describing the type of the image pixels in the list (template parameter `T`).
## Arithmetics Operators
template<typename t>
CImgList & | operator= (const CImgList< t > &list)
| Assignement operator.
template<typename t>
CImgList & | operator= (const CImg< t > &img)
| Assignement operator.
CImgList & | operator= (const T &val)
| Assignement operator.
CImgList | operator+ () const
| Operator+.
template<typename t>
CImgList & | operator+= (const t &val)
| Operator+=.
template<typename t>
CImgList & | operator+= (const CImgList< t > &list)
| Operator+=.
CImgList & | operator++ ()
| Operator++.
CImgList | operator- () const
| Operator-.
template<typename t>
CImgList & | operator-= (const t &val)
| Operator-=.
template<typename t>
CImgList & | operator-= (const CImgList< t > &list)
| Operator-=.
CImgList & | operator-- ()
| Operator--.
template<typename t>
CImgList & | operator *= (const t &val)
| Operator*=.
template<typename t>
CImgList & | operator *= (const CImgList< t > &list)
| Operator*=.
template<typename t>
CImgList & | operator/= (const t &val)
| Operator/=.
template<typename t>
CImgList & | operator/= (const CImgList< t > &list)
| Operator/=.
## List Manipulation
CImg< T > & | operator[] (const unsigned int pos)
| Return a reference to the i-th element of the image list.
CImg< T > & | operator() (const unsigned int pos)
| Equivalent to CImgList<T>::operator[].
T & | operator() (const unsigned int pos, const unsigned int x, const unsigned int y=0, const unsigned int z=0, const unsigned int v=0)
| Return a reference to (x,y,z,v) pixel of the pos-th image of the list.
CImg< T > & | at (const unsigned int pos)
| Equivalent to CImgList<T>::operator[], with boundary checking.
CImg< T > & | back ()
| Returns a reference to last element.
CImg< T > & | front ()
| Returns a reference to the first element.
iterator | begin ()
| Returns an iterator to the beginning of the vector.
iterator | end ()
| Returns an iterator just past the last element.
template<typename t>
CImgList & | insert (const CImg< t > &img, const unsigned int pos, const bool shared)
| Insert a copy of the image `img` into the current image list, at position `pos`.
template<typename t>
CImgList & | insert (const CImg< t > &img)
| Insert a copy of the image `img` at the current image list.
CImgList & | operator<< (const CImg< T > &img)
| Insert a copy of the image `img` at the current image list.
template<typename t>
CImgList & | insert (const unsigned int n, const CImg< t > &img, const unsigned int pos)
| Insert n copies of the image `img` into the current image list, at position `pos`.
template<typename t>
CImgList & | insert (const unsigned int n, const CImg< t > &img)
| Insert n copies of the image `img` at the end of the list.
template<typename t>
CImgList & | insert (const CImgList< t > &list, const unsigned int pos)
| Insert a copy of the image list `list` into the current image list, starting from position `pos`.
template<typename t>
CImgList & | insert (const CImgList< t > &list)
| Append a copy of the image list `list` at the current image list.
CImgList & | operator<< (const CImgList &list)
| Insert a copy of the image list `list` at the current image list.
template<typename t>
CImgList & | insert (const unsigned int n, const CImgList< t > &list, const unsigned int pos)
| Insert n copies of the list `list` at position `pos` of the current list.
template<typename t>
CImgList & | insert (const unsigned int n, const CImgList< t > &list)
| Insert n copies of the list at the end of the current list.
template<typename t>
CImgList & | push_back (const CImg< t > &img)
| Insert image `img` at the end of the list.
template<typename t>
CImgList & | push_front (const CImg< t > &img)
| Insert image `img` at the front of the list.
template<typename t>
CImgList & | push_back (const CImgList< t > &list)
| Insert list `list` at the end of the current list.
template<typename t>
CImgList & | push_front (const CImgList< t > &list)
| Insert list `list` at the front of the current list.
template<typename t>
CImgList & | insert_shared (const CImg< t > &img, const unsigned int pos)
| Insert a shared copy of the image `img` into the current image list, at position `pos`.
template<typename t>
CImgList & | insert_shared (const CImg< t > &img)
| Insert a shared copy of the image `img` at the current image list.
template<typename t>
CImgList & | insert_shared (const unsigned int n, const CImg< t > &img, const unsigned int pos)
| Insert n shared copies of the image `img` into the current image list, at position `pos`.
template<typename t>
CImgList & | insert_shared (const unsigned int n, const CImg< t > &img)
| Insert n shared copies of the image `img` at the end of the list.
template<typename t>
CImgList & | insert_shared (const CImgList< t > &list, const unsigned int pos)
| Insert a shared copy of all image of the list `list` into the current image list, starting from position `pos`.
template<typename t>
CImgList & | insert_shared (const CImgList< t > &list)
| Append a shared copy of the image list `list` at the current image list.
template<typename t>
CImgList & | insert_shared (const unsigned int n, const CImgList< t > &list, const unsigned int pos)
| Insert n shared copies of the list `list` at position `pos` of the current list.
template<typename t>
CImgList & | insert_shared (const unsigned int n, const CImgList< t > &list)
| Insert n shared copies of the list `list` at the end of the list.
CImgList & | remove (const unsigned int pos)
| Remove the image at position `pos` from the image list.
CImgList & | pop_back ()
| Remove last element of the list;.
CImgList & | operator>> (CImg< T > &img)
| Remove last element of the list;.
CImgList & | pop_front ()
| Remove first element of the list;.
CImgList & | erase (const iterator iter)
| Remove the element pointed by iterator `iter`;.
CImgList & | remove ()
| Remove the last image from the image list.
CImgList & | reverse ()
| Reverse list order.
CImgList | get_reverse () const
| Get reversed list.
const CImgList | get_crop (const unsigned int i0, const unsigned int i1, const bool shared=false) const
| Get a sub-list.
CImgList & | crop (const unsigned int i0, const unsigned int i1, const bool shared=false)
| Replace a list by its sublist.
## Fourier Transforms
CImgList & | FFT (const char axe, const bool inverse=false)
| Compute the Fast Fourier Transform (along the specified axis).
CImgList & | FFT (const bool inverse=false)
| Compute the Fast Fourier Transform of a complex image.
CImgList< typename cimg::largest< T, float >::type > | get_FFT (const bool inverse=false) const
| Return the Fast Fourier Transform of a complex image.
CImgList< typename cimg::largest< T, float >::type > | get_FFT (const char axe, const bool inverse=false) const
| Return the Fast Fourier Transform of a complex image (along a specified axis).
## Input-Output and Display
const CImgList & | print (const char *title=0, const int print_flag=1) const
| Print informations about the list on the standard error stream.
CImgList & | load (const char *filename)
| In-place version of load().
CImgList & | load_cimg (const char *filename)
| In-place version of get_load_cimg().
CImgList & | load_parrec (const char *filename)
| In-place version of get_load_parrec().
CImgList & | load_yuv (const char *filename, const unsigned int sizex, const unsigned int sizey, const unsigned int first_frame=0, const int last_frame=-1, const bool yuv2rgb=true)
| In-place version of get_load_yuv().
const CImgList & | save_yuv (const char *filename, const bool rgb2yuv=true) const
| Save an image sequence into a YUV file.
const CImgList & | save (const char *filename) const
| Save an image list into a file.
const CImgList & | save_cimg (const char *filename) const
| Save an image list into a CImg RAW file.
template<typename tf, typename tc>
CImgList & | load_off (const char *filename, CImgList< tf > &primitives, CImgList< tc > &colors, const bool invert_faces=false)
| In-place version of get_load_off().
template<typename tf, typename tc>
const CImgList & | save_off (const char *filename, const CImgList< tf > &primitives, const CImgList< tc > &colors, const bool invert_faces=false) const
| Save an image list into a OFF file.
CImg< T > | get_append (const char axe='x', const char align='c') const
| Return a single image which is the concatenation of all images of the current CImgList instance.
const CImgList & | display (CImgDisplay &disp, const char axe='x', const char align='c') const
| Display the current CImgList instance in an existing CImgDisplay window (by reference).
const CImgList & | display (const char *title, const char axe='x', const char align='c', const int min_size=128, const int max_size=1024) const
| Display the current CImgList instance in a new display window.
const CImgList & | display (const char axe='x', const char align='c', const int min_size=128, const int max_size=1024) const
| Display the current CImgList instance in a new display window.
static CImgList | get_load (const char *filename)
| Load an image list from a file.
static CImgList | get_load_cimg (const char *filename)
| Load an image list from a file (.raw format).
static CImgList | get_load_parrec (const char *filename)
| Load PAR-REC (Philips) image file.
static CImgList | get_load_yuv (const char *filename, const unsigned int sizex, const unsigned int sizey, const unsigned int first_frame=0, const int last_frame=-1, const bool yuv2rgb=true)
| Load YUV image sequence.
template<typename tf, typename tc>
static CImgList< T > | get_load_off (const char *filename, CImgList< tf > &primitives, CImgList< tc > &colors, const bool invert_faces=false)
| Load from OFF file format.
static CImgList< T > | get_font (const unsigned int font_width, const bool variable_size=true)
| Return a CImg pre-defined font with desired size.
## Public Types
typedef CImg< T > * | iterator
| Define a CImgList<T>::iterator.
typedef const CImg< T > * | const_iterator
| Define a CImgList<T>::const_iterator.
## Public Attributes
unsigned int | size
| Size of the list (number of elements inside).
unsigned int | allocsize
| Allocation size of the list.
CImg< T > * | data
| Pointer to the first list element.

## Detailed Description

### template<typename T>
struct cimg_library::CImgList< T >

Class representing list of images CImg<T>.

## Member Function Documentation

const CImgList& save | ( | const char * | filename | ) | const

Save an image list into a file.

Depending on the extension of the given filename, a file format is chosen for the output file.

const CImgList& save_cimg | ( | const char * | filename | ) | const

Save an image list into a CImg RAW file.

A CImg RAW file is a simple uncompressed binary file that may be used to save list of CImg<T> images.

Parameters:

  | filename | : name of the output file.

Returns:
  A reference to the current CImgList instance is returned.

CImg<T> get_append | ( | const char | axe = `'x'`,
|  | const char | align = `'c'` |
| ) |  |  | const

Return a single image which is the concatenation of all images of the current CImgList instance.

Parameters:

  | axe | : specify the axe for image concatenation. Can be 'x','y','z' or 'v'.
  | align | : specify the alignment for image concatenation. Can be 'p' (top), 'c' (center) or 'n' (bottom).

Returns:
  A CImg<T> image corresponding to the concatenation is returned.

static CImgList<T> get_font | ( | const unsigned int | font_width,
|  | const bool | variable_size = `true` |
| ) |  |  | `[static]`

Return a CImg pre-defined font with desired size.

Parameters:

  | font_height | = height of the desired font (can be 11,13,24,38 or 57)
  | fixed_size | = tell if the font has a fixed or variable width.

const CImgList& display | ( | CImgDisplay & | disp,
|  | const char | axe = `'x'`,
|  | const char | align = `'c'` |
| ) |  |  | const

Display the current CImgList instance in an existing CImgDisplay window (by reference).

This function displays the list images of the current CImgList instance into an existing CImgDisplay window. Images of the list are concatenated in a single temporarly image for visualization purposes. The function returns immediately.

Parameters:

  | disp | : reference to an existing CImgDisplay instance, where the current image list will be displayed.
  | axe | : specify the axe for image concatenation. Can be 'x','y','z' or 'v'.
  | align | : specify the alignment for image concatenation. Can be 'p' (top), 'c' (center) or 'n' (bottom).

Returns:
  A reference to the current CImgList instance is returned.

const CImgList& display | ( | const char * | title,
|  | const char | axe = `'x'`,
|  | const char | align = `'c'`,
|  | const int | min_size = `128`,
|  | const int | max_size = `1024` |
| ) |  |  | const

Display the current CImgList instance in a new display window.

This function opens a new window with a specific title and displays the list images of the current CImgList instance into it. Images of the list are concatenated in a single temporarly image for visualization purposes. The function returns when a key is pressed or the display window is closed by the user.

Parameters:

  | title | : specify the title of the opening display window.
  | axe | : specify the axe for image concatenation. Can be 'x','y','z' or 'v'.
  | align | : specify the alignment for image concatenation. Can be 'p' (top), 'c' (center) or 'n' (bottom).
  | min_size | : specify the minimum size of the opening display window. Images having dimensions below this size will be upscaled.
  | max_size | : specify the maximum size of the opening display window. Images having dimensions above this size will be downscaled.

Returns:
  A reference to the current CImgList instance is returned.

const CImgList& display | ( | const char | axe = `'x'`,
|  | const char | align = `'c'`,
|  | const int | min_size = `128`,
|  | const int | max_size = `1024` |
| ) |  |  | const

Display the current CImgList instance in a new display window.

This function opens a new window and displays the list images of the current CImgList instance into it. Images of the list are concatenated in a single temporarly image for visualization purposes. The function returns when a key is pressed or the display window is closed by the user.

Parameters:

  | axe | : specify the axe for image concatenation. Can be 'x','y','z' or 'v'.
  | align | : specify the alignment for image concatenation. Can be 'p' (top), 'c' (center) or 'n' (bottom).
  | min_size | : specify the minimum size of the opening display window. Images having dimensions below this size will be upscaled.
  | max_size | : specify the maximum size of the opening display window. Images having dimensions above this size will be downscaled.

Returns:
  A reference to the current CImgList instance is returned.

The CImg Library - C++ Template Image Processing Library