## Latest stable version: 3.5.1 Current pre-release: 3.5.2 (2025/01/28)

- Home
- Download
- Screenshots
- Tutorial
- Documentation
- Report Issue
- Links
- Book

Reference

Public Types | List of all members
CImgList< T > Struct Template Reference

Represent a list of images CImg<T>. More...

`#include <CImg.h>`

## Public Types

typedef CImg< T > * | iterator
| Simple iterator type, to loop through each image of a list.
typedef const CImg< T > * | const_iterator
| Simple const iterator type, to loop through each image of a `const` list instance.
typedef T | value_type
| Pixel value type.

## Constructors / Destructor / Instance Management

| ~CImgList ()
| Destructor.
| CImgList ()
| Default constructor.
| CImgList (const unsigned int n)
| Construct list containing 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 list containing images of 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 list containing images of specified size, and initialize pixel values.
| 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 list containing images of specified size, and initialize pixel values from a sequence of integers.
| 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 list containing images of specified size, and initialize pixel values from a sequence of doubles.
template<typename t>
| CImgList (const unsigned int n, const CImg< t > &img, const bool is_shared=false)
| Construct list containing copies of an input image.
template<typename t>
| CImgList (const CImg< t > &img, const bool is_shared=false)
| Construct list from one image.
template<typename t1, typename t2>
| CImgList (const CImg< t1 > &img1, const CImg< t2 > &img2, const bool is_shared=false)
| Construct 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 is_shared=false)
| Construct 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 is_shared=false)
| Construct 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 is_shared=false)
| Construct 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 is_shared=false)
| Construct 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 is_shared=false)
| Construct 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 is_shared=false)
| Construct list from eight images.
template<typename t>
| CImgList (const CImgList< t > &list)
| Construct list copy.
| CImgList (const CImgList< T > &list)
| Construct list copy [specialization].
template<typename t>
| CImgList (const CImgList< t > &list, const bool is_shared)
| Construct list copy, and force the shared state of the list elements.
| CImgList (const char *const filename)
| Construct list by reading the content of a file.
| CImgList (const CImgDisplay &disp)
| Construct list from the content of a display window.
CImgList< T > | get_shared ()
| Return a list with elements being shared copies of images in the list instance.
const CImgList< T > | get_shared () const
| Return a list with elements being shared copies of images in the list instance [const version].
CImgList< T > & | assign ()
| Destructor [in-place version].
CImgList< T > & | clear ()
| Destructor [in-place version].
CImgList< T > & | assign (const unsigned int n)
| Construct list containing empty images [in-place version].
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)
| Construct list containing images of specified size [in-place version].
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)
| Construct list containing images of specified size, and initialize pixel values [in-place version].
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,...)
| Construct list with images of specified size, and initialize pixel values from a sequence of integers [in-place version].
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,...)
| Construct list with images of specified size, and initialize pixel values from a sequence of doubles [in-place version].
template<typename t>
CImgList< T > & | assign (const unsigned int n, const CImg< t > &img, const bool is_shared=false)
| Construct list containing copies of an input image [in-place version].
template<typename t>
CImgList< T > & | assign (const CImg< t > &img, const bool is_shared=false)
| Construct list from one image [in-place version].
template<typename t1, typename t2>
CImgList< T > & | assign (const CImg< t1 > &img1, const CImg< t2 > &img2, const bool is_shared=false)
| Construct list from two images [in-place version].
template<typename t1, typename t2, typename t3>
CImgList< T > & | assign (const CImg< t1 > &img1, const CImg< t2 > &img2, const CImg< t3 > &img3, const bool is_shared=false)
| Construct list from three images [in-place version].
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 is_shared=false)
| Construct list from four images [in-place version].
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 is_shared=false)
| Construct list from five images [in-place version].
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 is_shared=false)
| Construct list from six images [in-place version].
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 is_shared=false)
| Construct list from seven images [in-place version].
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 is_shared=false)
| Construct list from eight images [in-place version].
template<typename t>
CImgList< T > & | assign (const CImgList< t > &list, const bool is_shared=false)
| Construct list as a copy of an existing list and force the shared state of the list elements [in-place version].
CImgList< T > & | assign (const CImgList< T > &list, const bool is_shared=false)
| Construct list as a copy of an existing list and force shared state of elements [in-place version] [specialization].
CImgList< T > & | assign (const char *const filename)
| Construct list by reading the content of a file [in-place version].
CImgList< T > & | assign (const CImgDisplay &disp)
| Construct list from the content of a display window [in-place version].
template<typename t>
CImgList< t > & | move_to (CImgList< t > &list)
| Transfer the content of the list instance to another list.
template<typename t>
CImgList< t > & | move_to (CImgList< t > &list, const unsigned int pos)
| Transfer the content of the list instance at a specified position in another list.
CImgList< T > & | swap (CImgList< T > &list)
| Swap all fields between two list instances.
static CImgList< T > & | empty ()
| Return a reference to an empty list.
static const CImgList< T > & | const_empty ()
| Return a reference to an empty list [const version].

## Overloaded Operators

CImg< T > & | operator() (const unsigned int pos)
| Return a reference to one image element of the list.
const CImg< T > & | operator() (const unsigned int pos) const
| Return a reference to one image of the list.
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 one pixel value of one 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
| Return a reference to one pixel value of one image of the list [const version].
| operator CImg< T > * ()
| Return pointer to the first image of the list.
| operator const CImg< T > * () const
| Return pointer to the first image of the list [const version].
template<typename t>
CImgList< T > & | operator= (const CImg< t > &img)
| Construct list from one image [in-place version].
template<typename t>
CImgList< T > & | operator= (const CImgList< t > &list)
| Construct list from another list.
CImgList< T > & | operator= (const CImgList< T > &list)
| Construct list from another list [specialization].
CImgList< T > & | operator= (const char *const filename)
| Construct list by reading the content of a file [in-place version].
CImgList< T > & | operator= (const CImgDisplay &disp)
| Construct list from the content of a display window [in-place version].
CImgList< T > | operator+ () const
| Return a non-shared copy of a list.
template<typename t>
CImgList< T > & | operator, (const CImg< t > &img)
| Return a copy of the list instance, where image `img` has been inserted at the end.
template<typename t>
CImgList< T > | operator, (const CImg< t > &img) const
| Return a copy of the list instance, where image `img` has been inserted at the end [const version].
template<typename t>
CImgList< T > & | operator, (const CImgList< t > &list)
| Return a copy of the list instance, where all elements of input list `list` have been inserted at the end.
template<typename t>
CImgList< T > & | operator, (const CImgList< t > &list) const
| Return a copy of the list instance, where all elements of input `list` have been inserted at the end [const version].
CImg< T > | operator> (const char axis) const
| Return image corresponding to the appending of all images of the instance list along specified axis.
CImgList< T > | operator< (const char axis) const
| Return list corresponding to the splitting of all images of the instance list along specified axis.

## Instance Characteristics

int | width () const
| Return the size of the list, i.e. the number of images contained in it.
unsigned int | size () const
| Return the size of the list, i.e. the number of images contained in it.
CImg< T > * | data ()
| Return pointer to the first image of the list.
const CImg< T > * | data () const
| Return pointer to the first image of the list [const version].
CImg< T > * | data (const unsigned int pos)
| Return pointer to the pos-th image of the list.
iterator | begin ()
| Return iterator to the first image of the list.
const_iterator | begin () const
| Return iterator to the first image of the list [const version].
iterator | end ()
| Return iterator to one position after the last image of the list.
const_iterator | end () const
| Return iterator to one position after the last image of the list [const version].
CImg< T > & | front ()
| Return reference to the first image of the list.
const CImg< T > & | front () const
| Return reference to the first image of the list [const version].
const CImg< T > & | back () const
| Return a reference to the last image of the list.
CImg< T > & | back ()
| Return a reference to the last image of the list [const version].
CImg< T > & | at (const int pos)
| Return pos-th image of the list.
T & | atNXYZC (const int pos, const int x, const int y, const int z, const int c, const T &out_value)
| Access to pixel value with Dirichlet boundary conditions.
T | atNXYZC (const int pos, const int x, const int y, const int z, const int c, const T &out_value) const
| Access to pixel value with Dirichlet boundary conditions [const version].
T & | atNXYZC (const int pos, const int x, const int y, const int z, const int c)
| Access to pixel value with Neumann boundary conditions.
T | atNXYZC (const int pos, const int x, const int y, const int z, const int c) const
| Access to pixel value with Neumann boundary conditions [const version].
T & | atNXYZ (const int pos, const int x, const int y, const int z, const int c, const T &out_value)
| Access pixel value with Dirichlet boundary conditions for the 3 coordinates (`pos`, `x`,`y`,`z`).
T | atNXYZ (const int pos, const int x, const int y, const int z, const int c, const T &out_value) const
| Access pixel value with Dirichlet boundary conditions for the 3 coordinates (`pos`, `x`,`y`,`z`) [const version].
T & | atNXYZ (const int pos, const int x, const int y, const int z, const int c=0)
| Access to pixel value with Neumann boundary conditions for the 4 coordinates (`pos`, `x`,`y`,`z`).
T | atNXYZ (const int pos, const int x, const int y, const int z, const int c=0) const
| Access to pixel value with Neumann boundary conditions for the 4 coordinates (`pos`, `x`,`y`,`z`) [const version].
T & | atNXY (const int pos, const int x, const int y, const int z, const int c, const T &out_value)
| Access to pixel value with Dirichlet boundary conditions for the 3 coordinates (`pos`, `x`,`y`).
T | atNXY (const int pos, const int x, const int y, const int z, const int c, const T &out_value) const
| Access to pixel value with Dirichlet boundary conditions for the 3 coordinates (`pos`, `x`,`y`) [const version].
T & | atNXY (const int pos, const int x, const int y, const int z=0, const int c=0)
| Access to pixel value with Neumann boundary conditions for the 3 coordinates (`pos`, `x`,`y`).
T | atNXY (const int pos, const int x, const int y, const int z=0, const int c=0) const
| Access to pixel value with Neumann boundary conditions for the 3 coordinates (`pos`, `x`,`y`) [const version].
T & | atNX (const int pos, const int x, const int y, const int z, const int c, const T &out_value)
| Access to pixel value with Dirichlet boundary conditions for the 2 coordinates (`pos`,`x`).
T | atNX (const int pos, const int x, const int y, const int z, const int c, const T &out_value) const
| Access to pixel value with Dirichlet boundary conditions for the 2 coordinates (`pos`,`x`) [const version].
T & | atNX (const int pos, const int x, const int y=0, const int z=0, const int c=0)
| Access to pixel value with Neumann boundary conditions for the 2 coordinates (`pos`, `x`).
T | atNX (const int pos, const int x, const int y=0, const int z=0, const int c=0) const
| Access to pixel value with Neumann boundary conditions for the 2 coordinates (`pos`, `x`) [const version].
T & | atN (const int pos, const int x, const int y, const int z, const int c, const T &out_value)
| Access to pixel value with Dirichlet boundary conditions for the coordinate (`pos`).
T | atN (const int pos, const int x, const int y, const int z, const int c, const T &out_value) const
| Access to pixel value with Dirichlet boundary conditions for the coordinate (`pos`) [const version].
T & | atN (const int pos, const int x=0, const int y=0, const int z=0, const int c=0)
| Return pixel value with Neumann boundary conditions for the coordinate (`pos`).
T | atN (const int pos, const int x=0, const int y=0, const int z=0, const int c=0) const
| Return pixel value with Neumann boundary conditions for the coordinate (`pos`) [const version].
static const char * | pixel_type ()
| Return the type of image pixel values as a C string.

