Logo

Latest stable version: 3.4.3        Current pre-release: 3.4.4 (2024/11/20)



Reference

CImgList< T > Struct Template Reference

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

Public Types

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

Constructors / Destructor / Instance Management

 ~CImgList ()
 Destructor. More...
 
 CImgList ()
 Default constructor. More...
 
 CImgList (const unsigned int n)
 Construct list containing empty images. More...
 
 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. More...
 
 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. More...
 
 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. More...
 
 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. More...
 
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. More...
 
template<typename t >
 CImgList (const CImg< t > &img, const bool is_shared=false)
 Construct list from one image. More...
 
template<typename t1 , typename t2 >
 CImgList (const CImg< t1 > &img1, const CImg< t2 > &img2, const bool is_shared=false)
 Construct list from two images. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
template<typename t >
 CImgList (const CImgList< t > &list)
 Construct list copy. More...
 
 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. More...
 
 CImgList (const char *const filename)
 Construct list by reading the content of a file. More...
 
 CImgList (const CImgDisplay &disp)
 Construct list from the content of a display window. More...
 
CImgList< T > get_shared ()
 Return a list with elements being shared copies of images in the list instance. More...
 
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]. More...
 
CImgList< T > & clear ()
 Destructor [in-place version]. More...
 
CImgList< T > & assign (const unsigned int n)
 Construct list containing empty images [in-place version]. More...
 
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]. More...
 
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]. More...
 
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]. More...
 
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]. More...
 
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]. More...
 
template<typename t >
CImgList< T > & assign (const CImg< t > &img, const bool is_shared=false)
 Construct list from one image [in-place version]. More...
 
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]. More...
 
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]. More...
 
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]. More...
 
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]. More...
 
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]. More...
 
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]. More...
 
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]. More...
 
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]. More...
 
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]. More...
 
CImgList< T > & assign (const CImgDisplay &disp)
 Construct list from the content of a display window [in-place version]. More...
 
template<typename t >
CImgList< t > & move_to (CImgList< t > &list)
 Transfer the content of the list instance to another list. More...
 
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. More...
 
CImgList< T > & swap (CImgList< T > &list)
 Swap all fields between two list instances. More...
 
static CImgList< T > & empty ()
 Return a reference to an empty list. More...
 
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. More...
 
const CImg< T > & operator() (const unsigned int pos) const
 Return a reference to one image of the list. More...
 
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. More...
 
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. More...
 
 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]. More...
 
template<typename t >
CImgList< T > & operator= (const CImgList< t > &list)
 Construct list from another list. More...
 
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]. More...
 
CImgList< T > & operator= (const CImgDisplay &disp)
 Construct list from the content of a display window [in-place version]. More...
 
CImgList< T > operator+ () const
 Return a non-shared copy of a list. More...
 
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. More...
 
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. More...
 
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. More...
 
CImgList< T > operator< (const char axis) const
 Return list corresponding to the splitting of all images of the instance list along specified axis. More...
 

Instance Characteristics

int width () const
 Return the size of the list, i.e. the number of images contained in it. More...
 
unsigned int size () const
 Return the size of the list, i.e. the number of images contained in it. More...
 
CImg< T > * data ()
 Return pointer to the first image of the list. More...
 
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. More...
 
const CImg< T > * data (const unsigned int l) const
 
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. More...
 
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. More...
 
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. More...
 
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). More...
 
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). More...
 
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). More...
 
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). More...
 
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). More...
 
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). More...
 
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). More...
 
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). More...
 
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. More...
 

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. More...
 
template<typename t >
bool is_sameN (const CImgList< t > &list) const
 Test if number of image elements is equal between two images lists. More...
 
template<typename t >
bool is_sameXY (const CImg< t > &img) const
 
template<typename t >
bool is_sameXY (const CImgList< t > &list) const
 
template<typename t >
bool is_sameNXY (const unsigned int n, const CImg< t > &img) const
 
template<typename t >
bool is_sameNXY (const CImgList< t > &list) const
 
template<typename t >
bool is_sameXZ (const CImg< t > &img) const
 
template<typename t >
bool is_sameXZ (const CImgList< t > &list) const
 
template<typename t >
bool is_sameNXZ (const unsigned int n, const CImg< t > &img) const
 
template<typename t >
bool is_sameNXZ (const CImgList< t > &list) const
 
