xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

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

# CImgList Struct Template Reference

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

List of all members.

## Constructors - Destructor - Copy

Y V V | Y
Y V V Z | Z
Y V V Z V const unsigned int | dy
Y V V Z V const unsigned int const unsigned int | dz
| ~CImgList ()
| Destructor.
| CImgList ()
| Default constructor.
| CImgList (const unsigned int n)
| Construct an image list containing n empty 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 CImgList< T > &list, const bool shared)
| 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 (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 specified value.
| CImgList (const unsigned int n, const unsigned int width, const unsigned int height, const unsigned int depth, const unsigned int dim, 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 dim, 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)
| Construct a list containing n copies of the image img.
template<typename t >
| CImgList (const unsigned int n, const CImg< t > &img, const bool shared)
| Construct a list containing n copies of the image img, forcing the shared state.
template<typename t >
| CImgList (const CImg< t > &img)
| Construct an image list from one image.
template<typename t >
| CImgList (const CImg< t > &img, const bool shared)
| Construct an image list from one image, forcing the shared state.
template<typename t1 , typename t2 >
| CImgList (const CImg< t1 > &img1, const CImg< t2 > &img2)
| Construct an image list from two images.
template<typename t1 , typename t2 >
| CImgList (const CImg< t1 > &img1, const CImg< t2 > &img2, const bool shared)
| Construct an image list from two images, forcing the shared state.
template<typename t1 , typename t2 , typename t3 >
| CImgList (const CImg< t1 > &img1, const CImg< t2 > &img2, const CImg< t3 > &img3)
| Construct an image list from three images.
template<typename t1 , typename t2 , typename t3 >
| CImgList (const CImg< t1 > &img1, const CImg< t2 > &img2, const CImg< t3 > &img3, const bool shared)
| Construct an image list from three images, forcing the shared state.
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)
| Construct an image list from four 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)
| Construct an image list from four images, forcing the shared state.
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)
| Construct an image list from five 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)
| Construct an image list from five images, forcing the shared state.
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)
| Construct an image list from six 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)
| Construct an image list from six images, forcing the shared state.
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)
| Construct an image list from seven 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)
| Construct an image list from seven images, forcing the shared state.
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)
| 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 (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)
| Construct an image list from eight images, forcing the shared state.
| CImgList (const char *const filename)
| Construct an image list from a filename.
CImgList< T > & | assign ()
| In-place version of the default constructor and default destructor.
CImgList< T > & | clear ()
| Equivalent to assign() (STL-compliant name).
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 dim=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 dim, 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 dim, 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 dim, const double val0, const double val1,...)
| In-place version of the corresponding constructor.
template<typename t >
CImgList< T > & | assign (const CImgList< t > &list)
| In-place version of the copy constructor.
template<typename t >
CImgList< T > & | assign (const CImgList< t > &list, const bool shared)
| In-place version of the copy constructor.
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.
template<typename t >
CImgList< T > & | transfer_to (CImgList< t > &list)
| Transfer the content of the instance image list into another one.
CImgList< T > & | transfer_to (CImgList< T > &list)
CImgList< T > & | swap (CImgList< T > &list)
| Swap all fields of two CImgList instances (use with care !).
bool | is_empty () const
| Return `true` if list is empty.
| operator bool () const
| Return `true` if list is not empty.
bool | is_sameN (const unsigned int n) const
| Return `true` if list if of specified size.
template<typename t >
bool | is_sameN (const CImgList< t > &list) const
| Return `true` if list if of specified size.
| _cimglist_def_is_same (XY) _cimglist_def_is_same(XZ) _cimglist_def_is_same(XV) _cimglist_def_is_same(YZ) _cimglist_def_is_same(YV) _cimglist_def_is_same(XYZ) _cimglist_def_is_same(XYV) _cimglist_def_is_same(YZV) _cimglist_def_is_same(XYZV) _cimglist_def_is_same1(X) _cimglist_def_is_same1(Y) _cimglist_def_is_same1(Z) _cimglist_def_is_same1(V) _cimglist_def_is_same2(X
Y | _cimglist_def_is_same2 (X, Z) _cimglist_def_is_same2(X
Y V | _cimglist_def_is_same2 (Y, Z) _cimglist_def_is_same2(Y
Y V V | _cimglist_def_is_same2 (Z, V) _cimglist_def_is_same3(X
Y V V Z | _cimglist_def_is_same3 (X, Y, V) _cimglist_def_is_same3(X
Y V V Z V | _cimglist_def_is_same3 (Y, Z, V) bool is_sameXYZV(const unsigned int dx
tc CImgList< T > & | load_off (const char *const filename, CImgList< tf > &primitives, CImgList< tc > &colors, const bool invert_faces=false)
CImgList< T > & | load_tiff (const char *const filename, const unsigned int first_frame=0, const unsigned int last_frame=~0U, const unsigned int step_frame=1)
| Load a TIFF file.
const CImgList< T > & | save (const char *const filename, const int number=-1) const
| Save an image list into a file.
const CImgList< T > & | save_ffmpeg (const char *const filename, const unsigned int first_frame=0, const unsigned int last_frame=~0U, const unsigned int fps=25) const
| Save an image sequence, using FFMPEG library.
const CImgList< T > & | _save_yuv (cimg_std::FILE *const file, const char *const filename, const bool rgb2yuv) const
const CImgList< T > & | save_yuv (const char *const filename=0, const bool rgb2yuv=true) const
| Save an image sequence into a YUV file.
const CImgList< T > & | save_yuv (cimg_std::FILE *const file, const bool rgb2yuv=true) const
| Save an image sequence into a YUV file.
const CImgList< T > & | _save_cimg (cimg_std::FILE *const file, const char *const filename, const bool compression) const
| Save an image list into a .cimg file.
const CImgList< T > & | save_cimg (cimg_std::FILE *file, const bool compress=false) const
| Save an image list into a CImg file (RAW binary file + simple header).
const CImgList< T > & | save_cimg (const char *const filename, const bool compress=false) const
| Save an image list into a CImg file (RAW binary file + simple header).
const CImgList< T > & | _save_cimg (cimg_std::FILE *const file, const char *const filename, const unsigned int n0, const unsigned int x0, const unsigned int y0, const unsigned int z0, const unsigned int v0) const
const CImgList< T > & | save_cimg (const char *const filename, const unsigned int n0, const unsigned int x0, const unsigned int y0, const unsigned int z0, const unsigned int v0) const
| Insert the instance image into into an existing .cimg file, at specified coordinates.
const CImgList< T > & | save_cimg (cimg_std::FILE *const file, const unsigned int n0, const unsigned int x0, const unsigned int y0, const unsigned int z0, const unsigned int v0) const
| Insert the instance image into into an existing .cimg file, at specified coordinates.
const CImgList< T > & | save_gzip_external (const char *const filename) const
| Save a file in TIFF format.
template<typename tf , typename tc >
const CImgList< T > & | save_off (const char *const filename, const CImgList< tf > &primitives, const CImgList< tc > &colors, const bool invert_faces=false) const
| Save an image list into a OFF file.
template<typename tf , typename tc >
const CImgList< T > & | save_off (cimg_std::FILE *const file, const CImgList< tf > &primitives, const CImgList< tc > &colors, const bool invert_faces=false) const
| Save an image list into a OFF file.
const CImgList< T > & | save_ffmpeg_external (const char *const filename, const unsigned int first_frame=0, const unsigned int last_frame=~0U, const char *const codec="mpeg2video") const
| Save an image sequence using the external tool 'ffmpeg'.
static const char * | pixel_type ()
| Return a string describing the type of the image pixels in the list (template parameter `T`).
template<typename tf , typename tc >
static CImgList< T > | get_load_off (const char *const filename, CImgList< tf > &primitives, CImgList< tc > &colors, const bool invert_faces=false)
static CImgList< T > | get_load_tiff (const char *const filename, const unsigned int first_frame=0, const unsigned int last_frame=~0U, const unsigned int step_frame=1)
static void | _save_empty_cimg (cimg_std::FILE *const file, const char *const filename, const unsigned int nb, const unsigned int dx, const unsigned int dy, const unsigned int dz, const unsigned int dv)
static void | save_empty_cimg (const char *const filename, const unsigned int nb, const unsigned int dx, const unsigned int dy=1, const unsigned int dz=1, const unsigned int dv=1)
| Create an empty .cimg file with specified dimensions.
static void | save_empty_cimg (cimg_std::FILE *const file, const unsigned int nb, const unsigned int dx, const unsigned int dy=1, const unsigned int dz=1, const unsigned int dv=1)
| Create an empty .cimg file with specified dimensions.

## 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
| Get value type.

## 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<T>& save | ( | const char *const | filename,
|  | const int | number = `-1` |
| ) |  |  | const`[inline]`

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<T>& _save_cimg | ( | cimg_std::FILE *const | file,
|  | const char *const | filename,
|  | const bool | compression |
| ) |  |  | const`[inline]`

Save an image list into a .cimg 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.

const CImgList<T>& save_gzip_external | ( | const char *const | filename | ) | const`[inline]`

Save a file in TIFF format.

Save an image list as a gzipped file, using external tool 'gzip'.