## Instance Checking

bool | is_empty () const
| Return `true` if list is empty.
bool | is_sameN (const unsigned int size_n) const
| Test if number of image elements is equal to specified value.
template<typename t>
bool | is_sameN (const CImgList< t > &list) const
| Test if number of image elements is equal between two images lists.
bool | is_sameXYZC (const unsigned int dx, const unsigned int dy, const unsigned int dz, const unsigned int dc) const
| Test if dimensions of each image of the list match specified arguments.
bool | is_sameNXYZC (const unsigned int n, const unsigned int dx, const unsigned int dy, const unsigned int dz, const unsigned int dc) const
| Test if list dimensions match specified arguments.
bool | containsNXYZC (const int n, const int x=0, const int y=0, const int z=0, const int c=0) const
| Test if list contains one particular pixel location.
bool | containsN (const int n) const
| Test if list contains image with specified index.
template<typename t>
bool | contains (const T &pixel, t &n, t &x, t &y, t &z, t &c) const
| Test if one image of the list contains the specified referenced value.
template<typename t>
bool | contains (const T &pixel, t &n, t &x, t &y, t &z) const
| Test if one of the image list contains the specified referenced value.
template<typename t>
bool | contains (const T &pixel, t &n, t &x, t &y) const
| Test if one of the image list contains the specified referenced value.
template<typename t>
bool | contains (const T &pixel, t &n, t &x) const
| Test if one of the image list contains the specified referenced value.
template<typename t>
bool | contains (const T &pixel, t &n) const
| Test if one of the image list contains the specified referenced value.
bool | contains (const T &pixel) const
| Test if one of the image list contains the specified referenced value.
template<typename t>
bool | contains (const CImg< T > &img, t &n) const
| Test if the list contains the image 'img'.
bool | contains (const CImg< T > &img) const
| Test if the list contains the image img.

## Mathematical Functions

T & | min ()
| Return a reference to the minimum pixel value of the instance list.
const T & | min () const
| Return a reference to the minimum pixel value of the instance list [const version].
T & | max ()
| Return a reference to the maximum pixel value of the instance list.
const T & | max () const
| Return a reference to the maximum pixel value of the instance list [const version].
template<typename t>
T & | min_max (t &max_val)
| Return a reference to the minimum pixel value of the instance list and return the maximum vvalue as well.
template<typename t>
const T & | min_max (t &max_val) const
| Return a reference to the minimum pixel value of the instance list and return the maximum vvalue as well [const version].
template<typename t>
T & | max_min (t &min_val)
| Return a reference to the minimum pixel value of the instance list and return the minimum value as well.
template<typename t>
const T & | max_min (t &min_val) const
| Return a reference to the minimum pixel value of the instance list and return the minimum value as well [const version].

## List Manipulation

template<typename t>
CImgList< T > & | insert (const CImg< t > &img, const unsigned int pos=~0U, const bool is_shared=false)
| Insert a copy of the image `img` into the current image list, at position `pos`.
CImgList< T > & | insert (const CImg< T > &img, const unsigned int pos=~0U, const bool is_shared=false)
| Insert a copy of the image `img` into the current image list, at position `pos` [specialization].
template<typename t>
CImgList< T > | get_insert (const CImg< t > &img, const unsigned int pos=~0U, const bool is_shared=false) const
| Insert a copy of the image `img` into the current image list, at position `pos` [new-instance version].
CImgList< T > & | insert (const unsigned int n, const unsigned int pos=~0U)
| Insert n empty images img into the current image list, at position `pos`.
CImgList< T > | get_insert (const unsigned int n, const unsigned int pos=~0U) const
| Insert n empty images img into the current image list, at position `pos` [new-instance version].
template<typename t>
CImgList< T > & | insert (const unsigned int n, const CImg< t > &img, const unsigned int pos=~0U, const bool is_shared=false)
| Insert `n` copies of the image `img` into the current image list, at position `pos`.
template<typename t>
CImgList< T > | get_insert (const unsigned int n, const CImg< t > &img, const unsigned int pos=~0U, const bool is_shared=false) const
| Insert `n` copies of the image `img` into the current image list, at position `pos` [new-instance version].
template<typename t>
CImgList< T > & | insert (const CImgList< t > &list, const unsigned int pos=~0U, const bool is_shared=false)
| Insert a copy of the image list `list` into the current image list, starting from position `pos`.
template<typename t>
CImgList< T > | get_insert (const CImgList< t > &list, const unsigned int pos=~0U, const bool is_shared=false) const
| Insert a copy of the image list `list` into the current image list, starting from position `pos` [new-instance version].
template<typename t>
CImgList< T > & | insert (const unsigned int n, const CImgList< t > &list, const unsigned int pos=~0U, const bool is_shared=false)
| Insert n copies of the list `list` at position `pos` of the current list.
template<typename t>
CImgList< T > | get_insert (const unsigned int n, const CImgList< t > &list, const unsigned int pos=~0U, const bool is_shared=false) const
| Insert n copies of the list `list` at position `pos` of the current list [new-instance version].
CImgList< T > & | remove (const unsigned int pos1, const unsigned int pos2)
| Remove all images between from indexes.
CImgList< T > | get_remove (const unsigned int pos1, const unsigned int pos2) const
| Remove all images between from indexes [new-instance version].
CImgList< T > & | remove (const unsigned int pos)
| Remove image at index `pos` from the image list.
CImgList< T > | get_remove (const unsigned int pos) const
| Remove image at index `pos` from the image list [new-instance version].
CImgList< T > & | remove ()
| Remove last image.
CImgList< T > | get_remove () const
| Remove last image [new-instance version].
CImgList< T > & | reverse ()
| Reverse list order.
CImgList< T > | get_reverse () const
| Reverse list order [new-instance version].
CImgList< T > & | images (const unsigned int pos0, const unsigned int pos1)
| Return a sublist.
CImgList< T > | get_images (const unsigned int pos0, const unsigned int pos1) const
| Return a sublist [new-instance version].
CImgList< T > | get_shared_images (const unsigned int pos0, const unsigned int pos1)
| Return a shared sublist.
const CImgList< T > | get_shared_images (const unsigned int pos0, const unsigned int pos1) const
| Return a shared sublist [new-instance version].
CImg< T > | get_append (const char axis, const float align=0) const
| Return a single image which is the appending of all images of the current CImgList instance.
CImgList< T > & | split (const char axis, const int nb=-1)
| Return a list where each image has been split along the specified axis.
CImgList< T > | get_split (const char axis, const int nb=-1) const
| Return a list where each image has been split along the specified axis [new-instance version].
template<typename t>
CImgList< T > & | push_back (const CImg< t > &img)
| Insert image at the end of the list.
template<typename t>
CImgList< T > & | push_front (const CImg< t > &img)
| Insert image at the front of the list.
template<typename t>
CImgList< T > & | push_back (const CImgList< t > &list)
| Insert list at the end of the current list.
template<typename t>
CImgList< T > & | push_front (const CImgList< t > &list)
| Insert list at the front of the current list.
CImgList< T > & | pop_back ()
| Remove last image.
CImgList< T > & | pop_front ()
| Remove first image.
CImgList< T > & | erase (const iterator iter)
| Remove image pointed by iterator.

## Data Input