template<typename t >
bool is_sameXC (const CImg< t > &img) const
 
template<typename t >
bool is_sameXC (const CImgList< t > &list) const
 
template<typename t >
bool is_sameNXC (const unsigned int n, const CImg< t > &img) const
 
template<typename t >
bool is_sameNXC (const CImgList< t > &list) const
 
template<typename t >
bool is_sameYZ (const CImg< t > &img) const
 
template<typename t >
bool is_sameYZ (const CImgList< t > &list) const
 
template<typename t >
bool is_sameNYZ (const unsigned int n, const CImg< t > &img) const
 
template<typename t >
bool is_sameNYZ (const CImgList< t > &list) const
 
template<typename t >
bool is_sameYC (const CImg< t > &img) const
 
template<typename t >
bool is_sameYC (const CImgList< t > &list) const
 
template<typename t >
bool is_sameNYC (const unsigned int n, const CImg< t > &img) const
 
template<typename t >
bool is_sameNYC (const CImgList< t > &list) const
 
template<typename t >
bool is_sameXYZ (const CImg< t > &img) const
 
template<typename t >
bool is_sameXYZ (const CImgList< t > &list) const
 
template<typename t >
bool is_sameNXYZ (const unsigned int n, const CImg< t > &img) const
 
template<typename t >
bool is_sameNXYZ (const CImgList< t > &list) const
 
template<typename t >
bool is_sameXYC (const CImg< t > &img) const
 
template<typename t >
bool is_sameXYC (const CImgList< t > &list) const
 
template<typename t >
bool is_sameNXYC (const unsigned int n, const CImg< t > &img) const
 
template<typename t >
bool is_sameNXYC (const CImgList< t > &list) const
 
template<typename t >
bool is_sameYZC (const CImg< t > &img) const
 
template<typename t >
bool is_sameYZC (const CImgList< t > &list) const
 
template<typename t >
bool is_sameNYZC (const unsigned int n, const CImg< t > &img) const
 
template<typename t >
bool is_sameNYZC (const CImgList< t > &list) const
 
template<typename t >
bool is_sameXYZC (const CImg< t > &img) const
 
template<typename t >
bool is_sameXYZC (const CImgList< t > &list) const
 
template<typename t >
bool is_sameNXYZC (const unsigned int n, const CImg< t > &img) const
 
template<typename t >
bool is_sameNXYZC (const CImgList< t > &list) const
 
bool is_sameX (const unsigned int val) const
 
bool is_sameNX (const unsigned int n, const unsigned int val) const
 
bool is_sameY (const unsigned int val) const
 
bool is_sameNY (const unsigned int n, const unsigned int val) const
 
bool is_sameZ (const unsigned int val) const
 
bool is_sameNZ (const unsigned int n, const unsigned int val) const
 
bool is_sameC (const unsigned int val) const
 
bool is_sameNC (const unsigned int n, const unsigned int val) const
 
bool is_sameXY (const unsigned int val1, const unsigned int val2) const
 
bool is_sameNXY (const unsigned int n, const unsigned int val1, const unsigned int val2) const
 
bool is_sameXZ (const unsigned int val1, const unsigned int val2) const
 
bool is_sameNXZ (const unsigned int n, const unsigned int val1, const unsigned int val2) const
 
bool is_sameXC (const unsigned int val1, const unsigned int val2) const
 
bool is_sameNXC (const unsigned int n, const unsigned int val1, const unsigned int val2) const
 
bool is_sameYZ (const unsigned int val1, const unsigned int val2) const
 
bool is_sameNYZ (const unsigned int n, const unsigned int val1, const unsigned int val2) const
 
bool is_sameYC (const unsigned int val1, const unsigned int val2) const
 
bool is_sameNYC (const unsigned int n, const unsigned int val1, const unsigned int val2) const
 
bool is_sameZC (const unsigned int val1, const unsigned int val2) const
 
bool is_sameNZC (const unsigned int n, const unsigned int val1, const unsigned int val2) const
 
bool is_sameXYZ (const unsigned int val1, const unsigned int val2, const unsigned int val3) const
 
bool is_sameNXYZ (const unsigned int n, const unsigned int val1, const unsigned int val2, const unsigned int val3) const
 
