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... | |
T | atNXYZC (const int pos, const int x, const int y, const int z, const int c, const T &out_value) const |
Access to pixel value with Dirichlet boundary conditions [const version]. | |
T & | atNXYZC (const int pos, const int x, const int y, const int z, const int c) |
Access to pixel value with Neumann boundary conditions. More... | |
T | atNXYZC (const int pos, const int x, const int y, const int z, const int c) const |
Access to pixel value with Neumann boundary conditions [const version]. | |
T & | atNXYZ (const int pos, const int x, const int y, const int z, const int c, const T &out_value) |
Access pixel value with Dirichlet boundary conditions for the 3 coordinates (pos , x ,y ,z ). More... | |
T | atNXYZ (const int pos, const int x, const int y, const int z, const int c, const T &out_value) const |
Access pixel value with Dirichlet boundary conditions for the 3 coordinates (pos , x ,y ,z ) [const version]. | |
T & | atNXYZ (const int pos, const int x, const int y, const int z, const int c=0) |
Access to pixel value with Neumann boundary conditions for the 4 coordinates (pos , x ,y ,z ). More... | |
T | atNXYZ (const int pos, const int x, const int y, const int z, const int c=0) const |
Access to pixel value with Neumann boundary conditions for the 4 coordinates (pos , x ,y ,z ) [const version]. | |
T & | atNXY (const int pos, const int x, const int y, const int z, const int c, const T &out_value) |
Access to pixel value with Dirichlet boundary conditions for the 3 coordinates (pos , x ,y ). More... | |
T | atNXY (const int pos, const int x, const int y, const int z, const int c, const T &out_value) const |
Access to pixel value with Dirichlet boundary conditions for the 3 coordinates (pos , x ,y ) [const version]. | |
T & | atNXY (const int pos, const int x, const int y, const int z=0, const int c=0) |
Access to pixel value with Neumann boundary conditions for the 3 coordinates (pos , x ,y ). More... | |
T | atNXY (const int pos, const int x, const int y, const int z=0, const int c=0) const |
Access to pixel value with Neumann boundary conditions for the 3 coordinates (pos , x ,y ) [const version]. | |
T & | atNX (const int pos, const int x, const int y, const int z, const int c, const T &out_value) |
Access to pixel value with Dirichlet boundary conditions for the 2 coordinates (pos ,x ). More... | |
T | atNX (const int pos, const int x, const int y, const int z, const int c, const T &out_value) const |
Access to pixel value with Dirichlet boundary conditions for the 2 coordinates (pos ,x ) [const version]. | |
T & | atNX (const int pos, const int x, const int y=0, const int z=0, const int c=0) |
Access to pixel value with Neumann boundary conditions for the 2 coordinates (pos , x ). More... | |
T | atNX (const int pos, const int x, const int y=0, const int z=0, const int c=0) const |
Access to pixel value with Neumann boundary conditions for the 2 coordinates (pos , x ) [const version]. | |
T & | atN (const int pos, const int x, const int y, const int z, const int c, const T &out_value) |
Access to pixel value with Dirichlet boundary conditions for the coordinate (pos ). More... | |
T | atN (const int pos, const int x, const int y, const int z, const int c, const T &out_value) const |
Access to pixel value with Dirichlet boundary conditions for the coordinate (pos ) [const version]. | |
T & | atN (const int pos, const int x=0, const int y=0, const int z=0, const int c=0) |
Return pixel value with Neumann boundary conditions for the coordinate (pos ). More... | |
T | atN (const int pos, const int x=0, const int y=0, const int z=0, const int c=0) const |
Return pixel value with Neumann boundary conditions for the coordinate (pos ) [const version]. | |
static const char * | pixel_type () |
Return the type of image pixel values as a C string. 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... | |
Represent a list of images CImg<T>.
Simple iterator type, to loop through each image of a list.
CImgList<T>::iterator
type is defined as a CImg<T>*
.cimglist_for
is another (more concise) alternative: typedef const CImg<T>* const_iterator |
Simple const iterator type, to loop through each image of a const
list instance.
CImgList<T>::const_iterator
type is defined to be a const CImg<T>*
.typedef T value_type |
Pixel value type.
Refer to the pixels value type of the images in the list.
CImgList<T>::value_type
type of a CImgList<T>
is defined to be a T
. It is then similar to CImg<T>::value_type.CImgList<T>::value_type
is actually not used in CImg methods. It has been mainly defined for compatibility with STL naming conventions. ~CImgList | ( | ) |
Destructor.
Destroy current list instance.
CImgList | ( | ) |
Default constructor.
Construct a new empty list instance.
|
explicit |
Construct list containing empty images.
n | Number of empty images. |
CImgList | ( | const unsigned int | n, |
const unsigned int | width, | ||
const unsigned int | height = 1 , |
||
const unsigned int | depth = 1 , |
||
const unsigned int | spectrum = 1 |
||
) |
Construct list containing images of specified size.
n | Number of images. |
width | Width of images. |
height | Height of images. |
depth | Depth of images. |
spectrum | Number of channels of images. |
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.
n | Number of images. |
width | Width of images. |
height | Height of images. |
depth | Depth of images. |
spectrum | Number of channels of images. |
val | Initialization value for images pixels. |
CImgList | ( | 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.
n | Number of images. |
width | Width of images. |
height | Height of images. |
depth | Depth of images. |
spectrum | Number of channels of images. |
val0 | First value of the initializing integers sequence. |
val1 | Second value of the initializing integers sequence. |
width*height*depth*spectrum
values in your argument list, or you will probably segfault. 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.
n | Number of images. |
width | Width of images. |
height | Height of images. |
depth | Depth of images. |
spectrum | Number of channels of images. |
val0 | First value of the initializing doubles sequence. |
val1 | Second value of the initializing doubles sequence. |
width*height*depth*spectrum
values in your argument list, or you will probably segfault. Construct list containing copies of an input image.
n | Number of images. |
img | Input image to copy in the constructed list. |
is_shared | Tells if the elements of the list are shared or non-shared copies of img . |
Construct list from one image.
img | Input image to copy in the constructed list. |
is_shared | Tells if the element of the list is a shared or non-shared copy of img . |
Construct list from two images.
img1 | First input image to copy in the constructed list. |
img2 | Second input image to copy in the constructed list. |
is_shared | Tells if the elements of the list are shared or non-shared copies of input images. |
CImgList | ( | const CImg< t1 > & | img1, |
const CImg< t2 > & | img2, | ||
const CImg< t3 > & | img3, | ||
const bool | is_shared = false |
||
) |
Construct list from three images.
img1 | First input image to copy in the constructed list. |
img2 | Second input image to copy in the constructed list. |
img3 | Third input image to copy in the constructed list. |
is_shared | Tells if the elements of the list are shared or non-shared copies of input images. |
CImgList | ( | 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.
img1 | First input image to copy in the constructed list. |
img2 | Second input image to copy in the constructed list. |
img3 | Third input image to copy in the constructed list. |
img4 | Fourth input image to copy in the constructed list. |
is_shared | Tells if the elements of the list are shared or non-shared copies of input images. |
CImgList | ( | 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.
img1 | First input image to copy in the constructed list. |
img2 | Second input image to copy in the constructed list. |
img3 | Third input image to copy in the constructed list. |
img4 | Fourth input image to copy in the constructed list. |
img5 | Fifth input image to copy in the constructed list. |
is_shared | Tells if the elements of the list are shared or non-shared copies of input images. |
CImgList | ( | 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.
img1 | First input image to copy in the constructed list. |
img2 | Second input image to copy in the constructed list. |
img3 | Third input image to copy in the constructed list. |
img4 | Fourth input image to copy in the constructed list. |
img5 | Fifth input image to copy in the constructed list. |
img6 | Sixth input image to copy in the constructed list. |
is_shared | Tells if the elements of the list are shared or non-shared copies of input images. |
CImgList | ( | 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.
img1 | First input image to copy in the constructed list. |
img2 | Second input image to copy in the constructed list. |
img3 | Third input image to copy in the constructed list. |
img4 | Fourth input image to copy in the constructed list. |
img5 | Fifth input image to copy in the constructed list. |
img6 | Sixth input image to copy in the constructed list. |
img7 | Seventh input image to copy in the constructed list. |
is_shared | Tells if the elements of the list are shared or non-shared copies of input images. |
CImgList | ( | 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.
img1 | First input image to copy in the constructed list. |
img2 | Second input image to copy in the constructed list. |
img3 | Third input image to copy in the constructed list. |
img4 | Fourth input image to copy in the constructed list. |
img5 | Fifth input image to copy in the constructed list. |
img6 | Sixth input image to copy in the constructed list. |
img7 | Seventh input image to copy in the constructed list. |
img8 | Eighth input image to copy in the constructed list. |
is_shared | Tells if the elements of the list are shared or non-shared copies of input images. |
Construct list copy.
list | Input list to copy. |
list
. Construct list copy, and force the shared state of the list elements.
list | Input list to copy. |
is_shared | Tells if the elements of the list are shared or non-shared copies of input images. |
|
explicit |
Construct list by reading the content of a file.
filename | Filename, as a C-string. |
|
explicit |
Construct list from the content of a display window.
disp | Display window to get content from. |
CImgList<T> get_shared | ( | ) |
Return a list with elements being shared copies of images in the list instance.
list2 = list1.get_shared()
is equivalent to list2.assign(list1,true)
. CImgList<T>& assign | ( | ) |
Destructor [in-place version].
CImgList<T>& clear | ( | ) |
Destructor [in-place version].
Equivalent to assign().
CImgList<T>& assign | ( | const unsigned int | n | ) |
Construct list containing empty images [in-place version].
CImgList<T>& assign | ( | const unsigned int | n, |
const unsigned int | width, | ||
const unsigned int | height = 1 , |
||
const unsigned int | depth = 1 , |
||
const unsigned int | spectrum = 1 |
||
) |
Construct list containing images of specified size [in-place version].
CImgList<T>& assign | ( | const unsigned int | n, |
const unsigned int | width, | ||
const unsigned int | height, | ||
const unsigned int | depth, | ||
const unsigned int | spectrum, | ||
const T & | val | ||
) |
Construct list containing images of specified size, and initialize pixel values [in-place version].
CImgList<T>& assign | ( | const unsigned int | n, |
const unsigned int | width, | ||
const unsigned int | height, | ||
const unsigned int | depth, | ||
const unsigned int | spectrum, | ||
const int | val0, | ||
const int | val1, | ||
... | |||
) |
Construct list with images of specified size, and initialize pixel values from a sequence of integers [in-place version].
CImgList<T>& assign | ( | const unsigned int | n, |
const unsigned int | width, | ||
const unsigned int | height, | ||
const unsigned int | depth, | ||
const unsigned int | spectrum, | ||
const double | val0, | ||
const double | val1, | ||
... | |||
) |
Construct list with images of specified size, and initialize pixel values from a sequence of doubles [in-place version].
Construct list containing copies of an input image [in-place version].
Construct list from one image [in-place version].
CImgList<T>& assign | ( | const CImg< t1 > & | img1, |
const CImg< t2 > & | img2, | ||
const bool | is_shared = false |
||
) |
Construct list from two images [in-place version].
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].
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].
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].
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].
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].
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].
Construct list as a copy of an existing list and force the shared state of the list elements [in-place version].
CImgList<T>& assign | ( | const char *const | filename | ) |
Construct list by reading the content of a file [in-place version].
CImgList<T>& assign | ( | const CImgDisplay & | disp | ) |
Construct list from the content of a display window [in-place version].
Transfer the content of the list instance to another list.
list | Destination list. |
list
is destroyed. Transfer the content of the list instance at a specified position in another list.
list | Destination list. |
pos | Index of the insertion in the list. |
list
is preserved (only images indexes may be modified). Swap all fields between two list instances.
list | List to swap fields with. |
|
static |
Return a reference to an empty list.
CImg<T>& operator() | ( | const unsigned int | pos | ) |
Return a reference to one image element of the list.
pos | Index of the image element. |
const CImg<T>& operator() | ( | const unsigned int | pos | ) | const |
Return a reference to one image of the list.
pos | Index of the image element. |
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.
pos | Index of the image element. |
x | X-coordinate of the pixel value. |
y | Y-coordinate of the pixel value. |
z | Z-coordinate of the pixel value. |
c | C-coordinate of the pixel value. |
list(n,x,y,z,c)
is equivalent to list[n](x,y,z,c)
. operator CImg< T > * | ( | ) |
Return pointer to the first image of the list.
CImg<T>
. Construct list from one image [in-place version].
img | Input image to copy in the constructed list. |
list = img;
is equivalent to list.assign(img);
. Construct list from another list.
list | Input list to copy. |
list1 = list2
is equivalent to list1.assign(list2);
. CImgList<T>& operator= | ( | const char *const | filename | ) |
Construct list by reading the content of a file [in-place version].
CImgList<T>& operator= | ( | const CImgDisplay & | disp | ) |
Construct list from the content of a display window [in-place version].
CImgList<T> operator+ | ( | ) | const |
Return a non-shared copy of a list.
+list
is equivalent to CImgList<T>(list,false)
. It forces the copy to have non-shared elements. Return a copy of the list instance, where image img
has been inserted at the end.
img | Image inserted at the end of the instance copy. |
Return a copy of the list instance, where all elements of input list list
have been inserted at the end.
list | List inserted at the end of the instance copy. |
CImg<T> operator> | ( | const char | axis | ) | const |
Return image corresponding to the appending of all images of the instance list along specified axis.
axis | Appending axis. Can be { 'x' | 'y' | 'z' | 'c' } . |
list>'x'
is equivalent to list.get_append('x')
. CImgList<T> operator< | ( | const char | axis | ) | const |
Return list corresponding to the splitting of all images of the instance list along specified axis.
axis | Axis used for image splitting. |
list<'x'
is equivalent to list.get_split('x')
.
|
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
).
T
does not correspond to a registered type, the string "unknown"
is returned. int width | ( | ) | const |
Return the size of the list, i.e. the number of images contained in it.
unsigned int size | ( | ) | const |
Return the size of the list, i.e. the number of images contained in it.
CImg<T>* data | ( | ) |
Return pointer to the first image of the list.
CImg<T>
. CImg<T>* data | ( | const unsigned int | pos | ) |
Return pointer to the pos-th image of the list.
pos | Index of the image element to access. |
list.data(n);
is equivalent to list.data + n;
. CImg<T>& at | ( | const int | pos | ) |
Return pos-th image of the list.
pos | Index of the image element to access. |
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.
pos | Index of the image element to access. |
x | X-coordinate of the pixel value. |
y | Y-coordinate of the pixel value. |
z | Z-coordinate of the pixel value. |
c | C-coordinate of the pixel value. |
out_value | Default value returned if offset is outside image bounds. |
list.atNXYZC(p,x,y,z,c);
is equivalent to list[p].atXYZC(x,y,z,c);
. 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.
pos | Index of the image element to access. |
x | X-coordinate of the pixel value. |
y | Y-coordinate of the pixel value. |
z | Z-coordinate of the pixel value. |
c | C-coordinate of the pixel value. |
list.atNXYZC(p,x,y,z,c);
is equivalent to list[p].atXYZC(x,y,z,c);
. 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
).
pos | Index of the image element to access. |
x | X-coordinate of the pixel value. |
y | Y-coordinate of the pixel value. |
z | Z-coordinate of the pixel value. |
c | C-coordinate of the pixel value. |
out_value | Default value returned if offset is outside image bounds. |
list.atNXYZ(p,x,y,z,c);
is equivalent to list[p].atXYZ(x,y,z,c);
. 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
).
pos | Index of the image element to access. |
x | X-coordinate of the pixel value. |
y | Y-coordinate of the pixel value. |
z | Z-coordinate of the pixel value. |
c | C-coordinate of the pixel value. |
list.atNXYZ(p,x,y,z,c);
is equivalent to list[p].atXYZ(x,y,z,c);
. 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
).
pos | Index of the image element to access. |
x | X-coordinate of the pixel value. |
y | Y-coordinate of the pixel value. |
z | Z-coordinate of the pixel value. |
c | C-coordinate of the pixel value. |
out_value | Default value returned if offset is outside image bounds. |
list.atNXYZ(p,x,y,z,c);
is equivalent to list[p].atXYZ(x,y,z,c);
. 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
).
pos | Index of the image element to access. |
x | X-coordinate of the pixel value. |
y | Y-coordinate of the pixel value. |
z | Z-coordinate of the pixel value. |
c | C-coordinate of the pixel value. |
list.atNXYZ(p,x,y,z,c);
is equivalent to list[p].atXYZ(x,y,z,c);
. 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
).
pos | Index of the image element to access. |
x | X-coordinate of the pixel value. |
y | Y-coordinate of the pixel value. |
z | Z-coordinate of the pixel value. |
c | C-coordinate of the pixel value. |
out_value | Default value returned if offset is outside image bounds. |
list.atNXYZ(p,x,y,z,c);
is equivalent to list[p].atXYZ(x,y,z,c);
. 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
).
pos | Index of the image element to access. |
x | X-coordinate of the pixel value. |
y | Y-coordinate of the pixel value. |
z | Z-coordinate of the pixel value. |
c | C-coordinate of the pixel value. |
list.atNXYZ(p,x,y,z,c);
is equivalent to list[p].atXYZ(x,y,z,c);
. 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
).
pos | Index of the image element to access. |
x | X-coordinate of the pixel value. |
y | Y-coordinate of the pixel value. |
z | Z-coordinate of the pixel value. |
c | C-coordinate of the pixel value. |
out_value | Default value returned if offset is outside image bounds. |
list.atNXYZ(p,x,y,z,c);
is equivalent to list[p].atXYZ(x,y,z,c);
. 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
).
pos | Index of the image element to access. |
x | X-coordinate of the pixel value. |
y | Y-coordinate of the pixel value. |
z | Z-coordinate of the pixel value. |
c | C-coordinate of the pixel value. |
list.atNXYZ(p,x,y,z,c);
is equivalent to list[p].atXYZ(x,y,z,c);
. bool is_sameN | ( | const unsigned int | size_n | ) | const |
Test if number of image elements is equal to specified value.
size_n | Number of image elements to test. |
bool is_sameN | ( | const CImgList< t > & | list | ) | const |
Test if number of image elements is equal between two images lists.
list | Input list to compare with. |
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.
dx | Checked image width. |
dy | Checked image height. |
dz | Checked image depth. |
dc | Checked image spectrum. |
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.
n | Number of images in the list. |
dx | Checked image width. |
dy | Checked image height. |
dz | Checked image depth. |
dc | Checked image spectrum. |
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.
n | Index of the image whom checked pixel value belong to. |
x | X-coordinate of the checked pixel value. |
y | Y-coordinate of the checked pixel value. |
z | Z-coordinate of the checked pixel value. |
c | C-coordinate of the checked pixel value. |
bool containsN | ( | const int | n | ) | const |
Test if list contains image with specified index.
n | Index of the checked image. |
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.
pixel | Reference to pixel value to test. | |
[out] | n | Index of image containing the pixel value, if test succeeds. |
[out] | x | X-coordinate of the pixel value, if test succeeds. |
[out] | y | Y-coordinate of the pixel value, if test succeeds. |
[out] | z | Z-coordinate of the pixel value, if test succeeds. |
[out] | c | C-coordinate of the pixel value, if test succeeds. |
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.
pixel | Reference to pixel value to test. | |
[out] | n | Index of image containing the pixel value, if test succeeds. |
[out] | x | X-coordinate of the pixel value, if test succeeds. |
[out] | y | Y-coordinate of the pixel value, if test succeeds. |
[out] | z | Z-coordinate of the pixel value, if test succeeds. |
bool contains | ( | const T & | pixel, |
t & | n, | ||
t & | x, | ||
t & | y | ||
) | const |
Test if one of the image list contains the specified referenced value.
pixel | Reference to pixel value to test. | |
[out] | n | Index of image containing the pixel value, if test succeeds. |
[out] | x | X-coordinate of the pixel value, if test succeeds. |
[out] | y | Y-coordinate of the pixel value, if test succeeds. |
bool contains | ( | const T & | pixel, |
t & | n, | ||
t & | x | ||
) | const |
Test if one of the image list contains the specified referenced value.
pixel | Reference to pixel value to test. | |
[out] | n | Index of image containing the pixel value, if test succeeds. |
[out] | x | X-coordinate of the pixel value, if test succeeds. |
bool contains | ( | const T & | pixel, |
t & | n | ||
) | const |
Test if one of the image list contains the specified referenced value.
pixel | Reference to pixel value to test. | |
[out] | n | Index of image containing the pixel value, if test succeeds. |
bool contains | ( | const T & | pixel | ) | const |
Test if one of the image list contains the specified referenced value.
pixel | Reference to pixel value to test. |
bool contains | ( | const CImg< T > & | img, |
t & | n | ||
) | const |
Test if the list contains the image 'img'.
img | Reference to image to test. | |
[out] | n | Index of image in the list, if test succeeds. |
bool contains | ( | const CImg< T > & | img | ) | const |
Test if the list contains the image img.
img | Reference to image to test. |
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.
[out] | max_val | Value of the maximum value found. |
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].
[out] | max_val | Value of the maximum value found. |
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.
[out] | min_val | Value of the minimum value found. |
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
.
img | Image to insert a copy to the list. |
pos | Index of the insertion. |
is_shared | Tells if the inserted image is a shared copy of img or not. |
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
.
n | Number of empty images to insert. |
pos | Index of the insertion. |
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
.
n | Number of image copies to insert. |
img | Image to insert by copy. |
pos | Index of the insertion. |
is_shared | Tells if inserted images are shared copies of img or not. |
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
.
list | Image list to insert. |
pos | Index of the insertion. |
is_shared | Tells if inserted images are shared copies of images of list or not. |
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.
n | Number of list copies to insert. |
list | Image list to insert. |
pos | Index of the insertion. |
is_shared | Tells if inserted images are shared copies of images of list or not. |
CImgList<T>& remove | ( | const unsigned int | pos1, |
const unsigned int | pos2 | ||
) |
Remove all images between from indexes.
pos1 | Starting index of the removal. |
pos2 | Ending index of the removal. |
CImgList<T>& remove | ( | const unsigned int | pos | ) |
Remove image at index pos
from the image list.
pos | Index of the image to remove. |
CImgList<T>& images | ( | const unsigned int | pos0, |
const unsigned int | pos1 | ||
) |
Return a sublist.
pos0 | Starting index of the sublist. |
pos1 | Ending index of the sublist. |
CImgList<T> get_shared_images | ( | const unsigned int | pos0, |
const unsigned int | pos1 | ||
) |
Return a shared sublist.
pos0 | Starting index of the sublist. |
pos1 | Ending index of the sublist. |
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.
axis | Appending axis. Can be { 'x' | 'y' | 'z' | 'c' } . |
align | Appending alignment. |
CImgList<T>& split | ( | const char | axis, |
const int | nb = -1 |
||
) |
Return a list where each image has been split along the specified axis.
axis | Axis to split images along. |
nb | Number of split parts for each image. |
Insert image at the end of the list.
img | Image to insert. |
Insert image at the front of the list.
img | Image to insert. |
Insert list at the end of the current list.
list | List to insert. |
Insert list at the front of the current list.
list | List to insert. |
Remove image pointed by iterator.
iter | Iterator pointing to the image to remove. |
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.
disp | Window instance to display selection and user interface. |
feature_type | Can be false to select a single image, or true to select a sublist. |
axis | Axis along whom images are appended for visualization. |
align | Alignment setting when images have not all the same size. |
exit_on_anykey | Exit function when any key is pressed. |
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.
title | Title of a new window used to display selection and user interface. |
feature_type | Can be false to select a single image, or true to select a sublist. |
axis | Axis along whom images are appended for visualization. |
align | Alignment setting when images have not all the same size. |
exit_on_anykey | Exit function when any key is pressed. |
CImgList<T>& load | ( | const char *const | filename | ) |
Load a list from a file.
filename | Filename to read data from. |
CImgList<T>& load_cimg | ( | const char *const | filename | ) |
Load a list from a .cimg file.
filename | Filename to read data from. |
CImgList<T>& load_cimg | ( | std::FILE *const | file | ) |
Load a list from a .cimg file.
file | File to read data from. |
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.
filename | Filename to read data from. |
n0 | Starting index of images to read (~0U for max). |
n1 | Ending index of images to read (~0U for max). |
x0 | Starting X-coordinates of image regions to read. |
y0 | Starting Y-coordinates of image regions to read. |
z0 | Starting Z-coordinates of image regions to read. |
c0 | Starting C-coordinates of image regions to read. |
x1 | Ending X-coordinates of image regions to read (~0U for max). |
y1 | Ending Y-coordinates of image regions to read (~0U for max). |
z1 | Ending Z-coordinates of image regions to read (~0U for max). |
c1 | Ending C-coordinates of image regions to read (~0U for max). |
CImgList<T>& load_parrec | ( | const char *const | filename | ) |
Load a list from a PAR/REC (Philips) file.
filename | Filename to read data from. |
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.
filename | Filename to read data from. |
size_x | Width of the images. |
size_y | Height of the images. |
chroma_subsampling | Type of chroma subsampling. Can be { 420 | 422 | 444 } . |
first_frame | Index of first image frame to read. |
last_frame | Index of last image frame to read. |
step_frame | Step applied between each frame. |
yuv2rgb | Apply YUV to RGB transformation during reading. |
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.
filename | Filename, as a C-string. |
first_frame | Index of the first frame to read. |
last_frame | Index of the last frame to read (can be higher than the actual number of frames, e.g. '~0U'). |
step_frame | Step value for frame reading. |
CImgList<T>& load_ffmpeg_external | ( | const char *const | filename | ) |
Load an image from a video file using the external tool 'ffmpeg'.
filename | Filename to read data from. |
CImgList<T>& load_gif_external | ( | const char *const | filename | ) |
Load gif file, using ImageMagick or GraphicsMagick's external tools.
filename | Filename to read data from. |
CImgList<T>& load_gzip_external | ( | const char *const | filename | ) |
Load a gzipped list, using external tool 'gunzip'.
filename | Filename to read data from. |
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.
filename | Filename to read data from. | |
first_frame | Index of first image frame to read. | |
last_frame | Index of last image frame to read. | |
step_frame | Step applied between each frame. | |
[out] | bits_per_value | Number of bits used to store a scalar value in the image file. |
[out] | voxel_size | Voxel size, as stored in the filename. |
[out] | description | Description, as stored in the filename. |
const CImgList<T>& print | ( | const char *const | title = 0 , |
const bool | display_stats = true |
||
) | const |
Print information about the list on the standard output.
title | Label set to the information displayed. |
display_stats | Tells if image statistics must be computed and displayed. |
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).
disp | Reference to an existing CImgDisplay instance, where the current image list will be displayed. |
axis | Appending axis. Can be { 'x' | 'y' | 'z' | 'c' } . |
align | Appending alignment. |
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.
disp | Display window. | |
display_info | Tells if image information are displayed on the standard output. | |
axis | Alignment axis for images viewing. | |
align | Appending alignment. | |
[in,out] | XYZ | Contains the XYZ coordinates at start / exit of the function. |
exit_on_anykey | Exit function when any key is pressed. |
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.
title | Title of the opening display window. | |
display_info | Tells if list information must be written on standard output. | |
axis | Appending axis. Can be { 'x' | 'y' | 'z' | 'c' } . | |
align | Appending alignment. | |
[in,out] | XYZ | Contains the XYZ coordinates at start / exit of the function. |
exit_on_anykey | Exit function when any key is pressed. |
const CImgList<T>& save | ( | const char *const | filename, |
const int | number = -1 , |
||
const unsigned int | digits = 6 |
||
) | const |
Save list into a file.
filename | Filename to write data to. |
number | When positive, represents an index added to the filename. Otherwise, no number is added. |
digits | Number of digits used for adding the number to the filename. |
|
static |
Tell if an image list can be saved as one single file.
filename | Filename, as a C-string. |
true
if the file format supports multiple images, false
otherwise. 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.
filename | Filename to write data to. |
fps | Number of desired frames per second. |
nb_loops | Number of loops (0 for infinite looping). |
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.
filename | Filename to write data to. |
chroma_subsampling | Type of chroma subsampling. Can be { 420 | 422 | 444 } . |
is_rgb | Tells if the RGB to YUV conversion must be done for saving. |
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.
file | File to write data to. |
chroma_subsampling | Type of chroma subsampling. Can be { 420 | 422 | 444 } . |
is_rgb | Tells if the RGB to YUV conversion must be done for saving. |
const CImgList<T>& save_cimg | ( | const char *const | filename, |
const bool | is_compressed = false |
||
) | const |
Save list into a .cimg file.
filename | Filename to write data to. |
is_compressed | Tells if data compression must be enabled. |
const CImgList<T>& save_cimg | ( | std::FILE * | file, |
const bool | is_compressed = false |
||
) | const |
Save list into a .cimg file.
file | File to write data to. |
is_compressed | Tells if data compression must be enabled. |
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.
filename | Filename to write data to. |
n0 | Starting index of images to write. |
x0 | Starting X-coordinates of image regions to write. |
y0 | Starting Y-coordinates of image regions to write. |
z0 | Starting Z-coordinates of image regions to write. |
c0 | Starting C-coordinates of image regions to write. |
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.
file | File to write data to. |
n0 | Starting index of images to write. |
x0 | Starting X-coordinates of image regions to write. |
y0 | Starting Y-coordinates of image regions to write. |
z0 | Starting Z-coordinates of image regions to write. |
c0 | Starting C-coordinates of image regions to write. |
|
static |
Save empty (non-compressed) .cimg file with specified dimensions.
filename | Filename to write data to. |
nb | Number of images to write. |
dx | Width of images in the written file. |
dy | Height of images in the written file. |
dz | Depth of images in the written file. |
dc | Spectrum of images in the written file. |
|
static |
Save empty .cimg file with specified dimensions.
file | File to write data to. |
nb | Number of images to write. |
dx | Width of images in the written file. |
dy | Height of images in the written file. |
dz | Depth of images in the written file. |
dc | Spectrum of images in the written file. |
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.
filename | Filename to write data to. |
compression_type | Compression mode used to write data. |
voxel_size | Voxel size, to be stored in the filename. |
description | Description, to be stored in the filename. |
use_bigtiff | Allow to save big tiff files (>4Gb). |
const CImgList<T>& save_gzip_external | ( | const char *const | filename | ) | const |
Save list as a gzipped file, using external tool 'gzip'.
filename | Filename to write data to. |
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).
filename | Filename to write data to. |
fps | Number of frames per second. |
codec | Type of compression (See http://www.fourcc.org/codecs.php to see available codecs). |
keep_open | Tells if the video writer associated to the specified filename must be kept open or not (to allow frames to be added in the same file afterwards). |
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'.
filename | Filename to write data to. |
fps | Number of frames per second. |
codec | Type of compression. |
bitrate | Output bitrate |
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.
is_compressed | tells if zlib compression must be used for serialization (this requires 'cimg_use_zlib' been enabled). |
header_size | Reserve empty bytes as a starting header. |
|
static |
Return a CImg pre-defined font with requested height.
font_height | Height of the desired font (exact match for 13,23,53,103). |
is_variable_width | Decide if the font has a variable (true ) or fixed (false ) width. |
CImgList<T>& FFT | ( | const char | axis, |
const bool | invert = false |
||
) |
Compute a 1D Fast Fourier Transform, along specified axis.
axis | Axis along which the Fourier transform is computed. |
invert | Tells if the direct (false ) or inverse transform (true ) is computed. |
CImgList<T>& FFT | ( | const bool | invert = false | ) |
Compute n-D Fast Fourier Transform.
invert | Tells if the direct (false ) or inverse transform (true ) is computed. |
Copyrights (C) From october 2004, David Tschumperlé - GREYC UMR CNRS 6072, Image team.
Copyrights (C) January->September 2004, David Tschumperlé.
Copyrights (C) 2000->2003, David Tschumperlé - INRIA Sophia-Antipolis. Odyssée group.