CImg< intT > | get_select (CImgDisplay &disp, const bool feature_type=true, const char axis='x', const float align=0, const bool exit_on_anykey=false) const
| Display a simple interactive interface to select images or sublists.
CImg< intT > | get_select (const char *const title, const bool feature_type=true, const char axis='x', const float align=0, const bool exit_on_anykey=false) const
| Display a simple interactive interface to select images or sublists.
CImgList< T > & | load (const char *const filename)
| Load a list from a file.
CImgList< T > & | load_cimg (const char *const filename)
| Load a list from a .cimg file.
CImgList< T > & | load_cimg (std::FILE *const file)
| Load a list from a .cimg file.
CImgList< T > & | load_cimg (const char *const filename, const unsigned int n0, const unsigned int n1, const unsigned int x0, const unsigned int y0, const unsigned int z0, const unsigned int c0, const unsigned int x1, const unsigned int y1, const unsigned int z1, const unsigned int c1)
| Load a sublist list from a (non compressed) .cimg file.
CImgList< T > & | load_cimg (std::FILE *const file, const unsigned int n0, const unsigned int n1, const unsigned int x0, const unsigned int y0, const unsigned int z0, const unsigned int c0, const unsigned int x1, const unsigned int y1, const unsigned int z1, const unsigned int c1)
| Load a sub-image list from a (non compressed) .cimg file [overloading].
CImgList< T > & | load_parrec (const char *const filename)
| Load a list from a PAR/REC (Philips) file.
CImgList< T > & | load_yuv (const char *const filename, const unsigned int size_x, const unsigned int size_y, const unsigned int chroma_subsampling=444, const unsigned int first_frame=0, const unsigned int last_frame=~0U, const unsigned int step_frame=1, const bool yuv2rgb=true)
| Load a list from a YUV image sequence file.
CImgList< T > & | load_yuv (std::FILE *const file, const unsigned int size_x, const unsigned int size_y, const unsigned int chroma_subsampling=444, const unsigned int first_frame=0, const unsigned int last_frame=~0U, const unsigned int step_frame=1, const bool yuv2rgb=true)
| Load a list from an image sequence YUV file [overloading].
CImgList< T > & | load_video (const char *const filename, const unsigned int first_frame=0, const unsigned int last_frame=~0U, const unsigned int step_frame=1)
| Load an image from a video file, using OpenCV library.
CImgList< T > & | load_ffmpeg_external (const char *const filename)
| Load an image from a video file using the external tool 'ffmpeg'.
CImgList< T > & | load_gif_external (const char *const filename)
| Load gif file, using ImageMagick or GraphicsMagick's external tools.
CImgList< T > & | load_gzip_external (const char *const filename)
| Load a gzipped list, using external tool 'gunzip'.
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, unsigned int *const bits_per_value=0, float *const voxel_size=0, CImg< charT > *const description=0)
| Load images from a TIFF file.
static CImgList< T > | get_load (const char *const filename)
| Load a list from a file [new-instance version].
static CImgList< T > | get_load_cimg (const char *const filename)
| Load a list from a .cimg file [new-instance version].
static CImgList< T > | get_load_cimg (std::FILE *const file)
| Load a list from a .cimg file [new-instance version].
static CImgList< T > | get_load_cimg (const char *const filename, const unsigned int n0, const unsigned int n1, const unsigned int x0, const unsigned int y0, const unsigned int z0, const unsigned int c0, const unsigned int x1, const unsigned int y1, const unsigned int z1, const unsigned int c1)
| Load a sublist list from a (non compressed) .cimg file [new-instance version].
static CImgList< T > | get_load_cimg (std::FILE *const file, const unsigned int n0, const unsigned int n1, const unsigned int x0, const unsigned int y0, const unsigned int z0, const unsigned int c0, const unsigned int x1, const unsigned int y1, const unsigned int z1, const unsigned int c1)
| Load a sub-image list from a (non compressed) .cimg file [new-instance version].
static CImgList< T > | get_load_parrec (const char *const filename)
| Load a list from a PAR/REC (Philips) file [new-instance version].
static CImgList< T > | get_load_yuv (const char *const filename, const unsigned int size_x, const unsigned int size_y=1, const unsigned int chroma_subsampling=444, const unsigned int first_frame=0, const unsigned int last_frame=~0U, const unsigned int step_frame=1, const bool yuv2rgb=true)
| Load a list from a YUV image sequence file [new-instance version].
static CImgList< T > | get_load_yuv (std::FILE *const file, const unsigned int size_x, const unsigned int size_y=1, const unsigned int chroma_subsampling=444, const unsigned int first_frame=0, const unsigned int last_frame=~0U, const unsigned int step_frame=1, const bool yuv2rgb=true)
| Load a list from an image sequence YUV file [new-instance version].
static CImgList< T > | get_load_video (const char *const filename, const unsigned int first_frame=0, const unsigned int last_frame=~0U, const unsigned int step_frame=1)
| Load an image from a video file, using OpenCV library [new-instance version].
static CImgList< T > | get_load_ffmpeg_external (const char *const filename)
| Load an image from a video file using the external tool 'ffmpeg' [new-instance version].
static CImgList< T > | get_load_gif_external (const char *const filename)
| Load gif file, using ImageMagick or GraphicsMagick's external tools [new-instance version].
static CImgList< T > | get_load_gzip_external (const char *const filename)
| Load a gzipped list, using external tool 'gunzip' [new-instance version].
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, unsigned int *const bits_per_value=0, float *const voxel_size=0, CImg< charT > *const description=0)
| Load a multi-page TIFF file [new-instance version].

## Data Output

const CImgList< T > & | print (const char *const title=0, const bool display_stats=true) const
| Print information about the list on the standard output.
const CImgList< T > & | display (CImgDisplay &disp, const char axis='x', const float align=0) const
| Display the current CImgList instance in an existing CImgDisplay window (by reference).
const CImgList< T > & | display (CImgDisplay &disp, const bool display_info, const char axis='x', const float align=0, unsigned int *const XYZ=0, const bool exit_on_anykey=false) const
| Display the current CImgList instance in a new display window.
const CImgList< T > & | display (const char *const title=0, const bool display_info=true, const char axis='x', const float align=0, unsigned int *const XYZ=0, const bool exit_on_anykey=false) const
| Display the current CImgList instance in a new display window.
const CImgList< T > & | save (const char *const filename, const int number=-1, const unsigned int digits=6) const
| Save list into a file.
const CImgList< T > & | save_gif_external (const char *const filename, const float fps=25, const unsigned int nb_loops=0)
| Save image sequence as a GIF animated file.
const CImgList< T > & | save_yuv (const char *const filename=0, const unsigned int chroma_subsampling=444, const bool is_rgb=true) const
| Save list as a YUV image sequence file.
const CImgList< T > & | save_yuv (std::FILE *const file, const unsigned int chroma_subsampling=444, const bool is_rgb=true) const
| Save image sequence into a YUV file.
const CImgList< T > & | save_cimg (const char *const filename, const bool is_compressed=false) const
| Save list into a .cimg file.
const CImgList< T > & | save_cimg (std::FILE *file, const bool is_compressed=false) const
| Save list into a .cimg file.
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 c0) const
| Insert the image instance into into an existing .cimg file, at specified coordinates.
const CImgList< T > & | save_cimg (std::FILE *const file, const unsigned int n0, const unsigned int x0, const unsigned int y0, const unsigned int z0, const unsigned int c0) const
| Insert the image instance into into an existing .cimg file, at specified coordinates.
const CImgList< T > & | save_tiff (const char *const filename, const unsigned int compression_type=0, const float *const voxel_size=0, const char *const description=0, const bool use_bigtiff=true) const
| Save list as a TIFF file.
const CImgList< T > & | save_gzip_external (const char *const filename) const
| Save list as a gzipped file, using external tool 'gzip'.
const CImgList< T > & | save_video (const char *const filename, const unsigned int fps=25, const char *codec=0, const bool keep_open=false) const
| Save image sequence (using the OpenCV library when available).
const CImgList< T > & | save_ffmpeg_external (const char *const filename, const unsigned int fps=25, const char *const codec=0, const unsigned int bitrate=2048) const
| Save image sequence, using the external tool 'ffmpeg'.
CImg< ucharT > | get_serialize (const bool is_compressed=false, const unsigned int header_size=0) const
| Serialize a CImgList<T> instance into a raw CImg<unsigned char> buffer.
static bool | is_saveable (const char *const filename)
| Tell if an image list can be saved as one single file.
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 dc=1)
| Save empty (non-compressed) .cimg file with specified dimensions.
static void | save_empty_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 dc=1)
| Save empty .cimg file with specified dimensions.
template<typename t>
static CImgList< T > | get_unserialize (const CImg< t > &buffer, const unsigned int header_size=0)
| Unserialize a CImg<unsigned char> serialized buffer into a CImgList<T> list.

## Others

CImgList< T > & | FFT (const char axis, const bool invert=false)
| Compute a 1D Fast Fourier Transform, along specified axis.
CImgList< Tfloat > | get_FFT (const char axis, const bool invert=false) const
| Compute a 1-D Fast Fourier Transform, along specified axis [new-instance version].
CImgList< T > & | FFT (const bool invert=false)
| Compute n-D Fast Fourier Transform.
CImgList< Tfloat > | get_FFT (const bool invert=false) const
| Compute n-D Fast Fourier Transform [new-instance version].
CImgList< T > & | reverse_object3d ()
| Reverse primitives orientations of a 3D object.
CImgList< T > | get_reverse_object3d () const
| Reverse primitives orientations of a 3D object [new-instance version].
static const CImgList< ucharT > & | font (const unsigned int requested_height, const bool is_variable_width=true)
| Return a CImg pre-defined font with requested height.

## Detailed Description

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

Represent a list of images CImg<T>.

## Member Typedef Documentation

## ◆ iterator

template<typename T>

typedef CImg<T>* iterator

Simple iterator type, to loop through each image of a list.

Note
  - The `CImgList<T>::iterator` type is defined as a CImg<T>*.
  - You may use it like this:
    CImgList<> list; // Assuming this image list is not empty
    for (CImgList<>::iterator it = list.begin(); it<list.end(); ++it) (*it).mirror('x');
    cimg_library::CImgList::iterator
    CImg< T > * iterator
    Simple iterator type, to loop through each image of a list.
    Definition CImg.h:62548
    cimg_library::CImgList::end
    iterator end()
    Return iterator to one position after the last image of the list.
    Definition CImg.h:63514
    cimg_library::CImgList::begin
    iterator begin()
    Return iterator to the first image of the list.
    Definition CImg.h:63502
    cimg_library::CImgList::CImgList
    CImgList()
    Default constructor.
    Definition CImg.h:62656
  - Using the loop macro `cimglist_for` is another (more concise) alternative:
    cimglist_for(list,l) list[l].mirror('x');

## ◆ const_iterator

template<typename T>

typedef const CImg<T>* const_iterator

Simple const iterator type, to loop through each image of a `const` list instance.

Note
  - The `CImgList<T>::const_iterator` type is defined to be a const CImg<T>*.
  - Similar to CImgList<T>::iterator, but for constant list instances.

## ◆ value_type

template<typename T>

typedef T value_type

Pixel value type.

Refer to the pixels value type of the images in the list.

Note
  - The `CImgList<T>::value_type` type of a `CImgList<T>` is defined to be a `T`. It is then similar to CImg<T>::value_type.
  - `CImgList<T>::value_type` is actually not used in CImg methods. It has been mainly defined for compatibility with STL naming conventions.

## Constructor & Destructor Documentation

## ◆ ~CImgList()

template<typename T>

~CImgList | ( |  | ) |

Destructor.

Destroy current list instance.

Note
  - Any allocated buffer is deallocated.
  - Destroying an empty list does nothing actually.

## ◆ CImgList() [1/19]

template<typename T>

CImgList | ( |  | ) |

Default constructor.

Construct a new empty list instance.

Note
  - An empty list has no pixel data and its dimension width() is set to `0`, as well as its image buffer pointer data().
  - An empty list may be reassigned afterwards, with the family of the assign() methods. In all cases, the type of pixels stays `T`.

## ◆ CImgList() [2/19]

template<typename T>

CImgList | ( | const unsigned int | n | ) |

explicit

Construct list containing empty images.

Parameters

  n | Number of empty images.

Note
  Useful when you know by advance the number of images you want to manage, as it will allocate the right amount of memory for the list, without needs for reallocation (that may occur when starting from an empty list and inserting several images in it).