bool is_sameXYC (const unsigned int val1, const unsigned int val2, const unsigned int val3) const
 
bool is_sameNXYC (const unsigned int n, const unsigned int val1, const unsigned int val2, const unsigned int val3) const
 
bool is_sameXZC (const unsigned int val1, const unsigned int val2, const unsigned int val3) const
 
bool is_sameNXZC (const unsigned int n, const unsigned int val1, const unsigned int val2, const unsigned int val3) const
 
bool is_sameYZC (const unsigned int val1, const unsigned int val2, const unsigned int val3) const
 
bool is_sameNYZC (const unsigned int n, const unsigned int val1, const unsigned int val2, const unsigned int val3) const
 
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. More...
 
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. More...
 
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. More...
 
bool containsN (const int n) const
 Test if list contains image with specified index. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
template<typename t >
bool contains (const T &pixel, t &n) const
 Test if one of the image list contains the specified referenced value. More...
 
bool contains (const T &pixel) const
 Test if one of the image list contains the specified referenced value. More...
 
template<typename t >
bool contains (const CImg< T > &img, t &n) const
 Test if the list contains the image 'img'. More...
 
bool contains (const CImg< T > &img) const
 Test if the list contains the image img. More...
 

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. More...
 
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]. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
CImgList< T > & split (const char axis, const int nb=-1)
 Return a list where each image has been split along the specified axis. More...
 
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. More...
 
template<typename t >
CImgList< T > & push_front (const CImg< t > &img)
 Insert image at the front of the list. More...
 
template<typename t >
CImgList< T > & push_back (const CImgList< t > &list)
 Insert list at the end of the current list. More...
 
template<typename t >
CImgList< T > & push_front (const CImgList< t > &list)
 Insert list at the front of the current list. More...
 
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. More...
 

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. More...
 
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. More...
 
CImgList< T > & load (const char *const filename)
 Load a list from a file. More...
 
CImgList< T > & load_cimg (const char *const filename)
 Load a list from a .cimg file. More...
 
CImgList< T > & load_cimg (std::FILE *const file)
 Load a list from a .cimg file. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
CImgList< T > & load_ffmpeg_external (const char *const filename)
 Load an image from a video file using the external tool 'ffmpeg'. More...
 
CImgList< T > & load_gif_external (const char *const filename)
 Load gif file, using ImageMagick or GraphicsMagick's external tools. More...
 
CImgList< T > & load_gzip_external (const char *const filename)
 Load a gzipped list, using external tool 'gunzip'. More...
 
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. More...
 
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. More...
 
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). More...
 
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. More...
 
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. More...
 
const CImgList< T > & save (const char *const filename, const int number=-1, const unsigned int digits=6) const
 Save list into a file. More...
 
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. More...
 
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. More...
 
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. More...
 
const CImgList< T > & save_cimg (const char *const filename, const bool is_compressed=false) const
 Save list into a .cimg file. More...
 
const CImgList< T > & save_cimg (std::FILE *file, const bool is_compressed=false) const
 Save list into a .cimg file. More...
 
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. More...
 
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. More...
 
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. More...
 
const CImgList< T > & save_gzip_external (const char *const filename) const
 Save list as a gzipped file, using external tool 'gzip'. More...
 
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). More...
 
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'. More...
 
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. More...
 
static bool is_saveable (const char *const filename)
 Tell if an image list can be saved as one single file. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 

Detailed Description

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

Represent a list of images CImg<T>.

Member Typedef Documentation

◆ iterator

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< T > * iterator
    Simple iterator type, to loop through each image of a list.
    Definition: CImg.h:62361
  • Using the loop macro cimglist_for is another (more concise) alternative:
    cimglist_for(list,l) list[l].mirror('x');

◆ const_iterator

typedef const CImg<T>* const_iterator

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

Note

◆ value_type

typedef T value_type

Pixel value type.

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

Note

Constructor & Destructor Documentation

◆ ~CImgList()

~CImgList ( )

Destructor.

Destroy current list instance.

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

◆ CImgList() [1/19]

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]

CImgList ( const unsigned int  n)
explicit

Construct list containing empty images.

Parameters
nNumber 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]

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
nNumber of images.
widthWidth of images.
heightHeight of images.
depthDepth of images.
spectrumNumber of channels of images.
Note
Pixel values are not initialized and may probably contain garbage.

◆ CImgList() [4/19]

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
nNumber of images.
widthWidth of images.
heightHeight of images.
depthDepth of images.
spectrumNumber of channels of images.
valInitialization value for images pixels.

◆ CImgList() [5/19]

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
nNumber of images.
widthWidth of images.
heightHeight of images.
depthDepth of images.
spectrumNumber of channels of images.
val0First value of the initializing integers sequence.
val1Second 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]

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
nNumber of images.
widthWidth of images.
heightHeight of images.
depthDepth of images.
spectrumNumber of channels of images.
val0First value of the initializing doubles sequence.
val1Second 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]

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

Construct list containing copies of an input image.

Parameters
nNumber of images.
imgInput image to copy in the constructed list.
is_sharedTells if the elements of the list are shared or non-shared copies of img.

◆ CImgList() [8/19]

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

Construct list from one image.

Parameters
imgInput image to copy in the constructed list.
is_sharedTells if the element of the list is a shared or non-shared copy of img.

◆ CImgList() [9/19]

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

Construct list from two images.

Parameters
img1First input image to copy in the constructed list.
img2Second input image to copy in the constructed list.
is_sharedTells if the elements of the list are shared or non-shared copies of input images.

◆ CImgList() [10/19]

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

Construct list from three images.

Parameters
img1First input image to copy in the constructed list.
img2Second input image to copy in the constructed list.
img3Third input image to copy in the constructed list.
is_sharedTells if the elements of the list are shared or non-shared copies of input images.

◆ CImgList() [11/19]

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
img1First input image to copy in the constructed list.
img2Second input image to copy in the constructed list.
img3Third input image to copy in the constructed list.
img4Fourth input image to copy in the constructed list.
is_sharedTells if the elements of the list are shared or non-shared copies of input images.

◆ CImgList() [12/19]

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
img1First input image to copy in the constructed list.
img2Second input image to copy in the constructed list.
img3Third input image to copy in the constructed list.
img4Fourth input image to copy in the constructed list.
img5Fifth input image to copy in the constructed list.
is_sharedTells if the elements of the list are shared or non-shared copies of input images.

◆ CImgList() [13/19]

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
img1First input image to copy in the constructed list.
img2Second input image to copy in the constructed list.
img3Third input image to copy in the constructed list.
img4Fourth input image to copy in the constructed list.
img5Fifth input image to copy in the constructed list.
img6Sixth input image to copy in the constructed list.
is_sharedTells if the elements of the list are shared or non-shared copies of input images.

◆ CImgList() [14/19]

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
img1First input image to copy in the constructed list.
img2Second input image to copy in the constructed list.
img3Third input image to copy in the constructed list.
img4Fourth input image to copy in the constructed list.
img5Fifth input image to copy in the constructed list.
img6Sixth input image to copy in the constructed list.
img7Seventh input image to copy in the constructed list.
is_sharedTells if the elements of the list are shared or non-shared copies of input images.

◆ CImgList() [15/19]

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
img1First input image to copy in the constructed list.
img2Second input image to copy in the constructed list.
img3Third input image to copy in the constructed list.
img4Fourth input image to copy in the constructed list.
img5Fifth input image to copy in the constructed list.
img6Sixth input image to copy in the constructed list.
img7Seventh input image to copy in the constructed list.
img8Eighth input image to copy in the constructed list.
is_sharedTells if the elements of the list are shared or non-shared copies of input images.

◆ CImgList() [16/19]

CImgList ( const CImgList< t > &  list)

Construct list copy.

Parameters
listInput list to copy.
Note
The shared state of each element of the constructed list is kept the same as in list.

◆ CImgList() [17/19]

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

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

Parameters
listInput list to copy.
is_sharedTells if the elements of the list are shared or non-shared copies of input images.

◆ CImgList() [18/19]

CImgList ( const char *const  filename)
explicit

Construct list by reading the content of a file.

Parameters
filenameFilename, as a C-string.

◆ CImgList() [19/19]

CImgList ( const CImgDisplay disp)
explicit

Construct list from the content of a display window.

Parameters
dispDisplay window to get content from.
Note
Constructed list contains a single image only.

Member Function Documentation

◆ get_shared()

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]

CImgList<T>& assign ( )

Destructor [in-place version].

See also
CImgList().

◆ clear()

CImgList<T>& clear ( )