## ◆ CImgList() [3/19]

template<typename T>

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 list containing images of specified size.

Parameters

  n | Number of images.
  width | Width of images.
  height | Height of images.
  depth | Depth of images.
  spectrum | Number of channels of images.

Note
  Pixel values are not initialized and may probably contain garbage.

## ◆ CImgList() [4/19]

template<typename T>

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 list containing images of specified size, and initialize pixel values.

Parameters

  n | Number of images.
  width | Width of images.
  height | Height of images.
  depth | Depth of images.
  spectrum | Number of channels of images.
  val | Initialization value for images pixels.

## ◆ CImgList() [5/19]

template<typename T>

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 list containing images of specified size, and initialize pixel values from a sequence of integers.

Parameters

  n | Number of images.
  width | Width of images.
  height | Height of images.
  depth | Depth of images.
  spectrum | Number of channels of images.
  val0 | First value of the initializing integers sequence.
  val1 | Second value of the initializing integers sequence.

Warning
  You must specify at least width*height*depth*spectrum values in your argument list, or you will probably segfault.

## ◆ CImgList() [6/19]

template<typename T>

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 list containing images of specified size, and initialize pixel values from a sequence of doubles.

Parameters

  n | Number of images.
  width | Width of images.
  height | Height of images.
  depth | Depth of images.
  spectrum | Number of channels of images.
  val0 | First value of the initializing doubles sequence.
  val1 | Second value of the initializing doubles sequence.

Warning
  You must specify at least width*height*depth*spectrum values in your argument list, or you will probably segfault.

## ◆ CImgList() [7/19]

template<typename T>
template<typename t>

CImgList | ( | const unsigned int | n,
|  | const CImg< t > & | img,
|  | const bool | is_shared = false )

Construct list containing copies of an input image.

Parameters

  n | Number of images.
  img | Input image to copy in the constructed list.
  is_shared | Tells if the elements of the list are shared or non-shared copies of `img`.

## ◆ CImgList() [8/19]

template<typename T>
template<typename t>

CImgList | ( | const CImg< t > & | img,
|  | const bool | is_shared = false )

explicit

Construct list from one image.

Parameters

  img | Input image to copy in the constructed list.
  is_shared | Tells if the element of the list is a shared or non-shared copy of `img`.

## ◆ CImgList() [9/19]

template<typename T>
template<typename t1, typename t2>

CImgList | ( | const CImg< t1 > & | img1,
|  | const CImg< t2 > & | img2,
|  | const bool | is_shared = false )

Construct list from two images.

Parameters

  img1 | First input image to copy in the constructed list.
  img2 | Second input image to copy in the constructed list.
  is_shared | Tells if the elements of the list are shared or non-shared copies of input images.

## ◆ CImgList() [10/19]

template<typename T>
template<typename t1, typename t2, typename t3>

CImgList | ( | const CImg< t1 > & | img1,
|  | const CImg< t2 > & | img2,
|  | const CImg< t3 > & | img3,
|  | const bool | is_shared = false )

Construct list from three images.

Parameters

  img1 | First input image to copy in the constructed list.
  img2 | Second input image to copy in the constructed list.
  img3 | Third input image to copy in the constructed list.
  is_shared | Tells if the elements of the list are shared or non-shared copies of input images.

## ◆ CImgList() [11/19]

template<typename T>
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 | is_shared = false )

Construct list from four images.

Parameters

  img1 | First input image to copy in the constructed list.
  img2 | Second input image to copy in the constructed list.
  img3 | Third input image to copy in the constructed list.
  img4 | Fourth input image to copy in the constructed list.
  is_shared | Tells if the elements of the list are shared or non-shared copies of input images.

## ◆ CImgList() [12/19]

template<typename T>
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 | is_shared = false )

Construct list from five images.

Parameters

  img1 | First input image to copy in the constructed list.
  img2 | Second input image to copy in the constructed list.
  img3 | Third input image to copy in the constructed list.
  img4 | Fourth input image to copy in the constructed list.
  img5 | Fifth input image to copy in the constructed list.
  is_shared | Tells if the elements of the list are shared or non-shared copies of input images.

## ◆ CImgList() [13/19]

template<typename T>
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 | is_shared = false )

Construct list from six images.

Parameters

  img1 | First input image to copy in the constructed list.
  img2 | Second input image to copy in the constructed list.
  img3 | Third input image to copy in the constructed list.
  img4 | Fourth input image to copy in the constructed list.
  img5 | Fifth input image to copy in the constructed list.
  img6 | Sixth input image to copy in the constructed list.
  is_shared | Tells if the elements of the list are shared or non-shared copies of input images.

## ◆ CImgList() [14/19]

template<typename T>
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 | is_shared = false )

Construct list from seven images.

Parameters

  img1 | First input image to copy in the constructed list.
  img2 | Second input image to copy in the constructed list.
  img3 | Third input image to copy in the constructed list.
  img4 | Fourth input image to copy in the constructed list.
  img5 | Fifth input image to copy in the constructed list.
  img6 | Sixth input image to copy in the constructed list.
  img7 | Seventh input image to copy in the constructed list.
  is_shared | Tells if the elements of the list are shared or non-shared copies of input images.

## ◆ CImgList() [15/19]

template<typename T>
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 | is_shared = false )

Construct list from eight images.

Parameters

  img1 | First input image to copy in the constructed list.
  img2 | Second input image to copy in the constructed list.
  img3 | Third input image to copy in the constructed list.
  img4 | Fourth input image to copy in the constructed list.
  img5 | Fifth input image to copy in the constructed list.
  img6 | Sixth input image to copy in the constructed list.
  img7 | Seventh input image to copy in the constructed list.
  img8 | Eighth input image to copy in the constructed list.
  is_shared | Tells if the elements of the list are shared or non-shared copies of input images.

## ◆ CImgList() [16/19]

template<typename T>
template<typename t>

CImgList | ( | const CImgList< t > & | list | ) |

Construct list copy.

Parameters

  list | Input list to copy.

Note
  The shared state of each element of the constructed list is kept the same as in `list`.

## ◆ CImgList() [17/19]

template<typename T>
template<typename t>

CImgList | ( | const CImgList< t > & | list,
|  | const bool | is_shared )

Construct list copy, and force the shared state of the list elements.

Parameters

  list | Input list to copy.
  is_shared | Tells if the elements of the list are shared or non-shared copies of input images.

## ◆ CImgList() [18/19]

template<typename T>

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

explicit

Construct list by reading the content of a file.

Parameters

  filename | Filename, as a C-string.

## ◆ CImgList() [19/19]

template<typename T>

CImgList | ( | const CImgDisplay & | disp | ) |

explicit

Construct list from the content of a display window.

Parameters

  disp | Display window to get content from.

Note
  Constructed list contains a single image only.

## Member Function Documentation

## ◆ get_shared()

template<typename T>

CImgList< T > get_shared | ( |  | ) |

Return a list with elements being shared copies of images in the list instance.

Note
  list2 = list1.get_shared() is equivalent to list2.assign(list1,true).

## ◆ assign() [1/18]

template<typename T>

CImgList< T > & assign | ( |  | ) |

Destructor [in-place version].

See also
  CImgList().

## ◆ clear()

template<typename T>

CImgList< T > & clear | ( |  | ) |

Destructor [in-place version].

Equivalent to assign().

Note
  Only here for compatibility with STL naming conventions.

## ◆ assign() [2/18]

template<typename T>

CImgList< T > & assign | ( | const unsigned int | n | ) |

Construct list containing empty images [in-place version].

See also
  CImgList(unsigned int).

## ◆ assign() [3/18]

template<typename T>

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 )

Construct list containing images of specified size [in-place version].

See also
  CImgList(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int).

## ◆ assign() [4/18]

template<typename T>

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 )

Construct list containing images of specified size, and initialize pixel values [in-place version].

See also
  CImgList(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, const T).

## ◆ assign() [5/18]

template<typename T>

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,
|  |  | ... )

Construct list with images of specified size, and initialize pixel values from a sequence of integers [in-place version].

See also
  CImgList(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, const int, const int, ...).

## ◆ assign() [6/18]

template<typename T>

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,
|  |  | ... )

Construct list with images of specified size, and initialize pixel values from a sequence of doubles [in-place version].

See also
  CImgList(unsigned int,unsigned int,unsigned int,unsigned int,unsigned int,const double,const double,...).

## ◆ assign() [7/18]

template<typename T>
template<typename t>

CImgList< T > & assign | ( | const unsigned int | n,
|  | const CImg< t > & | img,
|  | const bool | is_shared = false )

Construct list containing copies of an input image [in-place version].

See also
  CImgList(unsigned int, const CImg<t>&, bool).

## ◆ assign() [8/18]

template<typename T>
template<typename t>

CImgList< T > & assign | ( | const CImg< t > & | img,
|  | const bool | is_shared = false )

Construct list from one image [in-place version].

See also
  CImgList(const CImg<t>&, bool).

## ◆ assign() [9/18]

template<typename T>
template<typename t1, typename t2>

CImgList< T > & assign | ( | const CImg< t1 > & | img1,
|  | const CImg< t2 > & | img2,
|  | const bool | is_shared = false )

Construct list from two images [in-place version].

See also
  CImgList(const CImg<t>&, const CImg<t>&, bool).

## ◆ assign() [10/18]

template<typename T>
template<typename t1, typename t2, typename t3>

CImgList< T > & assign | ( | const CImg< t1 > & | img1,
|  | const CImg< t2 > & | img2,
|  | const CImg< t3 > & | img3,
|  | const bool | is_shared = false )

Construct list from three images [in-place version].

See also
  CImgList(const CImg<t>&, const CImg<t>&, const CImg<t>&, bool).

## ◆ assign() [11/18]

template<typename T>
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 | is_shared = false )

Construct list from four images [in-place version].

See also
  CImgList(const CImg<t>&, const CImg<t>&, const CImg<t>&, const CImg<t>&, bool).

## ◆ assign() [12/18]

template<typename T>
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 | is_shared = false )

Construct list from five images [in-place version].

See also
  CImgList(const CImg<t>&, const CImg<t>&, const CImg<t>&, const CImg<t>&, const CImg<t>&, bool).

## ◆ assign() [13/18]

template<typename T>
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 | is_shared = false )

Construct list from six images [in-place version].

See also
  CImgList(const CImg<t>&,const CImg<t>&,const CImg<t>&,const CImg<t>&,const CImg<t>&,const CImg<t>&, bool).

## ◆ assign() [14/18]

template<typename T>
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 | is_shared = false )

Construct list from seven images [in-place version].

See also
  CImgList(const CImg<t>&,const CImg<t>&,const CImg<t>&,const CImg<t>&,const CImg<t>&,const CImg<t>&, const CImg<t>&, bool).

## ◆ assign() [15/18]

template<typename T>
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 | is_shared = false )

Construct list from eight images [in-place version].

See also
  CImgList(const CImg<t>&,const CImg<t>&,const CImg<t>&,const CImg<t>&,const CImg<t>&,const CImg<t>&, const CImg<t>&, const CImg<t>&, bool).

## ◆ assign() [16/18]

template<typename T>
template<typename t>

CImgList< T > & assign | ( | const CImgList< t > & | list,
|  | const bool | is_shared = false )

Construct list as a copy of an existing list and force the shared state of the list elements [in-place version].

See also
  CImgList(const CImgList<t>&, bool is_shared).

## ◆ assign() [17/18]

template<typename T>

CImgList< T > & assign | ( | const char *const | filename | ) |

Construct list by reading the content of a file [in-place version].

See also
  CImgList(const char *const).

## ◆ assign() [18/18]

template<typename T>

CImgList< T > & assign | ( | const CImgDisplay & | disp | ) |

Construct list from the content of a display window [in-place version].

See also
  CImgList(const CImgDisplay&).

## ◆ move_to() [1/2]

template<typename T>
template<typename t>

CImgList< t > & move_to | ( | CImgList< t > & | list | ) |

Transfer the content of the list instance to another list.

Parameters

  list | Destination list.

Note
  When returning, the current list instance is empty and the initial content of `list` is destroyed.

## ◆ move_to() [2/2]

template<typename T>
template<typename t>

CImgList< t > & move_to | ( | CImgList< t > & | list,
|  | const unsigned int | pos )

Transfer the content of the list instance at a specified position in another list.

Parameters

  list | Destination list.
  pos | Index of the insertion in the list.

Note
  When returning, the list instance is empty and the initial content of `list` is preserved (only images indexes may be modified).

## ◆ swap()

template<typename T>

CImgList< T > & swap | ( | CImgList< T > & | list | ) |

Swap all fields between two list instances.

Parameters

  list | List to swap fields with.

Note
  Can be used to exchange the content of two lists in a fast way.

## ◆ empty()

template<typename T>

CImgList< T > & empty | ( |  | ) |

static

Return a reference to an empty list.

Note
  Can be used to define default values in a function taking a CImgList<T> as an argument.
  void f(const CImgList<char>& list=CImgList<char>::empty());
  cimg_library::CImgList::empty
  static CImgList< T > & empty()
  Return a reference to an empty list.
  Definition CImg.h:63244

## ◆ operator()() [1/3]

template<typename T>

CImg< T > & operator() | ( | const unsigned int | pos | ) |

Return a reference to one image element of the list.

Parameters

  pos | Index of the image element.

## ◆ operator()() [2/3]

template<typename T>

const CImg< T > & operator() | ( | const unsigned int | pos | ) | const

Return a reference to one image of the list.

Parameters

  pos | Index of the image element.

## ◆ operator()() [3/3]

template<typename T>

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 one pixel value of one image of the list.

Parameters

  pos | Index of the image element.
  x | X-coordinate of the pixel value.
  y | Y-coordinate of the pixel value.
  z | Z-coordinate of the pixel value.
  c | C-coordinate of the pixel value.

Note
  list(n,x,y,z,c) is equivalent to list[n](x,y,z,c).

## ◆ operator CImg< T > *()

template<typename T>

operator CImg< T > * | ( |  | ) |

Return pointer to the first image of the list.

Note
  Images in a list are stored as a buffer of `CImg<T>`.

## ◆ operator=() [1/4]

template<typename T>
template<typename t>

CImgList< T > & operator= | ( | const CImg< t > & | img | ) |

Construct list from one image [in-place version].

Parameters

  img | Input image to copy in the constructed list.

Note
  list = img; is equivalent to list.assign(img);.

## ◆ operator=() [2/4]

template<typename T>
template<typename t>

CImgList< T > & operator= | ( | const CImgList< t > & | list | ) |

Construct list from another list.

Parameters

  list | Input list to copy.

Note
  list1 = list2 is equivalent to list1.assign(list2);.

## ◆ operator=() [3/4]

template<typename T>

CImgList< T > & operator= | ( | const char *const | filename | ) |

Construct list by reading the content of a file [in-place version].

See also
  CImgList(const char *const).

## ◆ operator=() [4/4]

template<typename T>

CImgList< T > & operator= | ( | const CImgDisplay & | disp | ) |

Construct list from the content of a display window [in-place version].

See also
  CImgList(const CImgDisplay&).

## ◆ operator+()

template<typename T>

CImgList< T > operator+ | ( |  | ) | const

Return a non-shared copy of a list.

Note
  +list is equivalent to CImgList<T>(list,false). It forces the copy to have non-shared elements.

## ◆ operator,() [1/2]

template<typename T>
template<typename t>

CImgList< T > & operator, | ( | const CImg< t > & | img | ) |

Return a copy of the list instance, where image `img` has been inserted at the end.

Parameters

  img | Image inserted at the end of the instance copy.

Note
  Define a convenient way to create temporary lists of images, as in the following code:
  (img1,img2,img3,img4).display("My four images");
  cimg_library::CImgList::display
  const CImgList< T > & display(CImgDisplay &disp, const char axis='x', const float align=0) const
  Display the current CImgList instance in an existing CImgDisplay window (by reference).
  Definition CImg.h:66324

## ◆ operator,() [2/2]

template<typename T>
template<typename t>

CImgList< T > & operator, | ( | const CImgList< t > & | list | ) |

Return a copy of the list instance, where all elements of input list `list` have been inserted at the end.

Parameters

  list | List inserted at the end of the instance copy.

## ◆ operator>()

template<typename T>

CImg< T > operator> | ( | const char | axis | ) | const

Return image corresponding to the appending of all images of the instance list along specified axis.

Parameters

  axis | Appending axis. Can be { 'x' | 'y' | 'z' | 'c' }.

Note
  list>'x' is equivalent to list.get_append('x').

## ◆ operator<()

template<typename T>

CImgList< T > operator< | ( | const char | axis | ) | const

Return list corresponding to the splitting of all images of the instance list along specified axis.

Parameters

  axis | Axis used for image splitting.

Note
  list<'x' is equivalent to list.get_split('x').

## ◆ pixel_type()

template<typename T>

const char * pixel_type | ( |  | ) |

static

Return the type of image pixel values as a C string.

Return a `char*` string containing the usual type name of the image pixel values (i.e. a stringified version of the template parameter `T`).

Note
  - The returned string does not contain any spaces.
  - If the pixel type `T` does not correspond to a registered type, the string "unknown" is returned.

## ◆ width()

template<typename T>

int width | ( |  | ) | const

Return the size of the list, i.e. the number of images contained in it.

Note
  Similar to size() but returns result as a (signed) integer.

## ◆ size()

template<typename T>

unsigned int size | ( |  | ) | const

Return the size of the list, i.e. the number of images contained in it.

Note
  Similar to width() but returns result as an unsigned integer.

## ◆ data() [1/2]

template<typename T>

CImg< T > * data | ( |  | ) |

Return pointer to the first image of the list.

Note
  Images in a list are stored as a buffer of `CImg<T>`.

## ◆ data() [2/2]

template<typename T>

CImg< T > * data | ( | const unsigned int | pos | ) |

Return pointer to the pos-th image of the list.

Parameters

  pos | Index of the image element to access.

Note
  list.data(n); is equivalent to list.data + n;.

## ◆ at()

template<typename T>

CImg< T > & at | ( | const int | pos | ) |

Return pos-th image of the list.

Parameters

  pos | Index of the image element to access.

## ◆ atNXYZC() [1/2]

template<typename T>

T & atNXYZC | ( | const int | pos,
|  | const int | x,
|  | const int | y,
|  | const int | z,
|  | const int | c,
|  | const T & | out_value )

Access to pixel value with Dirichlet boundary conditions.

Parameters

  pos | Index of the image element to access.
  x | X-coordinate of the pixel value.
  y | Y-coordinate of the pixel value.
  z | Z-coordinate of the pixel value.
  c | C-coordinate of the pixel value.
  out_value | Default value returned if `offset` is outside image bounds.

Note
  list.atNXYZC(p,x,y,z,c); is equivalent to list[p].atXYZC(x,y,z,c);.

## ◆ atNXYZC() [2/2]

template<typename T>

T & atNXYZC | ( | const int | pos,
|  | const int | x,
|  | const int | y,
|  | const int | z,
|  | const int | c )

Access to pixel value with Neumann boundary conditions.

Parameters

  pos | Index of the image element to access.
  x | X-coordinate of the pixel value.
  y | Y-coordinate of the pixel value.
  z | Z-coordinate of the pixel value.
  c | C-coordinate of the pixel value.

Note
  list.atNXYZC(p,x,y,z,c); is equivalent to list[p].atXYZC(x,y,z,c);.

## ◆ atNXYZ() [1/2]

template<typename T>

T & atNXYZ | ( | const int | pos,
|  | const int | x,
|  | const int | y,
|  | const int | z,
|  | const int | c,
|  | const T & | out_value )

Access pixel value with Dirichlet boundary conditions for the 3 coordinates (`pos`, `x`,`y`,`z`).

Parameters

  pos | Index of the image element to access.
  x | X-coordinate of the pixel value.
  y | Y-coordinate of the pixel value.
  z | Z-coordinate of the pixel value.
  c | C-coordinate of the pixel value.
  out_value | Default value returned if `offset` is outside image bounds.

Note
  list.atNXYZ(p,x,y,z,c); is equivalent to list[p].atXYZ(x,y,z,c);.

## ◆ atNXYZ() [2/2]

template<typename T>

T & atNXYZ | ( | const int | pos,
|  | const int | x,
|  | const int | y,
|  | const int | z,
|  | const int | c = 0 )

Access to pixel value with Neumann boundary conditions for the 4 coordinates (`pos`, `x`,`y`,`z`).

Parameters

  pos | Index of the image element to access.
  x | X-coordinate of the pixel value.
  y | Y-coordinate of the pixel value.
  z | Z-coordinate of the pixel value.
  c | C-coordinate of the pixel value.