Destructor [in-place version].

Equivalent to assign().

Note
Only here for compatibility with STL naming conventions.

◆ assign() [2/18]

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

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

See also
CImgList(unsigned int).

◆ assign() [3/18]

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]

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]

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]

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]

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]

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]

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]

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]

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]

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]

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]

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]

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]

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]

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]

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]

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

Transfer the content of the list instance to another list.

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

◆ move_to() [2/2]

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
listDestination list.
posIndex 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()

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

Swap all fields between two list instances.

Parameters
listList to swap fields with.
Note
Can be used to exchange the content of two lists in a fast way.

◆ empty()

static 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());
static CImgList< T > & empty()
Return a reference to an empty list.
Definition: CImg.h:63057

◆ operator()() [1/3]

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

Return a reference to one image element of the list.

Parameters
posIndex of the image element.

◆ operator()() [2/3]

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

Return a reference to one image of the list.

Parameters
posIndex of the image element.

◆ operator()() [3/3]

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
posIndex of the image element.
xX-coordinate of the pixel value.
yY-coordinate of the pixel value.
zZ-coordinate of the pixel value.
cC-coordinate of the pixel value.
Note
list(n,x,y,z,c) is equivalent to list[n](x,y,z,c).

◆ operator CImg< 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]

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

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

Parameters
imgInput image to copy in the constructed list.
Note
list = img; is equivalent to list.assign(img);.

◆ operator=() [2/4]

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

Construct list from another list.

Parameters
listInput list to copy.
Note
list1 = list2 is equivalent to list1.assign(list2);.

◆ operator=() [3/4]

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]

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

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

See also
CImgList(const CImgDisplay&).

◆ operator+()

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]

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

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

Parameters
imgImage 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");
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:66129

◆ operator,() [2/2]

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
listList inserted at the end of the instance copy.

◆ operator>()

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

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

Parameters
axisAppending axis. Can be { 'x' | 'y' | 'z' | 'c' }.
Note
list>'x' is equivalent to list.get_append('x').

◆ operator<()

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

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

Parameters
axisAxis used for image splitting.
Note
list<'x' is equivalent to list.get_split('x').

◆ pixel_type()

static 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()

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()

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]

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]

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

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

Parameters
posIndex of the image element to access.
Note
list.data(n); is equivalent to list.data + n;.

◆ at()

CImg<T>& at ( const int  pos)

Return pos-th image of the list.

Parameters
posIndex of the image element to access.

◆ atNXYZC() [1/2]

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
posIndex of the image element to access.
xX-coordinate of the pixel value.
yY-coordinate of the pixel value.
zZ-coordinate of the pixel value.
cC-coordinate of the pixel value.
out_valueDefault 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]

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
posIndex of the image element to access.
xX-coordinate of the pixel value.
yY-coordinate of the pixel value.
zZ-coordinate of the pixel value.
cC-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]

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
posIndex of the image element to access.
xX-coordinate of the pixel value.
yY-coordinate of the pixel value.
zZ-coordinate of the pixel value.
cC-coordinate of the pixel value.
out_valueDefault 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]

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
posIndex of the image element to access.
xX-coordinate of the pixel value.
yY-coordinate of the pixel value.
zZ-coordinate of the pixel value.
cC-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]

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
posIndex of the image element to access.
xX-coordinate of the pixel value.
yY-coordinate of the pixel value.
zZ-coordinate of the pixel value.
cC-coordinate of the pixel value.
out_valueDefault 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]

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
posIndex of the image element to access.
xX-coordinate of the pixel value.
yY-coordinate of the pixel value.
zZ-coordinate of the pixel value.
cC-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]

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
posIndex of the image element to access.
xX-coordinate of the pixel value.
yY-coordinate of the pixel value.
zZ-coordinate of the pixel value.
cC-coordinate of the pixel value.
out_valueDefault 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]

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
posIndex of the image element to access.
xX-coordinate of the pixel value.
yY-coordinate of the pixel value.
zZ-coordinate of the pixel value.
cC-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]

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
posIndex of the image element to access.
xX-coordinate of the pixel value.
yY-coordinate of the pixel value.
zZ-coordinate of the pixel value.
cC-coordinate of the pixel value.
out_valueDefault 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]

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
posIndex of the image element to access.
xX-coordinate of the pixel value.
yY-coordinate of the pixel value.
zZ-coordinate of the pixel value.
cC-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]