Note
  list.atNXYZ(p,x,y,z,c); is equivalent to list[p].atXYZ(x,y,z,c);.

## ◆ atNXY() [1/2]

template<typename T>

T & atNXY | ( | const int | pos,
|  | const int | x,
|  | const int | y,
|  | const int | z,
|  | const int | c,
|  | const T & | out_value )

Access to pixel value with Dirichlet boundary conditions for the 3 coordinates (`pos`, `x`,`y`).

Parameters

  pos | Index of the image element to access.
  x | X-coordinate of the pixel value.
  y | Y-coordinate of the pixel value.
  z | Z-coordinate of the pixel value.
  c | C-coordinate of the pixel value.
  out_value | Default value returned if `offset` is outside image bounds.

Note
  list.atNXYZ(p,x,y,z,c); is equivalent to list[p].atXYZ(x,y,z,c);.

## ◆ atNXY() [2/2]

template<typename T>

T & atNXY | ( | const int | pos,
|  | const int | x,
|  | const int | y,
|  | const int | z = 0,
|  | const int | c = 0 )

Access to pixel value with Neumann boundary conditions for the 3 coordinates (`pos`, `x`,`y`).

Parameters

  pos | Index of the image element to access.
  x | X-coordinate of the pixel value.
  y | Y-coordinate of the pixel value.
  z | Z-coordinate of the pixel value.
  c | C-coordinate of the pixel value.

Note
  list.atNXYZ(p,x,y,z,c); is equivalent to list[p].atXYZ(x,y,z,c);.

## ◆ atNX() [1/2]

template<typename T>

T & atNX | ( | const int | pos,
|  | const int | x,
|  | const int | y,
|  | const int | z,
|  | const int | c,
|  | const T & | out_value )

Access to pixel value with Dirichlet boundary conditions for the 2 coordinates (`pos`,`x`).

Parameters

  pos | Index of the image element to access.
  x | X-coordinate of the pixel value.
  y | Y-coordinate of the pixel value.
  z | Z-coordinate of the pixel value.
  c | C-coordinate of the pixel value.
  out_value | Default value returned if `offset` is outside image bounds.

Note
  list.atNXYZ(p,x,y,z,c); is equivalent to list[p].atXYZ(x,y,z,c);.

## ◆ atNX() [2/2]

template<typename T>

T & atNX | ( | const int | pos,
|  | const int | x,
|  | const int | y = 0,
|  | const int | z = 0,
|  | const int | c = 0 )

Access to pixel value with Neumann boundary conditions for the 2 coordinates (`pos`, `x`).

Parameters

  pos | Index of the image element to access.
  x | X-coordinate of the pixel value.
  y | Y-coordinate of the pixel value.
  z | Z-coordinate of the pixel value.
  c | C-coordinate of the pixel value.

Note
  list.atNXYZ(p,x,y,z,c); is equivalent to list[p].atXYZ(x,y,z,c);.

## ◆ atN() [1/2]

template<typename T>

T & atN | ( | const int | pos,
|  | const int | x,
|  | const int | y,
|  | const int | z,
|  | const int | c,
|  | const T & | out_value )

Access to pixel value with Dirichlet boundary conditions for the coordinate (`pos`).

Parameters

  pos | Index of the image element to access.
  x | X-coordinate of the pixel value.
  y | Y-coordinate of the pixel value.
  z | Z-coordinate of the pixel value.
  c | C-coordinate of the pixel value.
  out_value | Default value returned if `offset` is outside image bounds.

Note
  list.atNXYZ(p,x,y,z,c); is equivalent to list[p].atXYZ(x,y,z,c);.

## ◆ atN() [2/2]

template<typename T>

T & atN | ( | const int | pos,
|  | const int | x = 0,
|  | const int | y = 0,
|  | const int | z = 0,
|  | const int | c = 0 )

Return pixel value with Neumann boundary conditions for the coordinate (`pos`).

Parameters

  pos | Index of the image element to access.
  x | X-coordinate of the pixel value.
  y | Y-coordinate of the pixel value.
  z | Z-coordinate of the pixel value.
  c | C-coordinate of the pixel value.

Note
  list.atNXYZ(p,x,y,z,c); is equivalent to list[p].atXYZ(x,y,z,c);.

## ◆ is_sameN() [1/2]

template<typename T>

bool is_sameN | ( | const unsigned int | size_n | ) | const

Test if number of image elements is equal to specified value.

Parameters

  size_n | Number of image elements to test.

## ◆ is_sameN() [2/2]

template<typename T>
template<typename t>

bool is_sameN | ( | const CImgList< t > & | list | ) | const

Test if number of image elements is equal between two images lists.

Parameters

  list | Input list to compare with.

## ◆ is_sameXYZC()

template<typename T>

bool is_sameXYZC | ( | const unsigned int | dx,
|  | const unsigned int | dy,
|  | const unsigned int | dz,
|  | const unsigned int | dc ) const

Test if dimensions of each image of the list match specified arguments.

Parameters

  dx | Checked image width.
  dy | Checked image height.
  dz | Checked image depth.
  dc | Checked image spectrum.

## ◆ is_sameNXYZC()

template<typename T>

bool is_sameNXYZC | ( | const unsigned int | n,
|  | const unsigned int | dx,
|  | const unsigned int | dy,
|  | const unsigned int | dz,
|  | const unsigned int | dc ) const

Test if list dimensions match specified arguments.

Parameters

  n | Number of images in the list.
  dx | Checked image width.
  dy | Checked image height.
  dz | Checked image depth.
  dc | Checked image spectrum.

## ◆ containsNXYZC()

template<typename T>

bool containsNXYZC | ( | const int | n,
|  | const int | x = 0,
|  | const int | y = 0,
|  | const int | z = 0,
|  | const int | c = 0 ) const

Test if list contains one particular pixel location.

Parameters

  n | Index of the image whom checked pixel value belong to.
  x | X-coordinate of the checked pixel value.
  y | Y-coordinate of the checked pixel value.
  z | Z-coordinate of the checked pixel value.
  c | C-coordinate of the checked pixel value.

## ◆ containsN()

template<typename T>

bool containsN | ( | const int | n | ) | const

Test if list contains image with specified index.

Parameters

  n | Index of the checked image.

## ◆ contains() [1/8]

template<typename T>
template<typename t>

bool contains | ( | const T & | pixel,
|  | t & | n,
|  | t & | x,
|  | t & | y,
|  | t & | z,
|  | t & | c ) const

Test if one image of the list contains the specified referenced value.

Parameters

  | pixel | Reference to pixel value to test.
  [out] | n | Index of image containing the pixel value, if test succeeds.
  [out] | x | X-coordinate of the pixel value, if test succeeds.
  [out] | y | Y-coordinate of the pixel value, if test succeeds.
  [out] | z | Z-coordinate of the pixel value, if test succeeds.
  [out] | c | C-coordinate of the pixel value, if test succeeds.

Note
  If true, set coordinates (n,x,y,z,c).

## ◆ contains() [2/8]

template<typename T>
template<typename t>

bool contains | ( | const T & | pixel,
|  | t & | n,
|  | t & | x,
|  | t & | y,
|  | t & | z ) const

Test if one of the image list contains the specified referenced value.

Parameters

  | pixel | Reference to pixel value to test.
  [out] | n | Index of image containing the pixel value, if test succeeds.
  [out] | x | X-coordinate of the pixel value, if test succeeds.
  [out] | y | Y-coordinate of the pixel value, if test succeeds.
  [out] | z | Z-coordinate of the pixel value, if test succeeds.

Note
  If true, set coordinates (n,x,y,z).

## ◆ contains() [3/8]

template<typename T>
template<typename t>

bool contains | ( | const T & | pixel,
|  | t & | n,
|  | t & | x,
|  | t & | y ) const

Test if one of the image list contains the specified referenced value.

Parameters

  | pixel | Reference to pixel value to test.
  [out] | n | Index of image containing the pixel value, if test succeeds.
  [out] | x | X-coordinate of the pixel value, if test succeeds.
  [out] | y | Y-coordinate of the pixel value, if test succeeds.

Note
  If true, set coordinates (n,x,y).

## ◆ contains() [4/8]

template<typename T>
template<typename t>

bool contains | ( | const T & | pixel,
|  | t & | n,
|  | t & | x ) const

Test if one of the image list contains the specified referenced value.

Parameters

  | pixel | Reference to pixel value to test.
  [out] | n | Index of image containing the pixel value, if test succeeds.
  [out] | x | X-coordinate of the pixel value, if test succeeds.

Note
  If true, set coordinates (n,x).

## ◆ contains() [5/8]

template<typename T>
template<typename t>

bool contains | ( | const T & | pixel,
|  | t & | n ) const

Test if one of the image list contains the specified referenced value.

Parameters

  | pixel | Reference to pixel value to test.
  [out] | n | Index of image containing the pixel value, if test succeeds.

Note
  If true, set coordinates (n).

## ◆ contains() [6/8]

template<typename T>

bool contains | ( | const T & | pixel | ) | const

Test if one of the image list contains the specified referenced value.

Parameters

  pixel | Reference to pixel value to test.

## ◆ contains() [7/8]

template<typename T>
template<typename t>

bool contains | ( | const CImg< T > & | img,
|  | t & | n ) const

Test if the list contains the image 'img'.

Parameters

  | img | Reference to image to test.
  [out] | n | Index of image in the list, if test succeeds.

Note
  If true, returns the position (n) of the image in the list.

## ◆ contains() [8/8]

template<typename T>

bool contains | ( | const CImg< T > & | img | ) | const

Test if the list contains the image img.

Parameters

  img | Reference to image to test.

## ◆ min_max() [1/2]

template<typename T>
template<typename t>

T & min_max | ( | t & | max_val | ) |

Return a reference to the minimum pixel value of the instance list and return the maximum vvalue as well.

Parameters

  [out] | max_val | Value of the maximum value found.

## ◆ min_max() [2/2]

template<typename T>
template<typename t>

const T & min_max | ( | t & | max_val | ) | const

Return a reference to the minimum pixel value of the instance list and return the maximum vvalue as well [const version].

Parameters

  [out] | max_val | Value of the maximum value found.

## ◆ max_min()

template<typename T>
template<typename t>

T & max_min | ( | t & | min_val | ) |

Return a reference to the minimum pixel value of the instance list and return the minimum value as well.

Parameters

  [out] | min_val | Value of the minimum value found.