bool is_sameN ( const unsigned int  size_n) const

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

Parameters
size_nNumber of image elements to test.

◆ is_sameN() [2/2]

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

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

Parameters
listInput list to compare with.

◆ is_sameXYZC()

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
dxChecked image width.
dyChecked image height.
dzChecked image depth.
dcChecked image spectrum.

◆ is_sameNXYZC()

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
nNumber of images in the list.
dxChecked image width.
dyChecked image height.
dzChecked image depth.
dcChecked image spectrum.

◆ containsNXYZC()

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
nIndex of the image whom checked pixel value belong to.
xX-coordinate of the checked pixel value.
yY-coordinate of the checked pixel value.
zZ-coordinate of the checked pixel value.
cC-coordinate of the checked pixel value.

◆ containsN()

bool containsN ( const int  n) const

Test if list contains image with specified index.

Parameters
nIndex of the checked image.

◆ contains() [1/8]

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
pixelReference to pixel value to test.
[out]nIndex of image containing the pixel value, if test succeeds.
[out]xX-coordinate of the pixel value, if test succeeds.
[out]yY-coordinate of the pixel value, if test succeeds.
[out]zZ-coordinate of the pixel value, if test succeeds.
[out]cC-coordinate of the pixel value, if test succeeds.
Note
If true, set coordinates (n,x,y,z,c).

◆ contains() [2/8]

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
pixelReference to pixel value to test.
[out]nIndex of image containing the pixel value, if test succeeds.
[out]xX-coordinate of the pixel value, if test succeeds.
[out]yY-coordinate of the pixel value, if test succeeds.
[out]zZ-coordinate of the pixel value, if test succeeds.
Note
If true, set coordinates (n,x,y,z).

◆ contains() [3/8]

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
pixelReference to pixel value to test.
[out]nIndex of image containing the pixel value, if test succeeds.
[out]xX-coordinate of the pixel value, if test succeeds.
[out]yY-coordinate of the pixel value, if test succeeds.
Note
If true, set coordinates (n,x,y).

◆ contains() [4/8]

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

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

Parameters
pixelReference to pixel value to test.
[out]nIndex of image containing the pixel value, if test succeeds.
[out]xX-coordinate of the pixel value, if test succeeds.
Note
If true, set coordinates (n,x).

◆ contains() [5/8]

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

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

Parameters
pixelReference to pixel value to test.
[out]nIndex of image containing the pixel value, if test succeeds.
Note
If true, set coordinates (n).

◆ contains() [6/8]

bool contains ( const T &  pixel) const

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

Parameters
pixelReference to pixel value to test.

◆ contains() [7/8]

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

Test if the list contains the image 'img'.

Parameters
imgReference to image to test.
[out]nIndex of image in the list, if test succeeds.
Note
If true, returns the position (n) of the image in the list.

◆ contains() [8/8]

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

Test if the list contains the image img.

Parameters
imgReference to image to test.

◆ min_max() [1/2]

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_valValue of the maximum value found.

◆ min_max() [2/2]

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_valValue of the maximum value found.

◆ max_min()

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_valValue of the minimum value found.

◆ insert() [1/5]

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
imgImage to insert a copy to the list.
posIndex of the insertion.
is_sharedTells if the inserted image is a shared copy of img or not.

◆ insert() [2/5]

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
nNumber of empty images to insert.
posIndex of the insertion.

◆ insert() [3/5]

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
nNumber of image copies to insert.
imgImage to insert by copy.
posIndex of the insertion.
is_sharedTells if inserted images are shared copies of img or not.

◆ insert() [4/5]

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
listImage list to insert.
posIndex of the insertion.
is_sharedTells if inserted images are shared copies of images of list or not.

◆ insert() [5/5]

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
nNumber of list copies to insert.
listImage list to insert.
posIndex of the insertion.
is_sharedTells if inserted images are shared copies of images of list or not.

◆ remove() [1/2]

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

Remove all images between from indexes.

Parameters
pos1Starting index of the removal.
pos2Ending index of the removal.

◆ remove() [2/2]

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

Remove image at index pos from the image list.

Parameters
posIndex of the image to remove.

◆ images()

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

Return a sublist.