## ◆ insert() [1/5]

template<typename T>
template<typename t>

CImgList< T > & insert | ( | const CImg< t > & | img,
|  | const unsigned int | pos = ~0U,
|  | const bool | is_shared = false )

Insert a copy of the image `img` into the current image list, at position `pos`.

Parameters

  img | Image to insert a copy to the list.
  pos | Index of the insertion.
  is_shared | Tells if the inserted image is a shared copy of `img` or not.

## ◆ insert() [2/5]

template<typename T>

CImgList< T > & insert | ( | const unsigned int | n,
|  | const unsigned int | pos = ~0U )

Insert n empty images img into the current image list, at position `pos`.

Parameters

  n | Number of empty images to insert.
  pos | Index of the insertion.

## ◆ insert() [3/5]

template<typename T>
template<typename t>

CImgList< T > & insert | ( | const unsigned int | n,
|  | const CImg< t > & | img,
|  | const unsigned int | pos = ~0U,
|  | const bool | is_shared = false )

Insert `n` copies of the image `img` into the current image list, at position `pos`.

Parameters

  n | Number of image copies to insert.
  img | Image to insert by copy.
  pos | Index of the insertion.
  is_shared | Tells if inserted images are shared copies of `img` or not.

## ◆ insert() [4/5]

template<typename T>
template<typename t>

CImgList< T > & insert | ( | const CImgList< t > & | list,
|  | const unsigned int | pos = ~0U,
|  | const bool | is_shared = false )

Insert a copy of the image list `list` into the current image list, starting from position `pos`.

Parameters

  list | Image list to insert.
  pos | Index of the insertion.
  is_shared | Tells if inserted images are shared copies of images of `list` or not.

## ◆ insert() [5/5]

template<typename T>
template<typename t>

CImgList< T > & insert | ( | const unsigned int | n,
|  | const CImgList< t > & | list,
|  | const unsigned int | pos = ~0U,
|  | const bool | is_shared = false )

Insert n copies of the list `list` at position `pos` of the current list.

Parameters

  n | Number of list copies to insert.
  list | Image list to insert.
  pos | Index of the insertion.
  is_shared | Tells if inserted images are shared copies of images of `list` or not.

## ◆ remove() [1/2]

template<typename T>

CImgList< T > & remove | ( | const unsigned int | pos1,
|  | const unsigned int | pos2 )

Remove all images between from indexes.

Parameters

  pos1 | Starting index of the removal.
  pos2 | Ending index of the removal.

## ◆ remove() [2/2]

template<typename T>

CImgList< T > & remove | ( | const unsigned int | pos | ) |

Remove image at index `pos` from the image list.

Parameters

  pos | Index of the image to remove.

## ◆ images()

template<typename T>

CImgList< T > & images | ( | const unsigned int | pos0,
|  | const unsigned int | pos1 )

Return a sublist.

Parameters

  pos0 | Starting index of the sublist.
  pos1 | Ending index of the sublist.

## ◆ get_shared_images()

template<typename T>

CImgList< T > get_shared_images | ( | const unsigned int | pos0,
|  | const unsigned int | pos1 )

Return a shared sublist.

Parameters

  pos0 | Starting index of the sublist.
  pos1 | Ending index of the sublist.

## ◆ get_append()

template<typename T>

CImg< T > get_append | ( | const char | axis,
|  | const float | align = 0 ) const

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

Parameters

  axis | Appending axis. Can be { 'x' | 'y' | 'z' | 'c' }.
  align | Appending alignment.

## ◆ split()

template<typename T>

CImgList< T > & split | ( | const char | axis,
|  | const int | nb = -1 )

Return a list where each image has been split along the specified axis.

Parameters

  axis | Axis to split images along.
  nb | Number of split parts for each image.

## ◆ push_back() [1/2]

template<typename T>
template<typename t>

CImgList< T > & push_back | ( | const CImg< t > & | img | ) |

Insert image at the end of the list.

Parameters

  img | Image to insert.

## ◆ push_front() [1/2]

template<typename T>
template<typename t>

CImgList< T > & push_front | ( | const CImg< t > & | img | ) |

Insert image at the front of the list.

Parameters

  img | Image to insert.

## ◆ push_back() [2/2]

template<typename T>
template<typename t>

CImgList< T > & push_back | ( | const CImgList< t > & | list | ) |

Insert list at the end of the current list.

Parameters

  list | List to insert.

## ◆ push_front() [2/2]

template<typename T>
template<typename t>

CImgList< T > & push_front | ( | const CImgList< t > & | list | ) |

Insert list at the front of the current list.

Parameters

  list | List to insert.

## ◆ erase()

template<typename T>

CImgList< T > & erase | ( | const iterator | iter | ) |

Remove image pointed by iterator.

Parameters

  iter | Iterator pointing to the image to remove.

## ◆ get_select() [1/2]

template<typename T>

CImg< intT > get_select | ( | CImgDisplay & | disp,
|  | const bool | feature_type = true,
|  | const char | axis = 'x',
|  | const float | align = 0,
|  | const bool | exit_on_anykey = false ) const

Display a simple interactive interface to select images or sublists.

Parameters

  disp | Window instance to display selection and user interface.
  feature_type | Can be `false` to select a single image, or `true` to select a sublist.
  axis | Axis along whom images are appended for visualization.
  align | Alignment setting when images have not all the same size.
  exit_on_anykey | Exit function when any key is pressed.

Returns
  A one-column vector containing the selected image indexes.

## ◆ get_select() [2/2]

template<typename T>

CImg< intT > get_select | ( | const char *const | title,
|  | const bool | feature_type = true,
|  | const char | axis = 'x',
|  | const float | align = 0,
|  | const bool | exit_on_anykey = false ) const

Display a simple interactive interface to select images or sublists.

Parameters

  title | Title of a new window used to display selection and user interface.
  feature_type | Can be `false` to select a single image, or `true` to select a sublist.
  axis | Axis along whom images are appended for visualization.
  align | Alignment setting when images have not all the same size.
  exit_on_anykey | Exit function when any key is pressed.

Returns
  A one-column vector containing the selected image indexes.

## ◆ load()

template<typename T>

CImgList< T > & load | ( | const char *const | filename | ) |

Load a list from a file.

Parameters

  filename | Filename to read data from.

## ◆ load_cimg() [1/3]

template<typename T>

CImgList< T > & load_cimg | ( | const char *const | filename | ) |

Load a list from a .cimg file.

Parameters

  filename | Filename to read data from.

## ◆ load_cimg() [2/3]

template<typename T>

CImgList< T > & load_cimg | ( | std::FILE *const | file | ) |

Load a list from a .cimg file.

Parameters

  file | File to read data from.

## ◆ load_cimg() [3/3]

template<typename T>

CImgList< T > & load_cimg | ( | const char *const | filename,
|  | const unsigned int | n0,
|  | const unsigned int | n1,
|  | const unsigned int | x0,
|  | const unsigned int | y0,
|  | const unsigned int | z0,
|  | const unsigned int | c0,
|  | const unsigned int | x1,
|  | const unsigned int | y1,
|  | const unsigned int | z1,
|  | const unsigned int | c1 )

Load a sublist list from a (non compressed) .cimg file.

Parameters

  filename | Filename to read data from.
  n0 | Starting index of images to read (~0U for max).
  n1 | Ending index of images to read (~0U for max).
  x0 | Starting X-coordinates of image regions to read.
  y0 | Starting Y-coordinates of image regions to read.
  z0 | Starting Z-coordinates of image regions to read.
  c0 | Starting C-coordinates of image regions to read.
  x1 | Ending X-coordinates of image regions to read (~0U for max).
  y1 | Ending Y-coordinates of image regions to read (~0U for max).
  z1 | Ending Z-coordinates of image regions to read (~0U for max).
  c1 | Ending C-coordinates of image regions to read (~0U for max).

## ◆ load_parrec()

template<typename T>

CImgList< T > & load_parrec | ( | const char *const | filename | ) |

Load a list from a PAR/REC (Philips) file.

Parameters

  filename | Filename to read data from.

## ◆ load_yuv()

template<typename T>

CImgList< T > & load_yuv | ( | const char *const | filename,
|  | const unsigned int | size_x,
|  | const unsigned int | size_y,
|  | const unsigned int | chroma_subsampling = 444,
|  | const unsigned int | first_frame = 0,
|  | const unsigned int | last_frame = ~0U,
|  | const unsigned int | step_frame = 1,
|  | const bool | yuv2rgb = true )

Load a list from a YUV image sequence file.

Parameters

  filename | Filename to read data from.
  size_x | Width of the images.
  size_y | Height of the images.
  chroma_subsampling | Type of chroma subsampling. Can be { 420 | 422 | 444 }.
  first_frame | Index of first image frame to read.
  last_frame | Index of last image frame to read.
  step_frame | Step applied between each frame.
  yuv2rgb | Apply YUV to RGB transformation during reading.

## ◆ load_video()

template<typename T>

CImgList< T > & load_video | ( | const char *const | filename,
|  | const unsigned int | first_frame = 0,
|  | const unsigned int | last_frame = ~0U,
|  | const unsigned int | step_frame = 1 )

Load an image from a video file, using OpenCV library.

Parameters

  filename | Filename, as a C-string.
  first_frame | Index of the first frame to read.
  last_frame | Index of the last frame to read (can be higher than the actual number of frames, e.g. '~0U').
  step_frame | Step value for frame reading.

Note
  If step_frame==0, the current video stream is forced to be released (without any frames read).

## ◆ load_ffmpeg_external()

template<typename T>

CImgList< T > & load_ffmpeg_external | ( | const char *const | filename | ) |

Load an image from a video file using the external tool 'ffmpeg'.

Parameters

  filename | Filename to read data from.

## ◆ load_gif_external()

template<typename T>

CImgList< T > & load_gif_external | ( | const char *const | filename | ) |

Load gif file, using ImageMagick or GraphicsMagick's external tools.

Parameters

  filename | Filename to read data from.

## ◆ load_gzip_external()

template<typename T>

CImgList< T > & load_gzip_external | ( | const char *const | filename | ) |

Load a gzipped list, using external tool 'gunzip'.

Parameters

  filename | Filename to read data from.

## ◆ load_tiff()

template<typename T>

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,
|  | unsigned int *const | bits_per_value = 0,
|  | float *const | voxel_size = 0,
|  | CImg< charT > *const | description = 0 )

Load images from a TIFF file.