Parameters
pos0Starting index of the sublist.
pos1Ending index of the sublist.

◆ get_shared_images()

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

Return a shared sublist.

Parameters
pos0Starting index of the sublist.
pos1Ending index of the sublist.

◆ get_append()

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
axisAppending axis. Can be { 'x' | 'y' | 'z' | 'c' }.
alignAppending alignment.

◆ split()

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

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

Parameters
axisAxis to split images along.
nbNumber of split parts for each image.

◆ push_back() [1/2]

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

Insert image at the end of the list.

Parameters
imgImage to insert.

◆ push_front() [1/2]

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

Insert image at the front of the list.

Parameters
imgImage to insert.

◆ push_back() [2/2]

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

Insert list at the end of the current list.

Parameters
listList to insert.

◆ push_front() [2/2]

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

Insert list at the front of the current list.

Parameters
listList to insert.

◆ erase()

CImgList<T>& erase ( const iterator  iter)

Remove image pointed by iterator.

Parameters
iterIterator pointing to the image to remove.

◆ get_select() [1/2]

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
dispWindow instance to display selection and user interface.
feature_typeCan be false to select a single image, or true to select a sublist.
axisAxis along whom images are appended for visualization.
alignAlignment setting when images have not all the same size.
exit_on_anykeyExit function when any key is pressed.
Returns
A one-column vector containing the selected image indexes.

◆ get_select() [2/2]

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
titleTitle of a new window used to display selection and user interface.
feature_typeCan be false to select a single image, or true to select a sublist.
axisAxis along whom images are appended for visualization.
alignAlignment setting when images have not all the same size.
exit_on_anykeyExit function when any key is pressed.
Returns
A one-column vector containing the selected image indexes.

◆ load()

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

Load a list from a file.

Parameters
filenameFilename to read data from.

◆ load_cimg() [1/3]

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

Load a list from a .cimg file.

Parameters
filenameFilename to read data from.

◆ load_cimg() [2/3]

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

Load a list from a .cimg file.

Parameters
fileFile to read data from.

◆ load_cimg() [3/3]

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
filenameFilename to read data from.
n0Starting index of images to read (~0U for max).
n1Ending index of images to read (~0U for max).
x0Starting X-coordinates of image regions to read.
y0Starting Y-coordinates of image regions to read.
z0Starting Z-coordinates of image regions to read.
c0Starting C-coordinates of image regions to read.
x1Ending X-coordinates of image regions to read (~0U for max).
y1Ending Y-coordinates of image regions to read (~0U for max).
z1Ending Z-coordinates of image regions to read (~0U for max).
c1Ending C-coordinates of image regions to read (~0U for max).

◆ load_parrec()

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

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

Parameters
filenameFilename to read data from.

◆ load_yuv()

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
filenameFilename to read data from.
size_xWidth of the images.
size_yHeight of the images.
chroma_subsamplingType of chroma subsampling. Can be { 420 | 422 | 444 }.
first_frameIndex of first image frame to read.
last_frameIndex of last image frame to read.
step_frameStep applied between each frame.
yuv2rgbApply YUV to RGB transformation during reading.

◆ load_video()

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
filenameFilename, as a C-string.
first_frameIndex of the first frame to read.
last_frameIndex of the last frame to read (can be higher than the actual number of frames, e.g. '~0U').
step_frameStep 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()

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

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

Parameters
filenameFilename to read data from.

◆ load_gif_external()

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

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

Parameters
filenameFilename to read data from.

◆ load_gzip_external()

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

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

Parameters
filenameFilename to read data from.

◆ load_tiff()

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
filenameFilename to read data from.
first_frameIndex of first image frame to read.
last_frameIndex of last image frame to read.
step_frameStep applied between each frame.
[out]bits_per_valueNumber of bits used to store a scalar value in the image file.
[out]voxel_sizeVoxel size, as stored in the filename.
[out]descriptionDescription, as stored in the filename.

◆ print()

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
titleLabel set to the information displayed.
display_statsTells if image statistics must be computed and displayed.