Parameters

  | filename | Filename to read data from.
  | first_frame | Index of first image frame to read.
  | last_frame | Index of last image frame to read.
  | step_frame | Step applied between each frame.
  [out] | bits_per_value | Number of bits used to store a scalar value in the image file.
  [out] | voxel_size | Voxel size, as stored in the filename.
  [out] | description | Description, as stored in the filename.

## ◆ print()

template<typename T>

const CImgList< T > & print | ( | const char *const | title = 0,
|  | const bool | display_stats = true ) const

Print information about the list on the standard output.

Parameters

  title | Label set to the information displayed.
  display_stats | Tells if image statistics must be computed and displayed.

## ◆ display() [1/3]

template<typename T>

const CImgList< T > & display | ( | CImgDisplay & | disp,
|  | const char | axis = 'x',
|  | const float | align = 0 ) const

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

Parameters

  disp | Reference to an existing CImgDisplay instance, where the current image list will be displayed.
  axis | Appending axis. Can be { 'x' | 'y' | 'z' | 'c' }.
  align | Appending alignment.

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

## ◆ display() [2/3]

template<typename T>

const CImgList< T > & display | ( | CImgDisplay & | disp,
|  | const bool | display_info,
|  | const char | axis = 'x',
|  | const float | align = 0,
|  | unsigned int *const | XYZ = 0,
|  | const bool | exit_on_anykey = false ) const

Display the current CImgList instance in a new display window.

Parameters

  | disp | Display window.
  | display_info | Tells if image information are displayed on the standard output.
  | axis | Alignment axis for images viewing.
  | align | Appending alignment.
  [in,out] | XYZ | Contains the XYZ coordinates at start / exit of the function.
  | exit_on_anykey | Exit function when any key is pressed.

Note
  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 appended in a single temporary image for visualization purposes. The function returns when a key is pressed or the display window is closed by the user.

## ◆ display() [3/3]

template<typename T>

const CImgList< T > & display | ( | const char *const | title = 0,
|  | const bool | display_info = true,
|  | const char | axis = 'x',
|  | const float | align = 0,
|  | unsigned int *const | XYZ = 0,
|  | const bool | exit_on_anykey = false ) const

Display the current CImgList instance in a new display window.

Parameters

  | title | Title of the opening display window.
  | display_info | Tells if list information must be written on standard output.
  | axis | Appending axis. Can be { 'x' | 'y' | 'z' | 'c' }.
  | align | Appending alignment.
  [in,out] | XYZ | Contains the XYZ coordinates at start / exit of the function.
  | exit_on_anykey | Exit function when any key is pressed.

## ◆ save()

template<typename T>

const CImgList< T > & save | ( | const char *const | filename,
|  | const int | number = -1,
|  | const unsigned int | digits = 6 ) const

Save list into a file.

Parameters

  filename | Filename to write data to.
  number | When positive, represents an index added to the filename. Otherwise, no number is added.
  digits | Number of digits used for adding the number to the filename.

## ◆ is_saveable()

template<typename T>

bool is_saveable | ( | const char *const | filename | ) |

static

Tell if an image list can be saved as one single file.

Parameters

  filename | Filename, as a C-string.

Returns
  `true` if the file format supports multiple images, `false` otherwise.

## ◆ save_gif_external()

template<typename T>

const CImgList< T > & save_gif_external | ( | const char *const | filename,
|  | const float | fps = 25,
|  | const unsigned int | nb_loops = 0 )

Save image sequence as a GIF animated file.

Parameters

  filename | Filename to write data to.
  fps | Number of desired frames per second.
  nb_loops | Number of loops (`0` for infinite looping).

## ◆ save_yuv() [1/2]

template<typename T>

const CImgList< T > & save_yuv | ( | const char *const | filename = 0,
|  | const unsigned int | chroma_subsampling = 444,
|  | const bool | is_rgb = true ) const

Save list as a YUV image sequence file.

Parameters

  filename | Filename to write data to.
  chroma_subsampling | Type of chroma subsampling. Can be { 420 | 422 | 444 }.
  is_rgb | Tells if the RGB to YUV conversion must be done for saving.

## ◆ save_yuv() [2/2]

template<typename T>

const CImgList< T > & save_yuv | ( | std::FILE *const | file,
|  | const unsigned int | chroma_subsampling = 444,
|  | const bool | is_rgb = true ) const

Save image sequence into a YUV file.

Parameters

  file | File to write data to.
  chroma_subsampling | Type of chroma subsampling. Can be { 420 | 422 | 444 }.
  is_rgb | Tells if the RGB to YUV conversion must be done for saving.

## ◆ save_cimg() [1/4]

template<typename T>

const CImgList< T > & save_cimg | ( | const char *const | filename,
|  | const bool | is_compressed = false ) const

Save list into a .cimg file.

Parameters

  filename | Filename to write data to.
  is_compressed | Tells if data compression must be enabled.

## ◆ save_cimg() [2/4]

template<typename T>

const CImgList< T > & save_cimg | ( | std::FILE * | file,
|  | const bool | is_compressed = false ) const

Save list into a .cimg file.

Parameters

  file | File to write data to.
  is_compressed | Tells if data compression must be enabled.

## ◆ save_cimg() [3/4]

template<typename T>

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 | c0 ) const

Insert the image instance into into an existing .cimg file, at specified coordinates.

Parameters

  filename | Filename to write data to.
  n0 | Starting index of images to write.
  x0 | Starting X-coordinates of image regions to write.
  y0 | Starting Y-coordinates of image regions to write.
  z0 | Starting Z-coordinates of image regions to write.
  c0 | Starting C-coordinates of image regions to write.

## ◆ save_cimg() [4/4]

template<typename T>

const CImgList< T > & save_cimg | ( | std::FILE *const | file,
|  | const unsigned int | n0,
|  | const unsigned int | x0,
|  | const unsigned int | y0,
|  | const unsigned int | z0,
|  | const unsigned int | c0 ) const

Insert the image instance into into an existing .cimg file, at specified coordinates.

Parameters

  file | File to write data to.
  n0 | Starting index of images to write.
  x0 | Starting X-coordinates of image regions to write.
  y0 | Starting Y-coordinates of image regions to write.
  z0 | Starting Z-coordinates of image regions to write.
  c0 | Starting C-coordinates of image regions to write.

## ◆ save_empty_cimg() [1/2]

template<typename T>

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 | dc = 1 )

static

Save empty (non-compressed) .cimg file with specified dimensions.

Parameters

  filename | Filename to write data to.
  nb | Number of images to write.
  dx | Width of images in the written file.
  dy | Height of images in the written file.
  dz | Depth of images in the written file.
  dc | Spectrum of images in the written file.

## ◆ save_empty_cimg() [2/2]

template<typename T>

void save_empty_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 | dc = 1 )

static

Save empty .cimg file with specified dimensions.

Parameters

  file | File to write data to.
  nb | Number of images to write.
  dx | Width of images in the written file.
  dy | Height of images in the written file.
  dz | Depth of images in the written file.
  dc | Spectrum of images in the written file.

## ◆ save_tiff()

template<typename T>

const CImgList< T > & save_tiff | ( | const char *const | filename,
|  | const unsigned int | compression_type = 0,
|  | const float *const | voxel_size = 0,
|  | const char *const | description = 0,
|  | const bool | use_bigtiff = true ) const

Save list as a TIFF file.

Parameters

  filename | Filename to write data to.
  compression_type | Compression mode used to write data.
  voxel_size | Voxel size, to be stored in the filename.
  description | Description, to be stored in the filename.
  use_bigtiff | Allow to save big tiff files (>4Gb).

## ◆ save_gzip_external()

template<typename T>

const CImgList< T > & save_gzip_external | ( | const char *const | filename | ) | const

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

Parameters

  filename | Filename to write data to.

## ◆ save_video()

template<typename T>

const CImgList< T > & save_video | ( | const char *const | filename,
|  | const unsigned int | fps = 25,
|  | const char * | codec = 0,
|  | const bool | keep_open = false ) const

Save image sequence (using the OpenCV library when available).

Parameters

  filename | Filename to write data to.
  fps | Number of frames per second.
  codec | Type of compression (See http://www.fourcc.org/codecs.php to see available codecs).
  keep_open | Tells if the video writer associated to the specified filename must be kept open or not (to allow frames to be added in the same file afterwards).

## ◆ save_ffmpeg_external()

template<typename T>

const CImgList< T > & save_ffmpeg_external | ( | const char *const | filename,
|  | const unsigned int | fps = 25,
|  | const char *const | codec = 0,
|  | const unsigned int | bitrate = 2048 ) const

Save image sequence, using the external tool 'ffmpeg'.

Parameters

  filename | Filename to write data to.
  fps | Number of frames per second.
  codec | Type of compression.
  bitrate | Output bitrate

## ◆ get_serialize()

template<typename T>

CImg< ucharT > get_serialize | ( | const bool | is_compressed = false,
|  | const unsigned int | header_size = 0 ) const

Serialize a CImgList<T> instance into a raw CImg<unsigned char> buffer.

Parameters

  is_compressed | tells if zlib compression must be used for serialization (this requires 'cimg_use_zlib' been enabled).
  header_size | Reserve empty bytes as a starting header.

## ◆ font()

template<typename T>

const CImgList< ucharT > & font | ( | const unsigned int | requested_height,
|  | const bool | is_variable_width = true )

static

Return a CImg pre-defined font with requested height.

Parameters

  font_height | Height of the desired font (exact match for 13,23,53,103).
  is_variable_width | Decide if the font has a variable (`true`) or fixed (`false`) width.

## ◆ FFT() [1/2]

template<typename T>

CImgList< T > & FFT | ( | const char | axis,
|  | const bool | invert = false )

Compute a 1D Fast Fourier Transform, along specified axis.

Parameters

  axis | Axis along which the Fourier transform is computed.
  invert | Tells if the direct (`false`) or inverse transform (`true`) is computed.

## ◆ FFT() [2/2]

template<typename T>

CImgList< T > & FFT | ( | const bool | invert = false | ) |

Compute n-D Fast Fourier Transform.

Parameters

  invert | Tells if the direct (`false`) or inverse transform (`true`) is computed.

Copyrights (C) From october 2004, David Tschumperlé - GREYC UMR CNRS 6072, Image team.
Copyrights (C) January->September 2004, David Tschumperlé.
Copyrights (C) 2000->2003, David Tschumperlé - INRIA Sophia-Antipolis. Odyssée group.