◆ display() [1/3]

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
dispReference to an existing CImgDisplay instance, where the current image list will be displayed.
axisAppending axis. Can be { 'x' | 'y' | 'z' | 'c' }.
alignAppending 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]

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
dispDisplay window.
display_infoTells if image information are displayed on the standard output.
axisAlignment axis for images viewing.
alignAppending alignment.
[in,out]XYZContains the XYZ coordinates at start / exit of the function.
exit_on_anykeyExit 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]

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
titleTitle of the opening display window.
display_infoTells if list information must be written on standard output.
axisAppending axis. Can be { 'x' | 'y' | 'z' | 'c' }.
alignAppending alignment.
[in,out]XYZContains the XYZ coordinates at start / exit of the function.
exit_on_anykeyExit function when any key is pressed.

◆ save()

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

Save list into a file.

Parameters
filenameFilename to write data to.
numberWhen positive, represents an index added to the filename. Otherwise, no number is added.
digitsNumber of digits used for adding the number to the filename.

◆ is_saveable()

static bool is_saveable ( const char *const  filename)
static

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

Parameters
filenameFilename, as a C-string.
Returns
true if the file format supports multiple images, false otherwise.

◆ save_gif_external()

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
filenameFilename to write data to.
fpsNumber of desired frames per second.
nb_loopsNumber of loops (0 for infinite looping).

◆ save_yuv() [1/2]

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
filenameFilename to write data to.
chroma_subsamplingType of chroma subsampling. Can be { 420 | 422 | 444 }.
is_rgbTells if the RGB to YUV conversion must be done for saving.

◆ save_yuv() [2/2]

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
fileFile to write data to.
chroma_subsamplingType of chroma subsampling. Can be { 420 | 422 | 444 }.
is_rgbTells if the RGB to YUV conversion must be done for saving.

◆ save_cimg() [1/4]

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

Save list into a .cimg file.

Parameters
filenameFilename to write data to.
is_compressedTells if data compression must be enabled.

◆ save_cimg() [2/4]

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

Save list into a .cimg file.

Parameters
fileFile to write data to.
is_compressedTells if data compression must be enabled.

◆ save_cimg() [3/4]

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
filenameFilename to write data to.
n0Starting index of images to write.
x0Starting X-coordinates of image regions to write.
y0Starting Y-coordinates of image regions to write.
z0Starting Z-coordinates of image regions to write.
c0Starting C-coordinates of image regions to write.

◆ save_cimg() [4/4]

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
fileFile to write data to.
n0Starting index of images to write.
x0Starting X-coordinates of image regions to write.
y0Starting Y-coordinates of image regions to write.
z0Starting Z-coordinates of image regions to write.
c0Starting C-coordinates of image regions to write.

◆ save_empty_cimg() [1/2]

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 
)
static

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

Parameters
filenameFilename to write data to.
nbNumber of images to write.
dxWidth of images in the written file.
dyHeight of images in the written file.
dzDepth of images in the written file.
dcSpectrum of images in the written file.

◆ save_empty_cimg() [2/2]

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 
)
static

Save empty .cimg file with specified dimensions.

Parameters
fileFile to write data to.
nbNumber of images to write.
dxWidth of images in the written file.
dyHeight of images in the written file.
dzDepth of images in the written file.
dcSpectrum of images in the written file.

◆ save_tiff()

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
filenameFilename to write data to.
compression_typeCompression mode used to write data.
voxel_sizeVoxel size, to be stored in the filename.
descriptionDescription, to be stored in the filename.
use_bigtiffAllow to save big tiff files (>4Gb).

◆ save_gzip_external()

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

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

Parameters
filenameFilename to write data to.

◆ save_video()

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
filenameFilename to write data to.
fpsNumber of frames per second.
codecType of compression (See http://www.fourcc.org/codecs.php to see available codecs).
keep_openTells 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()

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
filenameFilename to write data to.
fpsNumber of frames per second.
codecType of compression.
bitrateOutput bitrate

◆ get_serialize()

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_compressedtells if zlib compression must be used for serialization (this requires 'cimg_use_zlib' been enabled).
header_sizeReserve empty bytes as a starting header.

◆ font()

static 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_heightHeight of the desired font (exact match for 13,23,53,103).
is_variable_widthDecide if the font has a variable (true) or fixed (false) width.

◆ FFT() [1/2]

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

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

Parameters
axisAxis along which the Fourier transform is computed.
invertTells if the direct (false) or inverse transform (true) is computed.

◆ FFT() [2/2]

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

Compute n-D Fast Fourier Transform.

Parameters
invertTells 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.