cimg_library::CImg< T > Struct Template Reference

Class representing an image (up to 4 dimensions wide), each pixel being of type T. More...

#include <Robots/SeaBeeIII/Sonar/CImg.h>

Collaboration diagram for cimg_library::CImg< T >:
Collaboration graph
[legend]

List of all members.

Classes

struct  _cimg_math_parser
struct  _functor2d_expr
struct  _functor2d_float
struct  _functor2d_int
struct  _functor3d_expr
struct  _functor3d_float
struct  _functor3d_int
struct  _functor4d_int
struct  _functor4d_streamline2d_directed
struct  _functor4d_streamline2d_oriented
struct  _functor4d_streamline3d_directed
struct  _functor4d_streamline3d_oriented
struct  _functor4d_streamline_expr

Public Types

typedef T * iterator
 Iterator type for CImg<T>.
typedef const T * const_iterator
 Const iterator type for CImg<T>.
typedef T value_type
 Value type.
typedef cimg::superset< T,
bool >::type 
Tbool
typedef cimg::superset< T,
unsigned char >::type 
Tuchar
typedef cimg::superset< T,
char >::type 
Tchar
typedef cimg::superset< T,
unsigned short >::type 
Tushort
typedef cimg::superset< T,
short >::type 
Tshort
typedef cimg::superset< T,
unsigned int >::type 
Tuint
typedef cimg::superset< T, int >
::type 
Tint
typedef cimg::superset< T,
unsigned long >::type 
Tulong
typedef cimg::superset< T,
long >::type 
Tlong
typedef cimg::superset< T,
float >::type 
Tfloat
typedef cimg::superset< T,
double >::type 
Tdouble
typedef cimg::last< T, bool >::type boolT
typedef cimg::last< T,
unsigned char >::type 
ucharT
typedef cimg::last< T, char >::type charT
typedef cimg::last< T,
unsigned short >::type 
ushortT
typedef cimg::last< T, short >
::type 
shortT
typedef cimg::last< T,
unsigned int >::type 
uintT
typedef cimg::last< T, int >::type intT
typedef cimg::last< T,
unsigned long >::type 
ulongT
typedef cimg::last< T, long >::type longT
typedef cimg::last< T, float >
::type 
floatT
typedef cimg::last< T, double >
::type 
doubleT

Public Member Functions

Overloaded Operators

T & operator() (const unsigned int x, const unsigned int y=0, const unsigned int z=0, const unsigned int c=0)
 Fast access to pixel value for reading or writing.
const T & operator() (const unsigned int x, const unsigned int y=0, const unsigned int z=0, const unsigned int c=0) const
 operator const T * () const
 Return address of the pixel buffer.
 operator T * ()
CImg< T > & operator= (const T val)
 Operator=().
CImg< T > & operator= (const char *const expression)
 Operator=().
template<typename t >
CImg< T > & operator= (const CImg< t > &img)
 Operator=().
CImg< T > & operator= (const CImg< T > &img)
CImg< T > & operator= (const CImgDisplay &disp)
 Operator=().
template<typename t >
CImg< T > & operator+= (const t val)
 Operator+=().
CImg< T > & operator+= (const char *const expression)
 Operator+=().
template<typename t >
CImg< T > & operator+= (const CImg< t > &img)
 Operator+=().
CImg< T > & operator++ ()
 Operator++() (prefix).
CImg< T > operator++ (int)
 Operator++() (postfix).
CImg< T > operator+ () const
 Operator+() (unary).
template<typename t >
CImg< _cimg_Tt > operator+ (const t val) const
 Operator+().
CImg< Tfloat > operator+ (const char *const expression) const
 Operator+().
template<typename t >
CImg< _cimg_Tt > operator+ (const CImg< t > &img) const
 Operator+().
template<typename t >
CImg< T > & operator-= (const t val)
 Operator-=().
CImg< T > & operator-= (const char *const expression)
 Operator-=().
template<typename t >
CImg< T > & operator-= (const CImg< t > &img)
 Operator-=().
CImg< T > & operator-- ()
 Operator--() (prefix).
CImg< T > operator-- (int)
 Operator--() (postfix).
CImg< T > operator- () const
 Operator-() (unary).
template<typename t >
CImg< _cimg_Tt > operator- (const t val) const
 Operator-().
CImg< Tfloat > operator- (const char *const expression) const
 Operator-().
template<typename t >
CImg< _cimg_Tt > operator- (const CImg< t > &img) const
 Operator-().
template<typename t >
CImg< T > & operator*= (const t val)
 Operator*=().
CImg< T > & operator*= (const char *const expression)
 Operator*=().
template<typename t >
CImg< T > & operator*= (const CImg< t > &img)
 Operator*=().
template<typename t >
CImg< _cimg_Tt > operator* (const t val) const
 Operator*().
CImg< Tfloat > operator* (const char *const expression) const
 Operator*().
template<typename t >
CImg< _cimg_Tt > operator* (const CImg< t > &img) const
 Operator*().
template<typename t >
CImg< T > & operator/= (const t val)
 Operator/=().
CImg< T > & operator/= (const char *const expression)
 Operator/=().
template<typename t >
CImg< T > & operator/= (const CImg< t > &img)
 Operator/=().
template<typename t >
CImg< _cimg_Tt > operator/ (const t val) const
 Operator/().
CImg< Tfloat > operator/ (const char *const expression) const
 Operator/().
template<typename t >
CImg< _cimg_Tt > operator/ (const CImg< t > &img) const
 Operator/().
template<typename t >
CImg< T > & operator%= (const t val)
 Operator=().
CImg< T > & operator%= (const char *const expression)
 Operator=().
template<typename t >
CImg< T > & operator%= (const CImg< t > &img)
 Operator=().
template<typename t >
CImg< _cimg_Tt > operator% (const t val) const
 Operator%().
CImg< Tfloat > operator% (const char *const expression) const
 Operator%().
template<typename t >
CImg< _cimg_Tt > operator% (const CImg< t > &img) const
 Operator%().
template<typename t >
CImg< T > & operator&= (const t val)
 Operator&=().
CImg< T > & operator&= (const char *const expression)
 Operator&=().
template<typename t >
CImg< T > & operator&= (const CImg< t > &img)
 Operator&=().
template<typename t >
CImg< T > operator& (const t val) const
 Operator&().
template<typename t >
CImg< T > & operator|= (const t val)
 Operator|=().
CImg< T > & operator|= (const char *const expression)
 Operator|=().
template<typename t >
CImg< T > & operator|= (const CImg< t > &img)
 Operator|=().
template<typename t >
CImg< T > operator| (const t val) const
 Operator|().
template<typename t >
CImg< T > & operator^= (const t val)
 Operator^=().
CImg< T > & operator^= (const char *const expression)
 Operator^=().
template<typename t >
CImg< T > & operator^= (const CImg< t > &img)
 Operator^=().
template<typename t >
CImg< T > operator^ (const t val) const
 Operator^().
template<typename t >
CImg< T > & operator<<= (const t val)
 Operator<<=().
CImg< T > & operator<<= (const char *const expression)
 Operator<<=().
template<typename t >
CImg< T > & operator<<= (const CImg< t > &img)
 Operator<<=().
template<typename t >
CImg< T > operator<< (const t val) const
 Operator<<().
template<typename t >
CImg< T > & operator>>= (const t val)
 Operator>>=().
CImg< T > & operator>>= (const char *const expression)
 Operator>>=().
template<typename t >
CImg< T > & operator>>= (const CImg< t > &img)
 Operator>>=().
template<typename t >
CImg< T > operator>> (const t val) const
 Operator>>().
template<typename t >
bool operator== (const CImg< t > &img) const
 Operator==().
template<typename t >
bool operator!= (const CImg< t > &img) const
 Operator!=().
template<typename t >
CImgList< _cimg_Tt > operator, (const CImg< t > &img) const
 Operator,().
template<typename t >
CImgList< _cimg_Tt > operator, (CImgList< t > &list) const
 Operator,().
CImgList< T > operator< (const char axis) const
 Operator<().
CImg< T > operator~ () const
 Operator~().
Mathematical Functions

CImg< T > & sqr ()
 Compute the square value of each pixel.
CImg< Tfloat > get_sqr () const
CImg< T > & sqrt ()
 Compute the square root of each pixel value.
CImg< Tfloat > get_sqrt () const
CImg< T > & exp ()
 Compute the exponential of each pixel value.
CImg< Tfloat > get_exp () const
CImg< T > & log ()
 Compute the log of each each pixel value.
CImg< Tfloat > get_log () const
CImg< T > & log10 ()
 Compute the log10 of each each pixel value.
CImg< Tfloat > get_log10 () const
CImg< T > & abs ()
 Compute the absolute value of each pixel value.
CImg< Tfloat > get_abs () const
CImg< T > & sign ()
 Compute the sign of each pixel value.
CImg< Tfloat > get_sign () const
CImg< T > & cos ()
 Compute the cosinus of each pixel value.
CImg< Tfloat > get_cos () const
CImg< T > & sin ()
 Compute the sinus of each pixel value.
CImg< Tfloat > get_sin () const
CImg< T > & sinc ()
 Compute the sinus cardinal of each pixel value.
CImg< Tfloat > get_sinc () const
CImg< T > & tan ()
 Compute the tangent of each pixel.
CImg< Tfloat > get_tan () const
CImg< T > & cosh ()
 Compute the hyperbolic cosine of each pixel value.
CImg< Tfloat > get_cosh () const
CImg< T > & sinh ()
 Compute the hyperbolic sine of each pixel value.
CImg< Tfloat > get_sinh () const
CImg< T > & tanh ()
 Compute the hyperbolic tangent of each pixel value.
CImg< Tfloat > get_tanh () const
CImg< T > & acos ()
 Compute the arc-cosine of each pixel value.
CImg< Tfloat > get_acos () const
CImg< T > & asin ()
 Compute the arc-sinus of each pixel value.
CImg< Tfloat > get_asin () const
CImg< T > & atan ()
 Compute the arc-tangent of each pixel.
CImg< Tfloat > get_atan () const
template<typename t >
CImg< T > & atan2 (const CImg< t > &img)
 Compute the arc-tangent of each pixel.
template<typename t >
CImg< Tfloat > get_atan2 (const CImg< t > &img) const
CImg< T > & mul (const char *const expression)
 Pointwise multiplication between an image and an expression.
template<typename t >
CImg< T > & mul (const CImg< t > &img)
 Pointwise multiplication between two images.
template<typename t >
CImg< _cimg_Tt > get_mul (const CImg< t > &img) const
CImg< T > & div (const char *const expression)
 Pointwise division between an image and an expression.
template<typename t >
CImg< T > & div (const CImg< t > &img)
 Pointwise division between two images.
template<typename t >
CImg< _cimg_Tt > get_div (const CImg< t > &img) const
CImg< T > & pow (const double p)
 Compute the power by p of each pixel value.
CImg< Tfloat > get_pow (const double p) const
template<typename t >
CImg< T > & pow (const CImg< t > &img)
 Compute the power of each pixel value.
template<typename t >
CImg< Tfloat > get_pow (const CImg< t > &img) const
CImg< T > & pow (const char *const expression)
 Compute the power of each pixel value.
CImg< Tfloat > get_pow (const char *const expression) const
CImg< T > & rol (const unsigned int n=1)
 Compute the bitwise left rotation of each pixel value.
CImg< T > get_rol (const unsigned int n=1) const
template<typename t >
CImg< T > & rol (const CImg< t > &img)
template<typename t >
CImg< T > get_rol (const CImg< t > &img) const
CImg< T > & rol (const char *const expression)
CImg< T > get_rol (const char *const expression) const
CImg< T > & ror (const unsigned int n=1)
 Compute the bitwise right rotation of each pixel value.
CImg< T > get_ror (const unsigned int n=1) const
template<typename t >
CImg< T > & ror (const CImg< t > &img)
template<typename t >
CImg< T > get_ror (const CImg< t > &img) const
CImg< T > & ror (const char *const expression)
CImg< T > get_ror (const char *const expression) const
CImg< T > & min (const T val)
 Pointwise min operator between an image and a value.
CImg< T > get_min (const T val) const
template<typename t >
CImg< T > & min (const CImg< t > &img)
 Pointwise min operator between two images.
template<typename t >
CImg< _cimg_Tt > get_min (const CImg< t > &img) const
CImg< T > & min (const char *const expression)
 Pointwise min operator between an image and a string.
CImg< Tfloat > get_min (const char *const expression) const
CImg< T > & max (const T val)
 Pointwise max operator between an image and a value.
CImg< T > get_max (const T val) const
template<typename t >
CImg< T > & max (const CImg< t > &img)
 Pointwise max operator between two images.
template<typename t >
CImg< _cimg_Tt > get_max (const CImg< t > &img) const
CImg< T > & max (const char *const expression)
 Pointwise max operator between an image and a string.
CImg< Tfloat > get_max (const char *const expression) const
T & min ()
 Return a reference to the minimum pixel value of the instance image.
const T & min () const
T & max ()
 Return a reference to the maximum pixel value of the instance image.
const T & max () const
template<typename t >
T & min_max (t &max_val)
 Return a reference to the minimum pixel value and return also the maximum pixel value.
template<typename t >
const T & min_max (t &max_val) const
template<typename t >
T & max_min (t &min_val)
 Return a reference to the maximum pixel value and return also the minimum pixel value.
template<typename t >
const T & max_min (t &min_val) const
kth_smallest (const unsigned int k) const
 Return the kth smallest element of the image.
median () const
 Return the median value of the image.
Tdouble sum () const
 Return the sum of all the pixel values in an image.
Tdouble mean () const
 Return the mean pixel value of the instance image.
Tdouble variance (const unsigned int variance_method=1) const
 Return the variance of the image.
template<typename t >
Tdouble variance_mean (const unsigned int variance_method, t &mean) const
 Return the variance and the mean of the image.
Tdouble variance_noise (const unsigned int variance_method=1) const
 Estimate noise variance of the instance image.
template<typename t >
Tdouble MSE (const CImg< t > &img) const
 Compute the MSE (Mean-Squared Error) between two images.
template<typename t >
Tdouble PSNR (const CImg< t > &img, const Tdouble valmax=255) const
 Compute the PSNR between two images.
double eval (const char *const expression, const double x=0, const double y=0, const double z=0, const double c=0) const
 Evaluate math expression.
CImg< T > & stats (const unsigned int variance_method=1)
 Compute a statistics vector (min,max,mean,variance,xmin,ymin,zmin,cmin,xmax,ymax,zmax,cmax).
CImg< Tdouble > get_stats (const unsigned int variance_method=1) const
Value Manipulation

CImg< T > & fill (const T val)
 Fill an image by a value val.
CImg< T > get_fill (const T val) const
CImg< T > & fill (const T val0, const T val1)
 Fill sequentially all pixel values with values val0 and val1 respectively.
CImg< T > get_fill (const T val0, const T val1) const
CImg< T > & fill (const T val0, const T val1, const T val2)
 Fill sequentially all pixel values with values val0 and val1 and val2.
CImg< T > get_fill (const T val0, const T val1, const T val2) const
CImg< T > & fill (const T val0, const T val1, const T val2, const T val3)
 Fill sequentially all pixel values with values val0 and val1 and val2 and val3.
CImg< T > get_fill (const T val0, const T val1, const T val2, const T val3) const
CImg< T > & fill (const T val0, const T val1, const T val2, const T val3, const T val4)
 Fill sequentially all pixel values with values val0 and val1 and val2 and val3 and val4.
CImg< T > get_fill (const T val0, const T val1, const T val2, const T val3, const T val4) const
CImg< T > & fill (const T val0, const T val1, const T val2, const T val3, const T val4, const T val5)
 Fill sequentially all pixel values with values val0 and val1 and val2 and val3 and val4 and val5.
CImg< T > get_fill (const T val0, const T val1, const T val2, const T val3, const T val4, const T val5) const
CImg< T > & fill (const T val0, const T val1, const T val2, const T val3, const T val4, const T val5, const T val6)
 Fill sequentially pixel values.
CImg< T > get_fill (const T val0, const T val1, const T val2, const T val3, const T val4, const T val5, const T val6) const
CImg< T > & fill (const T val0, const T val1, const T val2, const T val3, const T val4, const T val5, const T val6, const T val7)
 Fill sequentially pixel values.
CImg< T > get_fill (const T val0, const T val1, const T val2, const T val3, const T val4, const T val5, const T val6, const T val7) const
CImg< T > & fill (const T val0, const T val1, const T val2, const T val3, const T val4, const T val5, const T val6, const T val7, const T val8)
 Fill sequentially pixel values.
CImg< T > get_fill (const T val0, const T val1, const T val2, const T val3, const T val4, const T val5, const T val6, const T val7, const T val8) const
CImg< T > & fill (const T val0, const T val1, const T val2, const T val3, const T val4, const T val5, const T val6, const T val7, const T val8, const T val9)
 Fill sequentially pixel values.
CImg< T > get_fill (const T val0, const T val1, const T val2, const T val3, const T val4, const T val5, const T val6, const T val7, const T val8, const T val9) const
CImg< T > & fill (const T val0, const T val1, const T val2, const T val3, const T val4, const T val5, const T val6, const T val7, const T val8, const T val9, const T val10)
 Fill sequentially pixel values.
CImg< T > get_fill (const T val0, const T val1, const T val2, const T val3, const T val4, const T val5, const T val6, const T val7, const T val8, const T val9, const T val10) const
CImg< T > & fill (const T val0, const T val1, const T val2, const T val3, const T val4, const T val5, const T val6, const T val7, const T val8, const T val9, const T val10, const T val11)
 Fill sequentially pixel values.
CImg< T > get_fill (const T val0, const T val1, const T val2, const T val3, const T val4, const T val5, const T val6, const T val7, const T val8, const T val9, const T val10, const T val11) const
CImg< T > & fill (const T val0, const T val1, const T val2, const T val3, const T val4, const T val5, const T val6, const T val7, const T val8, const T val9, const T val10, const T val11, const T val12)
 Fill sequentially pixel values.
CImg< T > get_fill (const T val0, const T val1, const T val2, const T val3, const T val4, const T val5, const T val6, const T val7, const T val8, const T val9, const T val10, const T val11, const T val12) const
CImg< T > & fill (const T val0, const T val1, const T val2, const T val3, const T val4, const T val5, const T val6, const T val7, const T val8, const T val9, const T val10, const T val11, const T val12, const T val13)
 Fill sequentially pixel values.
CImg< T > get_fill (const T val0, const T val1, const T val2, const T val3, const T val4, const T val5, const T val6, const T val7, const T val8, const T val9, const T val10, const T val11, const T val12, const T val13) const
CImg< T > & fill (const T val0, const T val1, const T val2, const T val3, const T val4, const T val5, const T val6, const T val7, const T val8, const T val9, const T val10, const T val11, const T val12, const T val13, const T val14)
 Fill sequentially pixel values.
CImg< T > get_fill (const T val0, const T val1, const T val2, const T val3, const T val4, const T val5, const T val6, const T val7, const T val8, const T val9, const T val10, const T val11, const T val12, const T val13, const T val14) const
CImg< T > & fill (const T val0, const T val1, const T val2, const T val3, const T val4, const T val5, const T val6, const T val7, const T val8, const T val9, const T val10, const T val11, const T val12, const T val13, const T val14, const T val15)
 Fill sequentially pixel values.
CImg< T > get_fill (const T val0, const T val1, const T val2, const T val3, const T val4, const T val5, const T val6, const T val7, const T val8, const T val9, const T val10, const T val11, const T val12, const T val13, const T val14, const T val15) const
CImg< T > & fill (const char *const expression, const bool repeat_flag)
 Fill image values according to the given expression, which can be a formula or a list of values.
CImg< T > get_fill (const char *const values, const bool repeat_values) const
template<typename t >
CImg< T > & fill (const CImg< t > &values, const bool repeat_values=true)
 Fill image values according to the values found in the specified image.
template<typename t >
CImg< T > get_fill (const CImg< t > &values, const bool repeat_values=true) const
CImg< T > & fillX (const unsigned int y, const unsigned int z, const unsigned int c, const int a0,...)
 Fill image values along the X-axis at the specified pixel position (y,z,c).
CImg< T > & fillX (const unsigned int y, const unsigned int z, const unsigned int c, const double a0,...)
CImg< T > & fillY (const unsigned int x, const unsigned int z, const unsigned int c, const int a0,...)
 Fill image values along the Y-axis at the specified pixel position (x,z,c).
CImg< T > & fillY (const unsigned int x, const unsigned int z, const unsigned int c, const double a0,...)
CImg< T > & fillZ (const unsigned int x, const unsigned int y, const unsigned int c, const int a0,...)
 Fill image values along the Z-axis at the specified pixel position (x,y,c).
CImg< T > & fillZ (const unsigned int x, const unsigned int y, const unsigned int c, const double a0,...)
CImg< T > & fillC (const unsigned int x, const unsigned int y, const unsigned int z, const int a0,...)
 Fill image values along the C-axis at the specified pixel position (x,y,z).
CImg< T > & fillC (const unsigned int x, const unsigned int y, const unsigned int z, const double a0,...)
CImg< T > & invert_endianness ()
 Invert endianness of the image buffer.
CImg< T > get_invert_endianness () const
CImg< T > & rand (const T val_min, const T val_max)
 Fill the instance image with random values between specified range.
CImg< T > get_rand (const T val_min, const T val_max) const
CImg< T > & round (const float x, const int rounding_type=0)
 Compute image with rounded pixel values.
CImg< T > get_round (const float x, const unsigned int rounding_type=0) const
CImg< T > & noise (const double sigma, const unsigned int noise_type=0)
 Add random noise to the values of the instance image.
CImg< T > get_noise (const double sigma, const unsigned int noise_type=0) const
CImg< T > & normalize (const T value_min, const T value_max)
 Linearly normalize values of the instance image between value_min and value_max.
CImg< Tfloat > get_normalize (const T value_min, const T value_max) const
CImg< T > & normalize ()
 Normalize multi-valued pixels of the instance image, with respect to their L2-norm.
CImg< Tfloat > get_normalize () const
CImg< T > & norm (const int norm_type=2)
 Compute L2-norm of each multi-valued pixel of the instance image.
CImg< Tfloat > get_norm (const int norm_type=2) const
CImg< T > & cut (const T value_min, const T value_max)
 Cut values of the instance image between value_min and value_max.
CImg< T > get_cut (const T value_min, const T value_max) const
CImg< T > & quantize (const unsigned int nb_levels, const bool keep_range=true)
 Uniformly quantize values of the instance image into nb_levels levels.
CImg< T > get_quantize (const unsigned int n, const bool keep_range=true) const
CImg< T > & threshold (const T value, const bool soft_threshold=false, const bool strict_threshold=false)
 Threshold values of the instance image.
CImg< T > get_threshold (const T value, const bool soft_threshold=false, const bool strict_threshold=false) const
CImg< T > & histogram (const unsigned int nb_levels, const T value_min=(T) 0, const T value_max=(T) 0)
 Compute the histogram of the instance image.
CImg< floatT > get_histogram (const unsigned int nb_levels, const T value_min=(T) 0, const T value_max=(T) 0) const
CImg< T > & equalize (const unsigned int nb_levels, const T value_min=(T) 0, const T value_max=(T) 0)
 Compute the histogram-equalized version of the instance image.
CImg< T > get_equalize (const unsigned int nblevels, const T val_min=(T) 0, const T val_max=(T) 0) const
template<typename t >
CImg< T > & index (const CImg< t > &palette, const bool dithering=false, const bool map_indexes=false)
 Index multi-valued pixels of the instance image, regarding to a predefined palette.
template<typename t >
CImg< typename CImg< t >::Tuint > get_index (const CImg< t > &palette, const bool dithering=false, const bool map_indexes=true) const
template<typename t >
CImg< T > & map (const CImg< t > &palette)
 Map predefined palette on the scalar (indexed) instance image.
template<typename t >
CImg< t > get_map (const CImg< t > &palette) const
CImg< T > & label_regions ()
 Create a map of indexed labels counting disconnected regions with same intensities.
CImg< uintT > get_label_regions () const
Drawing Functions

template<typename tc >
CImg< T > & _draw_scanline (const int x0, const int x1, const int y, const tc *const color, const float opacity=1, const float brightness=1, const bool init=false)
template<typename tc >
CImg< T > & _draw_scanline (const tc *const color, const float opacity=1)
template<typename tc >
CImg< T > & draw_point (const int x0, const int y0, const tc *const color, const float opacity=1)
 Draw a 2d colored point (pixel).
template<typename tc >
CImg< T > & draw_point (const int x0, const int y0, const int z0, const tc *const color, const float opacity=1)
 Draw a 3d colored point (voxel).
template<typename t , typename tc >
CImg< T > & draw_point (const CImg< t > &points, const tc *const color, const float opacity=1)
template<typename tc >
CImg< T > & draw_line (const int x0, const int y0, const int x1, const int y1, const tc *const color, const float opacity=1, const unsigned int pattern=~0U, const bool init_hatch=true)
 Draw a 2d colored line.
template<typename tc >
CImg< T > & draw_line (CImg< floatT > &zbuffer, const int x0, const int y0, const float z0, const int x1, const int y1, const float z1, const tc *const color, const float opacity=1, const unsigned int pattern=~0U, const bool init_hatch=true)
 Draw a 2d colored line, with z-buffering.
template<typename tc >
CImg< T > & draw_line (const int x0, const int y0, const int z0, const int x1, const int y1, const int z1, const tc *const color, const float opacity=1, const unsigned int pattern=~0U, const bool init_hatch=true)
 Draw a 3d colored line.
template<typename tc >
CImg< T > & draw_line (const int x0, const int y0, const int x1, const int y1, const CImg< tc > &texture, const int tx0, const int ty0, const int tx1, const int ty1, const float opacity=1, const unsigned int pattern=~0U, const bool init_hatch=true)
 Draw a 2d textured line.
template<typename tc >
CImg< T > & draw_line (const int x0, const int y0, const float z0, const int x1, const int y1, const float z1, const CImg< tc > &texture, const int tx0, const int ty0, const int tx1, const int ty1, const float opacity=1, const unsigned int pattern=~0U, const bool init_hatch=true)
 Draw a 2d textured line, with perspective correction.
template<typename tc >
CImg< T > & draw_line (CImg< floatT > &zbuffer, const int x0, const int y0, const float z0, const int x1, const int y1, const float z1, const CImg< tc > &texture, const int tx0, const int ty0, const int tx1, const int ty1, const float opacity=1, const unsigned int pattern=~0U, const bool init_hatch=true)
 Draw a 2d textured line, with z-buffering and perspective correction.
template<typename t , typename tc >
CImg< T > & draw_line (const CImg< t > &points, const tc *const color, const float opacity=1, const unsigned int pattern=~0U, const bool init_hatch=true)
 Draw a set of consecutive colored lines in the instance image.
template<typename tc >
CImg< T > & draw_arrow (const int x0, const int y0, const int x1, const int y1, const tc *const color, const float opacity=1, const float angle=30, const float length=-10, const unsigned int pattern=~0U)
 Draw a colored arrow in the instance image.
template<typename tc >
CImg< T > & draw_spline (const int x0, const int y0, const float u0, const float v0, const int x1, const int y1, const float u1, const float v1, const tc *const color, const float opacity=1, const float precision=4, const unsigned int pattern=~0U, const bool init_hatch=true)
 Draw a cubic spline curve in the instance image.
template<typename tc >
CImg< T > & draw_spline (const int x0, const int y0, const int z0, const float u0, const float v0, const float w0, const int x1, const int y1, const int z1, const float u1, const float v1, const float w1, const tc *const color, const float opacity=1, const float precision=4, const unsigned int pattern=~0U, const bool init_hatch=true)
 Draw a cubic spline curve in the instance image (for volumetric images).
template<typename t >
CImg< T > & draw_spline (const int x0, const int y0, const float u0, const float v0, const int x1, const int y1, const float u1, const float v1, const CImg< t > &texture, const int tx0, const int ty0, const int tx1, const int ty1, const float opacity=1, const float precision=4, const unsigned int pattern=~0U, const bool init_hatch=true)
 Draw a cubic spline curve in the instance image.
template<typename tp , typename tt , typename tc >
CImg< T > & draw_spline (const CImg< tp > &points, const CImg< tt > &tangents, const tc *const color, const float opacity=1, const bool close_set=false, const float precision=4, const unsigned int pattern=~0U, const bool init_hatch=true)
template<typename tp , typename tc >
CImg< T > & draw_spline (const CImg< tp > &points, const tc *const color, const float opacity=1, const bool close_set=false, const float precision=4, const unsigned int pattern=~0U, const bool init_hatch=true)
 Draw a set of consecutive colored splines in the instance image.
template<typename tc >
CImg< T > & _draw_triangle (const int x0, const int y0, const int x1, const int y1, const int x2, const int y2, const tc *const color, const float opacity, const float brightness)
template<typename tc >
CImg< T > & draw_triangle (const int x0, const int y0, const int x1, const int y1, const int x2, const int y2, const tc *const color, const float opacity=1)
 Draw a 2d filled colored triangle.
template<typename tc >
CImg< T > & draw_triangle (const int x0, const int y0, const int x1, const int y1, const int x2, const int y2, const tc *const color, const float opacity, const unsigned int pattern)
 Draw a 2d outlined colored triangle.
template<typename tc >
CImg< T > & draw_triangle (CImg< floatT > &zbuffer, const int x0, const int y0, const float z0, const int x1, const int y1, const float z1, const int x2, const int y2, const float z2, const tc *const color, const float opacity=1, const float brightness=1)
 Draw a 2d filled colored triangle, with z-buffering.
template<typename tc >
CImg< T > & draw_triangle (const int x0, const int y0, const int x1, const int y1, const int x2, const int y2, const tc *const color, const float brightness0, const float brightness1, const float brightness2, const float opacity=1)
 Draw a 2d Gouraud-shaded colored triangle.
template<typename tc >
CImg< T > & draw_triangle (CImg< floatT > &zbuffer, const int x0, const int y0, const float z0, const int x1, const int y1, const float z1, const int x2, const int y2, const float z2, const tc *const color, const float brightness0, const float brightness1, const float brightness2, const float opacity=1)
 Draw a 2d Gouraud-shaded colored triangle, with z-buffering.
template<typename tc1 , typename tc2 , typename tc3 >
CImg< T > & draw_triangle (const int x0, const int y0, const int x1, const int y1, const int x2, const int y2, const tc1 *const color1, const tc2 *const color2, const tc3 *const color3, const float opacity=1)
 Draw a colored triangle with interpolated colors.
template<typename tc >
CImg< T > & draw_triangle (const int x0, const int y0, const int x1, const int y1, const int x2, const int y2, const CImg< tc > &texture, const int tx0, const int ty0, const int tx1, const int ty1, const int tx2, const int ty2, const float opacity=1, const float brightness=1)
 Draw a 2d textured triangle.
template<typename tc >
CImg< T > & draw_triangle (const int x0, const int y0, const float z0, const int x1, const int y1, const float z1, const int x2, const int y2, const float z2, const CImg< tc > &texture, const int tx0, const int ty0, const int tx1, const int ty1, const int tx2, const int ty2, const float opacity=1, const float brightness=1)
 Draw a 2d textured triangle, with perspective correction.
template<typename tc >
CImg< T > & draw_triangle (CImg< floatT > &zbuffer, const int x0, const int y0, const float z0, const int x1, const int y1, const float z1, const int x2, const int y2, const float z2, const CImg< tc > &texture, const int tx0, const int ty0, const int tx1, const int ty1, const int tx2, const int ty2, const float opacity=1, const float brightness=1)
 Draw a 2d textured triangle, with z-buffering and perspective correction.
template<typename tc , typename tl >
CImg< T > & draw_triangle (const int x0, const int y0, const int x1, const int y1, const int x2, const int y2, const tc *const color, const CImg< tl > &light, const int lx0, const int ly0, const int lx1, const int ly1, const int lx2, const int ly2, const float opacity=1)
 Draw a 2d Pseudo-Phong-shaded triangle.
template<typename tc , typename tl >
CImg< T > & draw_triangle (CImg< floatT > &zbuffer, const int x0, const int y0, const float z0, const int x1, const int y1, const float z1, const int x2, const int y2, const float z2, const tc *const color, const CImg< tl > &light, const int lx0, const int ly0, const int lx1, const int ly1, const int lx2, const int ly2, const float opacity=1)
 Draw a 2d Pseudo-Phong-shaded triangle, with z-buffering.
template<typename tc >
CImg< T > & draw_triangle (const int x0, const int y0, const int x1, const int y1, const int x2, const int y2, const CImg< tc > &texture, const int tx0, const int ty0, const int tx1, const int ty1, const int tx2, const int ty2, const float brightness0, const float brightness1, const float brightness2, const float opacity=1)
 Draw a 2d Gouraud-shaded textured triangle.
template<typename tc >
CImg< T > & draw_triangle (const int x0, const int y0, const float z0, const int x1, const int y1, const float z1, const int x2, const int y2, const float z2, const CImg< tc > &texture, const int tx0, const int ty0, const int tx1, const int ty1, const int tx2, const int ty2, const float brightness0, const float brightness1, const float brightness2, const float opacity=1)
 Draw a 2d Gouraud-shaded textured triangle, with perspective correction.
template<typename tc >
CImg< T > & draw_triangle (CImg< floatT > &zbuffer, const int x0, const int y0, const float z0, const int x1, const int y1, const float z1, const int x2, const int y2, const float z2, const CImg< tc > &texture, const int tx0, const int ty0, const int tx1, const int ty1, const int tx2, const int ty2, const float brightness0, const float brightness1, const float brightness2, const float opacity=1)
 Draw a 2d Gouraud-shaded textured triangle, with z-buffering and perspective correction.
template<typename tc , typename tl >
CImg< T > & draw_triangle (const int x0, const int y0, const int x1, const int y1, const int x2, const int y2, const CImg< tc > &texture, const int tx0, const int ty0, const int tx1, const int ty1, const int tx2, const int ty2, const CImg< tl > &light, const int lx0, const int ly0, const int lx1, const int ly1, const int lx2, const int ly2, const float opacity=1)
 Draw a 2d Pseudo-Phong-shaded textured triangle.
template<typename tc , typename tl >
CImg< T > & draw_triangle (const int x0, const int y0, const float z0, const int x1, const int y1, const float z1, const int x2, const int y2, const float z2, const CImg< tc > &texture, const int tx0, const int ty0, const int tx1, const int ty1, const int tx2, const int ty2, const CImg< tl > &light, const int lx0, const int ly0, const int lx1, const int ly1, const int lx2, const int ly2, const float opacity=1)
 Draw a 2d Pseudo-Phong-shaded textured triangle, with perspective correction.
template<typename tc , typename tl >
CImg< T > & draw_triangle (CImg< floatT > &zbuffer, const int x0, const int y0, const float z0, const int x1, const int y1, const float z1, const int x2, const int y2, const float z2, const CImg< tc > &texture, const int tx0, const int ty0, const int tx1, const int ty1, const int tx2, const int ty2, const CImg< tl > &light, const int lx0, const int ly0, const int lx1, const int ly1, const int lx2, const int ly2, const float opacity=1)
 Draw a 2d Pseudo-Phong-shaded textured triangle, with z-buffering and perspective correction.
CImg< T > & draw_rectangle (const int x0, const int y0, const int z0, const int c0, const int x1, const int y1, const int z1, const int c1, const T val, const float opacity=1)
 Draw a 4d filled rectangle in the instance image, at coordinates (x0,y0,z0,c0)-(x1,y1,z1,c1).
template<typename tc >
CImg< T > & draw_rectangle (const int x0, const int y0, const int z0, const int x1, const int y1, const int z1, const tc *const color, const float opacity=1)
 Draw a 3d filled colored rectangle in the instance image, at coordinates (x0,y0,z0)-(x1,y1,z1).
template<typename tc >
CImg< T > & draw_rectangle (const int x0, const int y0, const int z0, const int x1, const int y1, const int z1, const tc *const color, const float opacity, const unsigned int pattern)
 Draw a 3d outlined colored rectangle in the instance image.
template<typename tc >
CImg< T > & draw_rectangle (const int x0, const int y0, const int x1, const int y1, const tc *const color, const float opacity=1)
 Draw a 2d filled colored rectangle in the instance image, at coordinates (x0,y0)-(x1,y1).
template<typename tc >
CImg< T > & draw_rectangle (const int x0, const int y0, const int x1, const int y1, const tc *const color, const float opacity, const unsigned int pattern)
 Draw a 2d outlined colored rectangle.
template<typename t , typename tc >
CImg< T > & draw_polygon (const CImg< t > &points, const tc *const color, const float opacity=1)
 Draw a filled polygon in the instance image.
template<typename t , typename tc >
CImg< T > & draw_polygon (const CImg< t > &points, const tc *const color, const float opacity, const unsigned int pattern)
 Draw a outlined polygon in the instance image.
template<typename tc >
CImg< T > & draw_circle (const int x0, const int y0, int radius, const tc *const color, const float opacity=1)
 Draw a filled circle.
template<typename tc >
CImg< T > & draw_circle (const int x0, const int y0, int radius, const tc *const color, const float opacity, const unsigned int)
 Draw an outlined circle.
template<typename tc >
CImg< T > & _draw_ellipse (const int x0, const int y0, const float r1, const float r2, const float angle, const tc *const color, const float opacity, const unsigned int pattern)
template<typename tc >
CImg< T > & draw_ellipse (const int x0, const int y0, const float r1, const float r2, const float angle, const tc *const color, const float opacity=1)
 Draw a filled ellipse.
template<typename t , typename tc >
CImg< T > & draw_ellipse (const int x0, const int y0, const CImg< t > &tensor, const tc *const color, const float opacity=1)
 Draw a filled ellipse.
template<typename tc >
CImg< T > & draw_ellipse (const int x0, const int y0, const float r1, const float r2, const float angle, const tc *const color, const float opacity, const unsigned int pattern)
 Draw an outlined ellipse.
template<typename t , typename tc >
CImg< T > & draw_ellipse (const int x0, const int y0, const CImg< t > &tensor, const tc *const color, const float opacity, const unsigned int pattern)
 Draw an outlined ellipse.
template<typename t >
CImg< T > & draw_image (const int x0, const int y0, const int z0, const int c0, const CImg< t > &sprite, const float opacity=1)
 Draw an image.
CImg< T > & draw_image (const int x0, const int y0, const int z0, const int c0, const CImg< T > &sprite, const float opacity=1)
template<typename t >
CImg< T > & draw_image (const int x0, const int y0, const int z0, const CImg< t > &sprite, const float opacity=1)
 Draw an image.
template<typename t >
CImg< T > & draw_image (const int x0, const int y0, const CImg< t > &sprite, const float opacity=1)
 Draw an image.
template<typename t >
CImg< T > & draw_image (const int x0, const CImg< t > &sprite, const float opacity=1)
 Draw an image.
template<typename t >
CImg< T > & draw_image (const CImg< t > &sprite, const float opacity=1)
 Draw an image.
template<typename ti , typename tm >
CImg< T > & draw_image (const int x0, const int y0, const int z0, const int c0, const CImg< ti > &sprite, const CImg< tm > &mask, const float opacity=1, const float mask_valmax=1)
 Draw a sprite image in the instance image (masked version).
template<typename ti , typename tm >
CImg< T > & draw_image (const int x0, const int y0, const int z0, const CImg< ti > &sprite, const CImg< tm > &mask, const float opacity=1, const float mask_valmax=1)
 Draw an image.
template<typename ti , typename tm >
CImg< T > & draw_image (const int x0, const int y0, const CImg< ti > &sprite, const CImg< tm > &mask, const float opacity=1, const float mask_valmax=1)
 Draw an image.
template<typename ti , typename tm >
CImg< T > & draw_image (const int x0, const CImg< ti > &sprite, const CImg< tm > &mask, const float opacity=1, const float mask_valmax=1)
 Draw an image.
template<typename ti , typename tm >
CImg< T > & draw_image (const CImg< ti > &sprite, const CImg< tm > &mask, const float opacity=1, const float mask_valmax=1)
 Draw an image.
template<typename tc1 , typename tc2 , typename t >
CImg< T > & draw_text (const int x0, const int y0, const char *const text, const tc1 *const foreground_color, const tc2 *const background_color, const float opacity, const CImgList< t > &font,...)
 Draw a text.
template<typename tc , typename t >
CImg< T > & draw_text (const int x0, const int y0, const char *const text, const tc *const foreground_color, const int, const float opacity, const CImgList< t > &font,...)
template<typename tc , typename t >
CImg< T > & draw_text (const int x0, const int y0, const char *const text, const int, const tc *const background_color, const float opacity, const CImgList< t > &font,...)
template<typename tc1 , typename tc2 >
CImg< T > & draw_text (const int x0, const int y0, const char *const text, const tc1 *const foreground_color, const tc2 *const background_color, const float opacity=1, const unsigned int font_height=13,...)
 Draw a text.
template<typename tc >
CImg< T > & draw_text (const int x0, const int y0, const char *const text, const tc *const foreground_color, const int background_color=0, const float opacity=1, const unsigned int font_height=13,...)
template<typename tc >
CImg< T > & draw_text (const int x0, const int y0, const char *const text, const int, const tc *const background_color, const float opacity=1, const unsigned int font_height=13,...)
template<typename tc1 , typename tc2 , typename t >
CImg< T > & _draw_text (const int x0, const int y0, const char *const text, const tc1 *const foreground_color, const tc2 *const background_color, const float opacity, const CImgList< t > &font)
template<typename t1 , typename t2 >
CImg< T > & draw_quiver (const CImg< t1 > &flow, const t2 *const color, const float opacity=1, const unsigned int sampling=25, const float factor=-20, const bool arrows=true, const unsigned int pattern=~0U)
 Draw a vector field in the instance image, using a colormap.
template<typename t1 , typename t2 >
CImg< T > & draw_quiver (const CImg< t1 > &flow, const CImg< t2 > &color, const float opacity=1, const unsigned int sampling=25, const float factor=-20, const bool arrows=true, const unsigned int pattern=~0U)
 Draw a vector field in the instance image, using a colormap.
template<typename t , typename tc >
CImg< T > & draw_axis (const CImg< t > &xvalues, const int y, const tc *const color, const float opacity=1, const unsigned int pattern=~0U)
 Draw a labeled horizontal axis on the instance image.
template<typename t , typename tc >
CImg< T > & draw_axis (const int x, const CImg< t > &yvalues, const tc *const color, const float opacity=1, const unsigned int pattern=~0U)
 Draw a labeled vertical axis on the instance image.
template<typename tx , typename ty , typename tc >
CImg< T > & draw_axes (const CImg< tx > &xvalues, const CImg< ty > &yvalues, const tc *const color, const float opacity=1, const unsigned int patternx=~0U, const unsigned int patterny=~0U)
 Draw a labeled horizontal+vertical axis on the instance image.
template<typename tc >
CImg< T > & draw_axes (const float x0, const float x1, const float y0, const float y1, const tc *const color, const float opacity=1, const int subdivisionx=-60, const int subdivisiony=-60, const float precisionx=0, const float precisiony=0, const unsigned int patternx=~0U, const unsigned int patterny=~0U)
 Draw a labeled horizontal+vertical axis on the instance image.
template<typename tx , typename ty , typename tc >
CImg< T > & draw_grid (const CImg< tx > &xvalues, const CImg< ty > &yvalues, const tc *const color, const float opacity=1, const unsigned int patternx=~0U, const unsigned int patterny=~0U)
 Draw grid.
template<typename tc >
CImg< T > & draw_grid (const float deltax, const float deltay, const float offsetx, const float offsety, const bool invertx, const bool inverty, const tc *const color, const float opacity=1, const unsigned int patternx=~0U, const unsigned int patterny=~0U)
 Draw grid.
template<typename t , typename tc >
CImg< T > & draw_graph (const CImg< t > &data, const tc *const color, const float opacity=1, const unsigned int plot_type=1, const int vertex_type=1, const double ymin=0, const double ymax=0, const bool expand=false, const unsigned int pattern=~0U)
 Draw a 1d graph on the instance image.
template<typename tc , typename t >
CImg< T > & draw_fill (const int x, const int y, const int z, const tc *const color, const float opacity, CImg< t > &region, const float sigma=0, const bool high_connexity=false)
 Draw a 3d filled region starting from a point (x,y,\ z) in the instance image.
template<typename tc >
CImg< T > & draw_fill (const int x, const int y, const int z, const tc *const color, const float opacity=1, const float sigma=0, const bool high_connexity=false)
 Draw a 3d filled region starting from a point (x,y,\ z) in the instance image.
template<typename tc >
CImg< T > & draw_fill (const int x, const int y, const tc *const color, const float opacity=1, const float sigma=0, const bool high_connexity=false)
 Draw a 2d filled region starting from a point (x,y) in the instance image.
CImg< T > & draw_plasma (const int x0, const int y0, const int x1, const int y1, const float alpha=1, const float beta=1, const float opacity=1)
 Draw a plasma random texture.
CImg< T > & draw_plasma (const float alpha=1, const float beta=1, const float opacity=1)
 Draw a plasma random texture.
template<typename tc >
CImg< T > & draw_mandelbrot (const int x0, const int y0, const int x1, const int y1, const CImg< tc > &color_palette, const float opacity=1, const double z0r=-2, const double z0i=-2, const double z1r=2, const double z1i=2, const unsigned int iteration_max=255, const bool normalized_iteration=false, const bool julia_set=false, const double paramr=0, const double parami=0)
 Draw a quadratic Mandelbrot or Julia fractal set, computed using the Escape Time Algorithm.
template<typename tc >
CImg< T > & draw_mandelbrot (const CImg< tc > &color_palette, const float opacity=1, const double z0r=-2, const double z0i=-2, const double z1r=2, const double z1i=2, const unsigned int iteration_max=255, const bool normalized_iteration=false, const bool julia_set=false, const double paramr=0, const double parami=0)
 Draw a quadratic Mandelbrot or Julia fractal set, computed using the Escape Time Algorithm.
template<typename tc >
CImg< T > & draw_gaussian (const float xc, const float sigma, const tc *const color, const float opacity=1)
 Draw a 1d gaussian function in the instance image.
template<typename t , typename tc >
CImg< T > & draw_gaussian (const float xc, const float yc, const CImg< t > &tensor, const tc *const color, const float opacity=1)
 Draw an anisotropic 2d gaussian function.
template<typename tc >
CImg< T > & draw_gaussian (const int xc, const int yc, const float r1, const float r2, const float ru, const float rv, const tc *const color, const float opacity=1)
 Draw an anisotropic 2d gaussian function.
template<typename tc >
CImg< T > & draw_gaussian (const float xc, const float yc, const float sigma, const tc *const color, const float opacity=1)
 Draw an isotropic 2d gaussian function.
template<typename t , typename tc >
CImg< T > & draw_gaussian (const float xc, const float yc, const float zc, const CImg< t > &tensor, const tc *const color, const float opacity=1)
 Draw an anisotropic 3d gaussian function.
template<typename tc >
CImg< T > & draw_gaussian (const float xc, const float yc, const float zc, const float sigma, const tc *const color, const float opacity=1)
 Draw an isotropic 3d gaussian function.
template<typename tp , typename tf , typename tc , typename to >
CImg< T > & draw_object3d (const float x0, const float y0, const float z0, const CImg< tp > &vertices, const CImgList< tf > &primitives, const CImgList< tc > &colors, const CImg< to > &opacities, const unsigned int render_type=4, const bool double_sided=false, const float focale=500, const float lightx=0, const float lighty=0, const float lightz=-5000, const float specular_light=0.2f, const float specular_shine=0.1f, CImg< floatT > &zbuffer=cimg_library::CImg< floatT >::empty())
 Draw a 3d object.
template<typename tp , typename tf , typename tc , typename to >
CImg< T > & draw_object3d (const float x0, const float y0, const float z0, const CImg< tp > &vertices, const CImgList< tf > &primitives, const CImgList< tc > &colors, const CImgList< to > &opacities, const unsigned int render_type=4, const bool double_sided=false, const float focale=500, const float lightx=0, const float lighty=0, const float lightz=-5000, const float specular_light=0.2f, const float specular_shine=0.1f, CImg< floatT > &zbuffer=cimg_library::CImg< floatT >::empty())
template<typename tp , typename tf , typename tc >
CImg< T > & draw_object3d (const float x0, const float y0, const float z0, const CImg< tp > &vertices, const CImgList< tf > &primitives, const CImgList< tc > &colors, const unsigned int render_type=4, const bool double_sided=false, const float focale=500, const float lightx=0, const float lighty=0, const float lightz=-5000, const float specular_light=0.2f, const float specular_shine=0.1f, CImg< floatT > &zbuffer=cimg_library::CImg< floatT >::empty())
 Draw a 3d object.
template<typename tc , typename to >
void __draw_object3d (const unsigned int n_primitive, const CImgList< to > &opacities, const CImg< tc > &color, const int nx0, const int ny0, const CImg< T > &sprite, const float opac)
template<typename tc , typename to >
void __draw_object3d (const unsigned int, const CImg< to > &, const CImg< tc > &, const int nx0, const int ny0, const CImg< T > &sprite, const float opac)
template<typename tp , typename tf , typename tc , typename to >
CImg< T > & _draw_object3d (void *const pboard, CImg< floatT > &zbuffer, const float X, const float Y, const float Z, const CImg< tp > &vertices, const CImgList< tf > &primitives, const CImgList< tc > &colors, const to &opacities, const unsigned int render_type, const bool double_sided, const float focale, const float lightx, const float lighty, const float lightz, const float specular_light, const float specular_shine)

Public Attributes

unsigned int _width
 Variable representing the width of the instance image (i.e. dimensions along the X-axis).
unsigned int _height
 Variable representing the height of the instance image (i.e. dimensions along the Y-axis).
unsigned int _depth
 Variable representing the depth of the instance image (i.e. dimensions along the Z-axis).
unsigned int _spectrum
 Variable representing the number of channels of the instance image (i.e. dimensions along the C-axis).
bool _is_shared
 Variable telling if pixel buffer of the instance image is shared with another one.
T * _data
 Pointer to the first pixel of the pixel buffer.

Constructors / Destructor / Instance Management



 ~CImg ()
 Destructor.
 CImg ()
 Default constructor.
 CImg (const unsigned int dx, const unsigned int dy=1, const unsigned int dz=1, const unsigned int dc=1)
 Constructs a new image with given size (dx,dy,dz,dc).
 CImg (const unsigned int dx, const unsigned int dy, const unsigned int dz, const unsigned int dc, const T val)
 Construct an image with given size (dx,dy,dz,dc) and with pixel having a default value val.
 CImg (const unsigned int dx, const unsigned int dy, const unsigned int dz, const unsigned int dc, const int val0, const int val1,...)
 Construct an image with given size (dx,dy,dz,dc) and with specified pixel values (int version).
 CImg (const unsigned int dx, const unsigned int dy, const unsigned int dz, const unsigned int dc, const double val0, const double val1,...)
 Construct an image with given size (dx,dy,dz,dc) and with specified pixel values (double version).
 CImg (const unsigned int dx, const unsigned int dy, const unsigned int dz, const unsigned int dc, const char *const values, const bool repeat_values)
 Construct an image with given size and with specified values given in a string.
template<typename t >
 CImg (const t *const data_buffer, const unsigned int dx, const unsigned int dy=1, const unsigned int dz=1, const unsigned int dc=1, const bool shared=false)
 Construct an image from a raw memory buffer.
 CImg (const T *const data_buffer, const unsigned int dx, const unsigned int dy=1, const unsigned int dz=1, const unsigned int dc=1, const bool shared=false)
 CImg (const char *const filename)
 Construct an image from an image file.
template<typename t >
 CImg (const CImg< t > &img)
 Default copy constructor.
 CImg (const CImg< T > &img)
template<typename t >
 CImg (const CImg< t > &img, const bool shared)
 Advanced copy constructor.
 CImg (const CImg< T > &img, const bool shared)
template<typename t >
 CImg (const CImg< t > &img, const char *const dimensions)
 Construct an image using dimensions of another image.
template<typename t >
 CImg (const CImg< t > &img, const char *const dimensions, const T val)
 Construct an image using dimensions of another image, and fill it with given values.
template<typename t >
 CImg (const CImg< t > &img, const char *const dimensions, const char *const values, const bool repeat_values)
 Construct an image using dimensions of another image, and fill it with given values.
 CImg (const CImgDisplay &disp)
 Construct an image from the content of a CImgDisplay instance.
CImg< T > get_shared ()
 Return a shared version of the instance image.
const CImg< T > get_shared () const
CImg< T > & clear ()
 In-place version of the default constructor (STL-compliant name).
CImg< T > & assign ()
 In-place version of the default constructor/destructor.
CImg< T > & assign (const unsigned int dx, const unsigned int dy=1, const unsigned int dz=1, const unsigned int dc=1)
 In-place version of the previous constructor.
CImg< T > & assign (const unsigned int dx, const unsigned int dy, const unsigned int dz, const unsigned int dc, const T val)
 In-place version of the previous constructor.
CImg< T > & assign (const unsigned int dx, const unsigned int dy, const unsigned int dz, const unsigned int dc, const int val0, const int val1,...)
 In-place version of the previous constructor.
CImg< T > & assign (const unsigned int dx, const unsigned int dy, const unsigned int dz, const unsigned int dc, const double val0, const double val1,...)
 In-place version of the previous constructor.
CImg< T > & assign (const unsigned int dx, const unsigned int dy, const unsigned int dz, const unsigned int dc, const char *const values, const bool repeat_values)
 In-place version of the corresponding constructor.
template<typename t >
CImg< T > & assign (const t *const data_buffer, const unsigned int dx, const unsigned int dy=1, const unsigned int dz=1, const unsigned int dc=1)
 In-place version of the previous constructor.
CImg< T > & assign (const T *const data_buffer, const unsigned int dx, const unsigned int dy=1, const unsigned int dz=1, const unsigned int dc=1)
template<typename t >
CImg< T > & assign (const t *const data_buffer, const unsigned int dx, const unsigned int dy, const unsigned int dz, const unsigned int dc, const bool shared)
 In-place version of the previous constructor, allowing to force the shared state of the instance image.
CImg< T > & assign (const T *const data_buffer, const unsigned int dx, const unsigned int dy, const unsigned int dz, const unsigned int dc, const bool shared)
CImg< T > & assign (const char *const filename)
 In-place version of the previous constructor.
template<typename t >
CImg< T > & assign (const CImg< t > &img)
 In-place version of the default copy constructor.
template<typename t >
CImg< T > & assign (const CImg< t > &img, const bool shared)
 In-place version of the advanced constructor.
template<typename t >
CImg< T > & assign (const CImg< t > &img, const char *const dimensions)
 In-place version of the previous constructor.
template<typename t >
CImg< T > & assign (const CImg< t > &img, const char *const dimensions, const T val)
 In-place version of the previous constructor.
template<typename t >
CImg< T > & assign (const CImg< t > &img, const char *const dimensions, const char *const values, const bool repeat_values)
 In-place version of the previous constructor.
CImg< T > & assign (const CImgDisplay &disp)
 In-place version of the previous constructor.
template<typename t >
CImg< t > & move_to (CImg< t > &img)
 Move the content of the instance image into another one in a way that memory copies are avoided if possible.
CImg< T > & move_to (CImg< T > &img)
template<typename t >
CImgList< t > & move_to (CImgList< t > &list, const unsigned int pos=~0U)
CImg< T > & swap (CImg< T > &img)
 Swap all fields of two images. Use with care !
static CImg< T > & empty ()
 Return a reference to an empty image.

Instance Characteristics



int width () const
 Return the number of columns of the instance image (size along the X-axis, i.e image width).
int height () const
 Return the number of rows of the instance image (size along the Y-axis, i.e image height).
int depth () const
 Return the number of slices of the instance image (size along the Z-axis).
int spectrum () const
 Return the number of vector channels of the instance image (size along the C-axis).
unsigned int size () const
 Return the number of image buffer elements.
T * data ()
 Return a pointer to the pixel buffer.
const T * data () const
T * data (const unsigned int x, const unsigned int y=0, const unsigned int z=0, const unsigned int c=0)
 Return a pointer to the pixel value located at (x,y,z,v).
const T * data (const unsigned int x, const unsigned int y=0, const unsigned int z=0, const unsigned int c=0) const
int offset (const int x, const int y=0, const int z=0, const int c=0) const
 Return the offset of the pixel coordinates (x,y,z,v) with respect to the data pointer data.
iterator begin ()
 Return an iterator to the first image pixel.
const_iterator begin () const
iterator end ()
 Return an iterator pointing after the last image pixel (STL-compliant name).
const_iterator end () const
const T & front () const
 Return reference to the first image pixel (STL-compliant name).
T & front ()
const T & back () const
 Return a reference to the last image pixel (STL-compliant name).
T & back ()
T & at (const int off, const T out_val)
 Read a pixel value with Dirichlet boundary conditions.
at (const int off, const T out_val) const
T & at (const int off)
 Read a pixel value with Neumann boundary conditions.
at (const int off) const
T & _at (const int off)
_at (const int off) const
T & atX (const int x, const int y, const int z, const int c, const T out_val)
 Read a pixel value with Dirichlet boundary conditions for the first coordinates (x).
atX (const int x, const int y, const int z, const int c, const T out_val) const
T & atX (const int x, const int y=0, const int z=0, const int c=0)
 Read a pixel value with Neumann boundary conditions for the first coordinates (x).
atX (const int x, const int y=0, const int z=0, const int c=0) const
T & _atX (const int x, const int y=0, const int z=0, const int c=0)
_atX (const int x, const int y=0, const int z=0, const int c=0) const
T & atXY (const int x, const int y, const int z, const int c, const T out_val)
 Read a pixel value with Dirichlet boundary conditions for the two first coordinates (x,y).
atXY (const int x, const int y, const int z, const int c, const T out_val) const
T & atXY (const int x, const int y, const int z=0, const int c=0)
 Read a pixel value with Neumann boundary conditions for the two first coordinates (x,y).
atXY (const int x, const int y, const int z=0, const int c=0) const
T & _atXY (const int x, const int y, const int z=0, const int c=0)
_atXY (const int x, const int y, const int z=0, const int c=0) const
T & atXYZ (const int x, const int y, const int z, const int c, const T out_val)
 Read a pixel value with Dirichlet boundary conditions for the three first coordinates (x,y,z).
atXYZ (const int x, const int y, const int z, const int c, const T out_val) const
T & atXYZ (const int x, const int y, const int z, const int c=0)
 Read a pixel value with Neumann boundary conditions for the three first coordinates (x,y,z).
atXYZ (const int x, const int y, const int z, const int c=0) const
T & _atXYZ (const int x, const int y, const int z, const int c=0)
_atXYZ (const int x, const int y, const int z, const int c=0) const
T & atXYZC (const int x, const int y, const int z, const int c, const T out_val)
 Read a pixel value with Dirichlet boundary conditions.
atXYZC (const int x, const int y, const int z, const int c, const T out_val) const
T & atXYZC (const int x, const int y, const int z, const int c)
 Read a pixel value with Neumann boundary conditions.
atXYZC (const int x, const int y, const int z, const int c) const
T & _atXYZC (const int x, const int y, const int z, const int c)
_atXYZC (const int x, const int y, const int z, const int c) const
Tfloat linear_atX (const float fx, const int y, const int z, const int c, const T out_val) const
 Read a pixel value using linear interpolation and Dirichlet boundary conditions (first coordinate).
Tfloat linear_atX (const float fx, const int y=0, const int z=0, const int c=0) const
 Read a pixel value using linear interpolation and Neumann boundary conditions (first coordinate).
Tfloat _linear_atX (const float fx, const int y=0, const int z=0, const int c=0) const
Tfloat linear_atXY (const float fx, const float fy, const int z, const int c, const T out_val) const
 Read a pixel value using linear interpolation and Dirichlet boundary conditions (first two coordinates).
Tfloat linear_atXY (const float fx, const float fy, const int z=0, const int c=0) const
 Read a pixel value using linear interpolation and Neumann boundary conditions (first two coordinates).
Tfloat _linear_atXY (const float fx, const float fy, const int z=0, const int c=0) const
Tfloat linear_atXYZ (const float fx, const float fy, const float fz, const int c, const T out_val) const
 Read a pixel value using linear interpolation and Dirichlet boundary conditions (first three coordinates).
Tfloat linear_atXYZ (const float fx, const float fy=0, const float fz=0, const int c=0) const
 Read a pixel value using linear interpolation and Neumann boundary conditions (first three coordinates).
Tfloat _linear_atXYZ (const float fx, const float fy=0, const float fz=0, const int c=0) const
Tfloat linear_atXYZC (const float fx, const float fy, const float fz, const float fc, const T out_val) const
 Read a pixel value using linear interpolation and Dirichlet boundary conditions.
Tfloat linear_atXYZC (const float fx, const float fy=0, const float fz=0, const float fc=0) const
 Read a pixel value using linear interpolation and Neumann boundary conditions.
Tfloat _linear_atXYZC (const float fx, const float fy=0, const float fz=0, const float fc=0) const
Tfloat cubic_atX (const float fx, const int y, const int z, const int c, const T out_val) const
 Read a pixel value using cubic interpolation and Dirichlet boundary conditions (first coordinates).
Tfloat cubic_atX (const float fx, const int y, const int z, const int c, const T out_val, const Tfloat min_val, const Tfloat max_val) const
 Read a pixel value using cubic interpolation and Dirichlet boundary conditions (first coordinates).
Tfloat cubic_atX (const float fx, const int y=0, const int z=0, const int c=0) const
 Read a pixel value using cubic interpolation and Neumann boundary conditions (first coordinates).
Tfloat cubic_atX (const float fx, const int y, const int z, const int c, const Tfloat min_val, const Tfloat max_val) const
 Read a pixel value using cubic interpolation and Neumann boundary conditions (first coordinates).
Tfloat _cubic_atX (const float fx, const int y=0, const int z=0, const int c=0) const
 Read a pixel value using cubic interpolation and Neumann boundary conditions (first coordinates).
Tfloat _cubic_atX (const float fx, const int y, const int z, const int c, const Tfloat min_val, const Tfloat max_val) const
 Read a pixel value using cubic interpolation and Neumann boundary conditions (first coordinates).
Tfloat cubic_atXY (const float fx, const float fy, const int z, const int c, const T out_val) const
 Read a pixel value using cubic interpolation and Dirichlet boundary conditions.
Tfloat cubic_atXY (const float fx, const float fy, const int z, const int c, const T out_val, const Tfloat min_val, const Tfloat max_val) const
 Read a pixel value using cubic interpolation and Dirichlet boundary conditions.
Tfloat cubic_atXY (const float fx, const float fy, const int z=0, const int c=0) const
 Read a pixel value using cubic interpolation and Neumann boundary conditions.
Tfloat cubic_atXY (const float fx, const float fy, const int z, const int c, const Tfloat min_val, const Tfloat max_val) const
 Read a pixel value using cubic interpolation and Neumann boundary conditions.
Tfloat _cubic_atXY (const float fx, const float fy, const int z=0, const int c=0) const
 Read a pixel value using cubic interpolation and Neumann boundary conditions.
Tfloat _cubic_atXY (const float fx, const float fy, const int z, const int c, const Tfloat min_val, const Tfloat max_val) const
 Read a pixel value using cubic interpolation and Neumann boundary conditions.
Tfloat cubic_atXYZ (const float fx, const float fy, const float fz, const int c, const T out_val) const
 Read a pixel value using cubic interpolation and Dirichlet boundary conditions.
Tfloat cubic_atXYZ (const float fx, const float fy, const float fz, const int c, const T out_val, const Tfloat min_val, const Tfloat max_val) const
 Read a pixel value using cubic interpolation and Dirichlet boundary conditions.
Tfloat cubic_atXYZ (const float fx, const float fy, const float fz, const int c=0) const
 Read a pixel value using cubic interpolation and Neumann boundary conditions.
Tfloat cubic_atXYZ (const float fx, const float fy, const float fz, const int c, const Tfloat min_val, const Tfloat max_val) const
 Read a pixel value using cubic interpolation and Neumann boundary conditions.
Tfloat _cubic_atXYZ (const float fx, const float fy, const float fz, const int c=0) const
 Read a pixel value using cubic interpolation and Neumann boundary conditions.
Tfloat _cubic_atXYZ (const float fx, const float fy, const float fz, const int c, const Tfloat min_val, const Tfloat max_val) const
 Read a pixel value using cubic interpolation and Neumann boundary conditions.
CImg< T > & set_linear_atXYZ (const T &val, const float fx, const float fy=0, const float fz=0, const int c=0, const bool add=false)
 Set a pixel value, with 3d float coordinates, using linear interpolation.
CImg< T > & set_linear_atXY (const T &val, const float fx, const float fy=0, const int z=0, const int c=0, const bool add=false)
 Set a pixel value, with 2d float coordinates, using linear interpolation.
CImg< charT > value_string (const char separator=',', const unsigned int max_size=0) const
 Return a C-string containing the values of the instance image.
static const char * pixel_type ()
 Return the type of the pixel values.

Instance Checking



bool is_shared () const
 Return true if current image has shared memory.
bool is_empty () const
 Return true if current image is empty.
bool is_sameX (const unsigned int dx) const
 Return true if image (*this) has the specified width.
template<typename t >
bool is_sameX (const CImg< t > &img) const
 Return true if images (*this) and img have same width.
bool is_sameX (const CImgDisplay &disp) const
 Return true if images (*this) and the display disp have same width.
bool is_sameY (const unsigned int dy) const
 Return true if image (*this) has the specified height.
template<typename t >
bool is_sameY (const CImg< t > &img) const
 Return true if images (*this) and img have same height.
bool is_sameY (const CImgDisplay &disp) const
 Return true if images (*this) and the display disp have same height.
bool is_sameZ (const unsigned int dz) const
 Return true if image (*this) has the specified depth.
template<typename t >
bool is_sameZ (const CImg< t > &img) const
 Return true if images (*this) and img have same depth.
bool is_sameC (const unsigned int dc) const
 Return true if image (*this) has the specified number of channels.
template<typename t >
bool is_sameC (const CImg< t > &img) const
 Return true if images (*this) and img have same _spectrum.
bool is_sameXY (const unsigned int dx, const unsigned int dy) const
 Return true if image (*this) has the specified width and height.
template<typename t >
bool is_sameXY (const CImg< t > &img) const
 Return true if images have same width and same height.
bool is_sameXY (const CImgDisplay &disp) const
 Return true if image (*this) and the display disp have same width and same height.
bool is_sameXZ (const unsigned int dx, const unsigned int dz) const
 Return true if image (*this) has the specified width and depth.
template<typename t >
bool is_sameXZ (const CImg< t > &img) const
 Return true if images have same width and same depth.
bool is_sameXC (const unsigned int dx, const unsigned int dc) const
 Return true if image (*this) has the specified width and number of channels.
template<typename t >
bool is_sameXC (const CImg< t > &img) const
 Return true if images have same width and same number of channels.
bool is_sameYZ (const unsigned int dy, const unsigned int dz) const
 Return true if image (*this) has the specified height and depth.
template<typename t >
bool is_sameYZ (const CImg< t > &img) const
 Return true if images have same height and same depth.
bool is_sameYC (const unsigned int dy, const unsigned int dc) const
 Return true if image (*this) has the specified height and number of channels.
template<typename t >
bool is_sameYC (const CImg< t > &img) const
 Return true if images have same height and same number of channels.
bool is_sameZC (const unsigned int dz, const unsigned int dc) const
 Return true if image (*this) has the specified depth and number of channels.
template<typename t >
bool is_sameZC (const CImg< t > &img) const
 Return true if images have same depth and same number of channels.
bool is_sameXYZ (const unsigned int dx, const unsigned int dy, const unsigned int dz) const
 Return true if image (*this) has the specified width, height and depth.
template<typename t >
bool is_sameXYZ (const CImg< t > &img) const
 Return true if images have same width, same height and same depth.
bool is_sameXYC (const unsigned int dx, const unsigned int dy, const unsigned int dc) const
 Return true if image (*this) has the specified width, height and depth.
template<typename t >
bool is_sameXYC (const CImg< t > &img) const
 Return true if images have same width, same height and same number of channels.
bool is_sameXZC (const unsigned int dx, const unsigned int dz, const unsigned int dc) const
 Return true if image (*this) has the specified width, height and number of channels.
template<typename t >
bool is_sameXZC (const CImg< t > &img) const
 Return true if images have same width, same depth and same number of channels.
bool is_sameYZC (const unsigned int dy, const unsigned int dz, const unsigned int dc) const
 Return true if image (*this) has the specified height, depth and number of channels.
template<typename t >
bool is_sameYZC (const CImg< t > &img) const
 Return true if images have same heigth, same depth and same number of channels.
bool is_sameXYZC (const unsigned int dx, const unsigned int dy, const unsigned int dz, const unsigned int dc) const
 Return true if image (*this) has the specified width, height, depth and number of channels.
template<typename t >
bool is_sameXYZC (const CImg< t > &img) const
 Return true if images (*this) and img have same width, same height, same depth and same number of channels.
bool containsXYZC (const int x, const int y=0, const int z=0, const int c=0) const
 Return true if pixel (x,y,z,c) is inside image boundaries.
template<typename t >
bool contains (const T &pixel, t &x, t &y, t &z, t &c) const
 Return true if specified referenced value is inside image boundaries. If true, returns pixel coordinates in (x,y,z,c).
template<typename t >
bool contains (const T &pixel, t &x, t &y, t &z) const
 Return true if specified referenced value is inside image boundaries. If true, returns pixel coordinates in (x,y,z).
template<typename t >
bool contains (const T &pixel, t &x, t &y) const
 Return true if specified referenced value is inside image boundaries. If true, returns pixel coordinates in (x,y).
template<typename t >
bool contains (const T &pixel, t &x) const
 Return true if specified referenced value is inside image boundaries. If true, returns pixel coordinates in (x).
bool contains (const T &pixel) const
 Return true if specified referenced value is inside the image boundaries.
template<typename t >
bool is_overlapped (const CImg< t > &img) const
 Return true if the memory buffers of the two images overlaps.
template<typename tp , typename tc , typename to >
bool is_object3d (const CImgList< tp > &primitives, const CImgList< tc > &colors, const to &opacities, const bool full_check=true, char *const error_message=0) const
 Return true if the set (instance,primitives,colors,opacities) stands for a valid 3d object.
template<typename to >
bool _is_object3d (const CImgList< to > &opacities, char *const error_message) const
template<typename to >
bool _is_object3d (const CImg< to > &, char *const) const
bool is_CImg3d (const bool full_check=true, char *const error_message=0) const
 Test if an image is a valid CImg3d object.
static bool _is_CImg3d (const T val, const char c)

Vector / Matrix Operations



Tdouble magnitude (const int magnitude_type=2) const
 Return the norm of the current vector/matrix. ntype = norm type (0=L2, 1=L1, -1=Linf).
Tdouble trace () const
 Return the trace of the image, viewed as a matrix.
Tdouble det () const
 Return the determinant of the image, viewed as a matrix.
template<typename t >
Tdouble dot (const CImg< t > &img) const
 Return the dot product of the current vector/matrix with the vector/matrix img.
CImg< T > get_vector_at (const unsigned int x, const unsigned int y=0, const unsigned int z=0) const
 Return a new image corresponding to the vector located at (x,y,z) of the current vector-valued image.
CImg< T > get_matrix_at (const unsigned int x=0, const unsigned int y=0, const unsigned int z=0) const
 Return a new image corresponding to the square matrix located at (x,y,z) of the current vector-valued image.
CImg< T > get_tensor_at (const unsigned int x, const unsigned int y=0, const unsigned int z=0) const
 Return a new image corresponding to the diffusion tensor located at (x,y,z) of the current vector-valued image.
template<typename t >
CImg< T > & set_vector_at (const CImg< t > &vec, const unsigned int x, const unsigned int y=0, const unsigned int z=0)
 Set the image vec as the vector valued pixel located at (x,y,z) of the current vector-valued image.
template<typename t >
CImg< T > & set_matrix_at (const CImg< t > &mat, const unsigned int x=0, const unsigned int y=0, const unsigned int z=0)
 Set the image vec as the square matrix-valued pixel located at (x,y,z) of the current vector-valued image.
template<typename t >
CImg< T > & set_tensor_at (const CImg< t > &ten, const unsigned int x=0, const unsigned int y=0, const unsigned int z=0)
 Set the image vec as the tensor valued pixel located at (x,y,z) of the current vector-valued image.
CImg< T > & vector ()
 Unroll all images values into a one-column vector.
CImg< T > get_vector () const
CImg< T > & matrix ()
 Realign pixel values of the instance image as a square matrix.
CImg< T > get_matrix () const
CImg< T > & tensor ()
 Realign pixel values of the instance image as a symmetric tensor.
CImg< T > get_tensor () const
CImg< T > & diagonal ()
 Get a diagonal matrix, whose diagonal coefficients are the coefficients of the input image.
CImg< T > get_diagonal () const
CImg< T > & identity_matrix ()
 Get an identity matrix having same dimension than instance image.
CImg< T > get_identity_matrix () const
CImg< T > & sequence (const T a0, const T a1)
 Return a N-numbered sequence vector from a0 to a1.
CImg< T > get_sequence (const T a0, const T a1) const
CImg< T > & transpose ()
 Transpose the current matrix.
CImg< T > get_transpose () const
template<typename t >
CImg< T > & cross (const CImg< t > &img)
 Compute the cross product between two 3d vectors.
template<typename t >
CImg< _cimg_Tt > get_cross (const CImg< t > &img) const
CImg< T > & invert (const bool use_LU=true)
 Invert the current matrix.
CImg< Tfloat > get_invert (const bool use_LU=true) const
CImg< T > & pseudoinvert ()
 Compute the pseudo-inverse (Moore-Penrose) of the matrix.
CImg< Tfloat > get_pseudoinvert () const
template<typename t >
CImg< T > & solve (const CImg< t > &A)
 Solve a linear system AX=B where B=*this.
template<typename t >
CImg< _cimg_Ttfloat > get_solve (const CImg< t > &A) const
template<typename t , typename ti >
CImg< T > & _solve (const CImg< t > &A, const CImg< ti > &indx)
template<typename t >
CImg< T > & solve_tridiagonal (const CImg< t > &a, const CImg< t > &b, const CImg< t > &c)
 Solve a linear system AX=B where B=*this and A is a tridiagonal matrix A = [ b0,c0,0,...; a1,b1,c1,0,... ; ... ; ...,0,aN,bN ].
template<typename t >
CImg< _cimg_Ttfloat > get_solve_tridiagonal (const CImg< t > &a, const CImg< t > &b, const CImg< t > &c) const
template<typename t >
const CImg< T > & eigen (CImg< t > &val, CImg< t > &vec) const
 Compute the eigenvalues and eigenvectors of a matrix.
CImgList< Tfloat > get_eigen () const
template<typename t >
const CImg< T > & symmetric_eigen (CImg< t > &val, CImg< t > &vec) const
 Compute the eigenvalues and eigenvectors of a symmetric matrix.
CImgList< Tfloat > get_symmetric_eigen () const
template<typename t >
CImg< T > & sort (CImg< t > &permutations, const bool increasing=true)
 Sort values of a vector and get permutations.
template<typename t >
CImg< T > get_sort (CImg< t > &permutations, const bool increasing=true) const
CImg< T > & sort (const bool increasing=true)
 Sort image values.
CImg< T > get_sort (const bool increasing=true) const
template<typename t >
CImg< T > & _quicksort (const int min, const int max, CImg< t > &permutations, const bool increasing)
template<typename t >
const CImg< T > & SVD (CImg< t > &U, CImg< t > &S, CImg< t > &V, const bool sorting=true, const unsigned int max_iteration=40, const float lambda=0) const
 Compute the SVD of a general matrix.
CImgList< Tfloat > get_SVD (const bool sorting=true, const unsigned int max_iteration=40, const float lambda=0) const
template<typename t >
CImg< T > & _LU (CImg< t > &indx, bool &d)
template<typename t >
CImg< T > & dijkstra (const unsigned int starting_node, const unsigned int ending_node, CImg< t > &previous)
 Return minimal path in a graph, using the Dijkstra algorithm.
template<typename t >
CImg< T > get_dijkstra (const unsigned int starting_node, const unsigned int ending_node, CImg< t > &previous) const
CImg< T > & dijkstra (const unsigned int starting_node, const unsigned int ending_node=~0U)
 Return minimal path in a graph, using the Dijkstra algorithm.
CImg< Tfloat > get_dijkstra (const unsigned int starting_node, const unsigned int ending_node=~0U) const
CImg< floatT > get_streamline (const float x, const float y, const float z, const float L=256, const float dl=0.1f, const unsigned int interpolation_type=2, const bool is_backward_tracking=false, const bool is_oriented_only=false) const
 Return stream line of a 2d or 3d vector field.
template<typename tf , typename t >
static CImg< T > dijkstra (const tf &distance, const unsigned int nb_nodes, const unsigned int starting_node, const unsigned int ending_node, CImg< t > &previous)
 Compute minimal path in a graph, using the Dijkstra algorithm.
template<typename tf , typename t >
static CImg< T > dijkstra (const tf &distance, const unsigned int nb_nodes, const unsigned int starting_node, const unsigned int ending_node=~0U)
 Return minimal path in a graph, using the Dijkstra algorithm.
template<typename tfunc >
static CImg< floatT > streamline (const tfunc &func, const float x, const float y, const float z, const float L=256, const float dl=0.1f, const unsigned int interpolation_type=2, const bool is_backward_tracking=false, const bool is_oriented_only=false, const float x0=0, const float y0=0, const float z0=0, const float x1=0, const float y1=0, const float z1=0)
 Return stream line of a 3d vector field.
static CImg< floatT > streamline (const char *const expression, const float x, const float y, const float z, const float L=256, const float dl=0.1f, const unsigned int interpolation_type=2, const bool is_backward_tracking=true, const bool is_oriented_only=false, const float x0=0, const float y0=0, const float z0=0, const float x1=0, const float y1=0, const float z1=0)
 Return stream line of a vector field.
static CImg< T > vector (const T &a0)
 Return a vector with specified coefficients.
static CImg< T > vector (const T &a0, const T &a1)
 Return a vector with specified coefficients.
static CImg< T > vector (const T &a0, const T &a1, const T &a2)
 Return a vector with specified coefficients.
static CImg< T > vector (const T &a0, const T &a1, const T &a2, const T &a3)
 Return a vector with specified coefficients.
static CImg< T > vector (const T &a0, const T &a1, const T &a2, const T &a3, const T &a4)
 Return a vector with specified coefficients.
static CImg< T > vector (const T &a0, const T &a1, const T &a2, const T &a3, const T &a4, const T &a5)
 Return a vector with specified coefficients.
static CImg< T > vector (const T &a0, const T &a1, const T &a2, const T &a3, const T &a4, const T &a5, const T &a6)
 Return a vector with specified coefficients.
static CImg< T > vector (const T &a0, const T &a1, const T &a2, const T &a3, const T &a4, const T &a5, const T &a6, const T &a7)
 Return a vector with specified coefficients.
static CImg< T > vector (const T &a0, const T &a1, const T &a2, const T &a3, const T &a4, const T &a5, const T &a6, const T &a7, const T &a8)
 Return a vector with specified coefficients.
static CImg< T > vector (const T &a0, const T &a1, const T &a2, const T &a3, const T &a4, const T &a5, const T &a6, const T &a7, const T &a8, const T &a9)
 Return a vector with specified coefficients.
static CImg< T > vector (const T &a0, const T &a1, const T &a2, const T &a3, const T &a4, const T &a5, const T &a6, const T &a7, const T &a8, const T &a9, const T &a10)
 Return a vector with specified coefficients.
static CImg< T > vector (const T &a0, const T &a1, const T &a2, const T &a3, const T &a4, const T &a5, const T &a6, const T &a7, const T &a8, const T &a9, const T &a10, const T &a11)
 Return a vector with specified coefficients.
static CImg< T > vector (const T &a0, const T &a1, const T &a2, const T &a3, const T &a4, const T &a5, const T &a6, const T &a7, const T &a8, const T &a9, const T &a10, const T &a11, const T &a12)
 Return a vector with specified coefficients.
static CImg< T > vector (const T &a0, const T &a1, const T &a2, const T &a3, const T &a4, const T &a5, const T &a6, const T &a7, const T &a8, const T &a9, const T &a10, const T &a11, const T &a12, const T &a13)
 Return a vector with specified coefficients.
static CImg< T > vector (const T &a0, const T &a1, const T &a2, const T &a3, const T &a4, const T &a5, const T &a6, const T &a7, const T &a8, const T &a9, const T &a10, const T &a11, const T &a12, const T &a13, const T &a14)
 Return a vector with specified coefficients.
static CImg< T > vector (const T &a0, const T &a1, const T &a2, const T &a3, const T &a4, const T &a5, const T &a6, const T &a7, const T &a8, const T &a9, const T &a10, const T &a11, const T &a12, const T &a13, const T &a14, const T &a15)
 Return a vector with specified coefficients.
static CImg< T > matrix (const T &a0)
 Return a 1x1 square matrix with specified coefficients.
static CImg< T > matrix (const T &a0, const T &a1, const T &a2, const T &a3)
 Return a 2x2 square matrix with specified coefficients.
static CImg< T > matrix (const T &a0, const T &a1, const T &a2, const T &a3, const T &a4, const T &a5, const T &a6, const T &a7, const T &a8)
 Return a 3x3 square matrix with specified coefficients.
static CImg< T > matrix (const T &a0, const T &a1, const T &a2, const T &a3, const T &a4, const T &a5, const T &a6, const T &a7, const T &a8, const T &a9, const T &a10, const T &a11, const T &a12, const T &a13, const T &a14, const T &a15)
 Return a 4x4 square matrix with specified coefficients.
static CImg< T > matrix (const T &a0, const T &a1, const T &a2, const T &a3, const T &a4, const T &a5, const T &a6, const T &a7, const T &a8, const T &a9, const T &a10, const T &a11, const T &a12, const T &a13, const T &a14, const T &a15, const T &a16, const T &a17, const T &a18, const T &a19, const T &a20, const T &a21, const T &a22, const T &a23, const T &a24)
 Return a 5x5 square matrix with specified coefficients.
static CImg< T > tensor (const T &a1)
 Return a 1x1 symmetric matrix with specified coefficients.
static CImg< T > tensor (const T &a1, const T &a2, const T &a3)
 Return a 2x2 symmetric matrix tensor with specified coefficients.
static CImg< T > tensor (const T &a1, const T &a2, const T &a3, const T &a4, const T &a5, const T &a6)
 Return a 3x3 symmetric matrix with specified coefficients.
static CImg< T > diagonal (const T &a0)
 Return a 1x1 diagonal matrix with specified coefficients.
static CImg< T > diagonal (const T &a0, const T &a1)
 Return a 2x2 diagonal matrix with specified coefficients.
static CImg< T > diagonal (const T &a0, const T &a1, const T &a2)
 Return a 3x3 diagonal matrix with specified coefficients.
static CImg< T > diagonal (const T &a0, const T &a1, const T &a2, const T &a3)
 Return a 4x4 diagonal matrix with specified coefficients.
static CImg< T > diagonal (const T &a0, const T &a1, const T &a2, const T &a3, const T &a4)
 Return a 5x5 diagonal matrix with specified coefficients.
static CImg< T > identity_matrix (const unsigned int N)
 Return a NxN identity matrix.
static CImg< T > sequence (const unsigned int N, const T a0, const T a1)
 Return a N-numbered sequence vector from a0 to a1.
static CImg< T > rotation_matrix (const float x, const float y, const float z, const float w, const bool quaternion_data=false)
 Return a 3x3 rotation matrix along the (x,y,z)-axis with an angle w.

Color Base Management



CImg< T > & RGBtoHSV ()
 Convert color pixels from (R,G,B) to (H,S,V).
CImg< Tfloat > get_RGBtoHSV () const
CImg< T > & HSVtoRGB ()
 Convert color pixels from (H,S,V) to (R,G,B).
CImg< Tuchar > get_HSVtoRGB () const
CImg< T > & RGBtoHSL ()
 Convert color pixels from (R,G,B) to (H,S,L).
CImg< Tfloat > get_RGBtoHSL () const
CImg< T > & HSLtoRGB ()
 Convert color pixels from (H,S,L) to (R,G,B).
CImg< Tuchar > get_HSLtoRGB () const
CImg< T > & RGBtoHSI ()
CImg< Tfloat > get_RGBtoHSI () const
CImg< T > & HSItoRGB ()
 Convert color pixels from (H,S,I) to (R,G,B).
CImg< Tfloat > get_HSItoRGB () const
CImg< T > & RGBtoYCbCr ()
 Convert color pixels from (R,G,B) to (Y,Cb,Cr).
CImg< Tuchar > get_RGBtoYCbCr () const
CImg< T > & YCbCrtoRGB ()
 Convert color pixels from (R,G,B) to (Y,Cb,Cr).
CImg< Tuchar > get_YCbCrtoRGB () const
CImg< T > & RGBtoYUV ()
 Convert color pixels from (R,G,B) to (Y,U,V).
CImg< Tfloat > get_RGBtoYUV () const
CImg< T > & YUVtoRGB ()
 Convert color pixels from (Y,U,V) to (R,G,B).
CImg< Tuchar > get_YUVtoRGB () const
CImg< T > & RGBtoCMY ()
 Convert color pixels from (R,G,B) to (C,M,Y).
CImg< Tuchar > get_RGBtoCMY () const
CImg< T > & CMYtoRGB ()
 Convert (C,M,Y) pixels of a color image into the (R,G,B) color space.
CImg< Tuchar > get_CMYtoRGB () const
CImg< T > & CMYtoCMYK ()
 Convert color pixels from (C,M,Y) to (C,M,Y,K).
CImg< Tuchar > get_CMYtoCMYK () const
CImg< T > & CMYKtoCMY ()
 Convert (C,M,Y,K) pixels of a color image into the (C,M,Y) color space.
CImg< Tfloat > get_CMYKtoCMY () const
CImg< T > & RGBtoXYZ ()
 Convert color pixels from (R,G,B) to (X,Y,Z)_709.
CImg< Tfloat > get_RGBtoXYZ () const
CImg< T > & XYZtoRGB ()
 Convert (X,Y,Z)_709 pixels of a color image into the (R,G,B) color space.
CImg< Tuchar > get_XYZtoRGB () const
CImg< T > & XYZtoLab ()
 Convert (X,Y,Z)_709 pixels of a color image into the (L*,a*,b*) color space.
CImg< Tfloat > get_XYZtoLab () const
CImg< T > & LabtoXYZ ()
 Convert (L,a,b) pixels of a color image into the (X,Y,Z) color space.
CImg< Tfloat > get_LabtoXYZ () const
CImg< T > & XYZtoxyY ()
 Convert (X,Y,Z)_709 pixels of a color image into the (x,y,Y) color space.
CImg< Tfloat > get_XYZtoxyY () const
CImg< T > & xyYtoXYZ ()
 Convert (x,y,Y) pixels of a color image into the (X,Y,Z)_709 color space.
CImg< Tfloat > get_xyYtoXYZ () const
CImg< T > & RGBtoLab ()
 Convert a (R,G,B) image to a (L,a,b) one.
CImg< Tfloat > get_RGBtoLab () const
CImg< T > & LabtoRGB ()
 Convert a (L,a,b) image to a (R,G,B) one.
CImg< Tuchar > get_LabtoRGB () const
CImg< T > & RGBtoxyY ()
 Convert a (R,G,B) image to a (x,y,Y) one.
CImg< Tfloat > get_RGBtoxyY () const
CImg< T > & xyYtoRGB ()
 Convert a (x,y,Y) image to a (R,G,B) one.
CImg< Tuchar > get_xyYtoRGB () const
CImg< T > & RGBtoCMYK ()
 Convert a (R,G,B) image to a (C,M,Y,K) one.
CImg< Tfloat > get_RGBtoCMYK () const
CImg< T > & CMYKtoRGB ()
 Convert a (C,M,Y,K) image to a (R,G,B) one.
CImg< Tuchar > get_CMYKtoRGB () const
CImg< T > & RGBtoBayer ()
 Convert a (R,G,B) image to a Bayer-coded representation.
CImg< T > get_RGBtoBayer () const
CImg< T > & BayertoRGB (const unsigned int interpolation_type=3)
 Convert a Bayer-coded image to a (R,G,B) color image.
CImg< Tuchar > get_BayertoRGB (const unsigned int interpolation_type=3) const
static CImg< Tuchar > default_LUT256 ()
 Return a default indexed color palette with 256 (R,G,B) entries.
static CImg< Tuchar > rainbow_LUT256 ()
 Return a rainbow indexed color palette with 256 (R,G,B) entries.
static CImg< Tuchar > contrast_LUT256 ()
 Return a contrasted indexed color palette with 256 (R,G,B) entries.

Geometric / Spatial Manipulation



CImg< T > & resize (const int size_x, const int size_y=-100, const int size_z=-100, const int size_c=-100, const int interpolation_type=1, const unsigned int border_conditions=0, const float centering_x=0, const float centering_y=0, const float centering_z=0, const float centering_c=0)
 Resize an image.
CImg< T > get_resize (const int size_x, const int size_y=-100, const int size_z=-100, const int size_c=-100, const int interpolation_type=1, const unsigned int border_conditions=0, const float centering_x=0, const float centering_y=0, const float centering_z=0, const float centering_c=0) const
template<typename t >
CImg< T > & resize (const CImg< t > &src, const int interpolation_type=1, const unsigned int border_conditions=0, const float centering_x=0, const float centering_y=0, const float centering_z=0, const float centering_c=0)
 Resize an image.
template<typename t >
CImg< T > get_resize (const CImg< t > &src, const int interpolation_type=1, const unsigned int border_conditions=0, const float centering_x=0, const float centering_y=0, const float centering_z=0, const float centering_c=0) const
CImg< T > & resize (const CImgDisplay &disp, const int interpolation_type=1, const unsigned int border_conditions=0, const float centering_x=0, const float centering_y=0, const float centering_z=0, const float centering_c=0)
 Resize an image.
CImg< T > get_resize (const CImgDisplay &disp, const int interpolation_type=1, const unsigned int border_conditions=0, const float centering_x=0, const float centering_y=0, const float centering_z=0, const float centering_c=0) const
CImg< T > & resize_halfXY ()
 Half-resize an image, using a special optimized filter.
CImg< T > get_resize_halfXY () const
CImg< T > & resize_doubleXY ()
 Upscale an image by a factor 2x.
CImg< T > get_resize_doubleXY () const
CImg< T > & resize_tripleXY ()
 Upscale an image by a factor 3x.
CImg< T > get_resize_tripleXY () const
CImg< T > & mirror (const char axis)
 Mirror an image along the specified axis.
CImg< T > get_mirror (const char axis) const
CImg< T > & shift (const int deltax, const int deltay=0, const int deltaz=0, const int deltac=0, const int border_condition=0)
 Shift the image.
CImg< T > get_shift (const int deltax, const int deltay=0, const int deltaz=0, const int deltac=0, const int border_condition=0) const
template<typename t >
CImg< t > _get_permute_axes (const char *const permut, const t &) const
CImg< T > & permute_axes (const char *const order)
 Permute axes order.
CImg< T > get_permute_axes (const char *const order) const
CImg< T > & unroll (const char axis)
 Unroll all images values into specified axis.
CImg< T > get_unroll (const char axis) const
CImg< T > & rotate (const float angle, const unsigned int border_conditions=0, const unsigned int interpolation=1)
 Rotate an image.
CImg< T > get_rotate (const float angle, const unsigned int border_conditions=0, const unsigned int interpolation=1) const
CImg< T > & rotate (const float angle, const float cx, const float cy, const float zoom, const unsigned int border_conditions=3, const unsigned int interpolation=1)
 Rotate an image around a center point (cx,cy).
CImg< T > get_rotate (const float angle, const float cx, const float cy, const float zoom, const unsigned int border_conditions=3, const unsigned int interpolation=1) const
template<typename t >
CImg< T > & warp (const CImg< t > &warp, const bool relative=false, const bool interpolation=true, const unsigned int border_conditions=0)
 Warp an image.
template<typename t >
CImg< T > get_warp (const CImg< t > &warp, const bool relative=false, const bool interpolation=true, const unsigned int border_conditions=0) const
CImg< T > & projections2d (const unsigned int x0, const unsigned int y0, const unsigned int z0, const int dx=-100, const int dy=-100, const int dz=-100)
 Return a 2d representation of a 3d image, with three slices.
CImg< T > get_projections2d (const unsigned int x0, const unsigned int y0, const unsigned int z0, const int dx=-100, const int dy=-100, const int dz=-100) const
CImg< T > & crop (const int x0, const int y0, const int z0, const int c0, const int x1, const int y1, const int z1, const int c1, const bool border_condition=false)
 Get a square region of the image.
CImg< T > get_crop (const int x0, const int y0, const int z0, const int c0, const int x1, const int y1, const int z1, const int c1, const bool border_condition=false) const
CImg< T > & crop (const int x0, const int y0, const int z0, const int x1, const int y1, const int z1, const bool border_condition=false)
 Get a rectangular part of the instance image.
CImg< T > get_crop (const int x0, const int y0, const int z0, const int x1, const int y1, const int z1, const bool border_condition=false) const
CImg< T > & crop (const int x0, const int y0, const int x1, const int y1, const bool border_condition=false)
 Get a rectangular part of the instance image.
CImg< T > get_crop (const int x0, const int y0, const int x1, const int y1, const bool border_condition=false) const
CImg< T > & crop (const int x0, const int x1, const bool border_condition=false)
 Get a rectangular part of the instance image.
CImg< T > get_crop (const int x0, const int x1, const bool border_condition=false) const
CImg< T > & autocrop (const T value, const char *const axes="czyx")
 Autocrop an image, regarding of the specified backround value.
CImg< T > get_autocrop (const T value, const char *const axes="czyx") const
CImg< T > & autocrop (const T *const color, const char *const axes="zyx")
 Autocrop an image, regarding of the specified backround color.
CImg< T > get_autocrop (const T *const color, const char *const axes="zyx") const
template<typename t >
CImg< T > & autocrop (const CImg< t > &color, const char *const axes="zyx")
 Autocrop an image, regarding of the specified backround color.
template<typename t >
CImg< T > get_autocrop (const CImg< t > &color, const char *const axes="zyx") const
CImg< intT > _autocrop (const T value, const char axis) const
CImg< T > & column (const unsigned int x0)
 Get one column.
CImg< T > get_column (const unsigned int x0) const
CImg< T > & columns (const unsigned int x0, const unsigned int x1)
 Get a set of columns.
CImg< T > get_columns (const unsigned int x0, const unsigned int x1) const
CImg< T > & line (const unsigned int y0)
 Get a line.
CImg< T > get_line (const unsigned int y0) const
CImg< T > & lines (const unsigned int y0, const unsigned int y1)
 Get a set of lines.
CImg< T > get_lines (const unsigned int y0, const unsigned int y1) const
CImg< T > & slice (const unsigned int z0)
 Get a slice.
CImg< T > get_slice (const unsigned int z0) const
CImg< T > & slices (const unsigned int z0, const unsigned int z1)
 Get a set of slices.
CImg< T > get_slices (const unsigned int z0, const unsigned int z1) const
CImg< T > & channel (const unsigned int c0)
 Get a channel.
CImg< T > get_channel (const unsigned int c0) const
CImg< T > & channels (const unsigned int c0, const unsigned int c1)
 Get a set of channels.
CImg< T > get_channels (const unsigned int c0, const unsigned int c1) const
CImg< T > get_shared_points (const unsigned int x0, const unsigned int x1, const unsigned int y0=0, const unsigned int z0=0, const unsigned int c0=0)
 Get a shared-memory image referencing a set of points of the instance image.
const CImg< T > get_shared_points (const unsigned int x0, const unsigned int x1, const unsigned int y0=0, const unsigned int z0=0, const unsigned int c0=0) const
CImg< T > get_shared_lines (const unsigned int y0, const unsigned int y1, const unsigned int z0=0, const unsigned int c0=0)
 Return a shared-memory image referencing a set of lines of the instance image.
const CImg< T > get_shared_lines (const unsigned int y0, const unsigned int y1, const unsigned int z0=0, const unsigned int c0=0) const
CImg< T > get_shared_line (const unsigned int y0, const unsigned int z0=0, const unsigned int c0=0)
 Return a shared-memory image referencing one particular line (y0,z0,c0) of the instance image.
const CImg< T > get_shared_line (const unsigned int y0, const unsigned int z0=0, const unsigned int c0=0) const
CImg< T > get_shared_planes (const unsigned int z0, const unsigned int z1, const unsigned int c0=0)
 Return a shared memory image referencing a set of planes (z0->z1,c0) of the instance image.
const CImg< T > get_shared_planes (const unsigned int z0, const unsigned int z1, const unsigned int c0=0) const
CImg< T > get_shared_plane (const unsigned int z0, const unsigned int c0=0)
 Return a shared-memory image referencing one plane (z0,c0) of the instance image.
const CImg< T > get_shared_plane (const unsigned int z0, const unsigned int c0=0) const
CImg< T > get_shared_channels (const unsigned int c0, const unsigned int c1)
 Return a shared-memory image referencing a set of channels (c0->c1) of the instance image.
const CImg< T > get_shared_channels (const unsigned int c0, const unsigned int c1) const
CImg< T > get_shared_channel (const unsigned int c0)
 Return a shared-memory image referencing one channel c0 of the instance image.
const CImg< T > get_shared_channel (const unsigned int c0) const
CImgList< T > get_split (const char axis, const int nb=0) const
 Split image into a list.
CImgList< T > get_split (const T value, const bool keep_values, const bool shared, const char axis='y') const
template<typename t >
CImg< T > & append (const CImg< t > &img, const char axis='x', const char align='p')
 Append an image.
CImg< T > & append (const CImg< T > &img, const char axis='x', const char align='p')
template<typename t >
CImg< _cimg_Tt > get_append (const CImg< T > &img, const char axis='x', const char align='p') const
CImg< T > get_append (const CImg< T > &img, const char axis='x', const char align='p') const
static float _cimg_lanczos (const float x)

Filtering / Transforms



template<typename t >
CImg< T > & correlate (const CImg< t > &mask, const unsigned int cond=1, const bool weighted_correl=false)
 Compute the correlation of the instance image by a mask.
template<typename t >
CImg< _cimg_Ttfloat > get_correlate (const CImg< t > &mask, const unsigned int cond=1, const bool weighted_correl=false) const
template<typename t >
CImg< T > & convolve (const CImg< t > &mask, const unsigned int cond=1, const bool weighted_convol=false)
 Compute the convolution of the image by a mask.
template<typename t >
CImg< _cimg_Ttfloat > get_convolve (const CImg< t > &mask, const unsigned int cond=1, const bool weighted_convol=false) const
template<typename t >
CImg< T > & erode (const CImg< t > &mask, const unsigned int cond=1, const bool weighted_erosion=false)
 Return the erosion of the image by a structuring element.
template<typename t >
CImg< _cimg_Tt > get_erode (const CImg< t > &mask, const unsigned int cond=1, const bool weighted_erosion=false) const
CImg< T > & erode (const unsigned int sx, const unsigned int sy, const unsigned int sz=1)
 Erode the image by a rectangular structuring element of size sx,sy,sz.
CImg< T > get_erode (const unsigned int sx, const unsigned int sy, const unsigned int sz=1) const
CImg< T > & erode (const unsigned int s)
 Erode the image by a square structuring element of size sx.
CImg< T > get_erode (const unsigned int s) const
template<typename t >
CImg< T > & dilate (const CImg< t > &mask, const unsigned int cond=1, const bool weighted_dilatation=false)
 Dilate the image by a structuring element.
template<typename t >
CImg< _cimg_Tt > get_dilate (const CImg< t > &mask, const unsigned int cond=1, const bool weighted_dilatation=false) const
CImg< T > & dilate (const unsigned int sx, const unsigned int sy, const unsigned int sz=1)
 Dilate the image by a rectangular structuring element of size sx,sy,sz.
CImg< T > get_dilate (const unsigned int sx, const unsigned int sy, const unsigned int sz=1) const
CImg< T > & dilate (const unsigned int s)
 Erode the image by a square structuring element of size sx.
CImg< T > get_dilate (const unsigned int s) const
template<typename t >
CImg< T > & watershed (const CImg< t > &priority, const bool fill_lines=true)
 Compute the watershed transform, from an instance image of non-zero labels.
template<typename t >
CImg< T > get_watershed (const CImg< t > &priority, const bool fill_lines=true) const
template<typename t >
CImg< T > & _watershed_insert (CImg< boolT > &in_queue, unsigned int &siz, const t value, const unsigned int x, const unsigned int y, const unsigned int z)
CImg< T > & _watershed_remove (unsigned int &siz)
CImg< T > & deriche (const float sigma, const int order=0, const char axis='x', const bool cond=true)
 Compute the result of the Deriche filter.
CImg< Tfloat > get_deriche (const float sigma, const int order=0, const char axis='x', const bool cond=true) const
CImg< T > & blur (const float sigmax, const float sigmay, const float sigmaz, const bool cond=true)
 Return a blurred version of the image, using a Canny-Deriche filter.
CImg< Tfloat > get_blur (const float sigmax, const float sigmay, const float sigmaz, const bool cond=true) const
CImg< T > & blur (const float sigma, const bool cond=true)
 Return a blurred version of the image, using a Canny-Deriche filter.
CImg< Tfloat > get_blur (const float sigma, const bool cond=true) const
template<typename t >
CImg< T > & blur_anisotropic (const CImg< t > &G, const float amplitude=60, const float dl=0.8f, const float da=30, const float gauss_prec=2, const unsigned int interpolation_type=0, const bool fast_approx=1)
 Blur the image anisotropically following a field of diffusion tensors.
template<typename t >
CImg< T > get_blur_anisotropic (const CImg< t > &G, const float amplitude=60, const float dl=0.8f, const float da=30, const float gauss_prec=2, const unsigned int interpolation_type=0, const bool fast_approx=true) const
CImg< T > & blur_anisotropic (const float amplitude, const float sharpness=0.7f, const float anisotropy=0.6f, const float alpha=0.6f, const float sigma=1.1f, const float dl=0.8f, const float da=30, const float gauss_prec=2, const unsigned int interpolation_type=0, const bool fast_approx=true)
 Blur an image following in an anisotropic way.
CImg< T > get_blur_anisotropic (const float amplitude, const float sharpness=0.7f, const float anisotropy=0.6f, const float alpha=0.6f, const float sigma=1.1f, const float dl=0.8f, const float da=30, const float gauss_prec=2, const unsigned int interpolation_type=0, const bool fast_approx=true) const
CImg< T > & blur_bilateral (const float sigma_x, const float sigma_y, const float sigma_z, const float sigma_r, const int bgrid_x, const int bgrid_y, const int bgrid_z, const int bgrid_r, const bool interpolation_type=true)
 Blur an image using the bilateral filter.
CImg< T > get_blur_bilateral (const float sigma_x, const float sigma_y, const float sigma_z, const float sigma_r, const int bgrid_x, const int bgrid_y, const int bgrid_z, const int bgrid_r, const bool interpolation_type=true) const
CImg< T > & blur_bilateral (const float sigma_s, const float sigma_r, const int bgrid_s=-33, const int bgrid_r=32, const bool interpolation_type=true)
 Blur an image using the bilateral filter.
CImg< T > get_blur_bilateral (const float sigma_s, const float sigma_r, const int bgrid_s=-33, const int bgrid_r=32, const bool interpolation_type=true) const
CImg< T > & blur_patch (const float sigma_s, const float sigma_p, const unsigned int patch_size=3, const unsigned int lookup_size=4, const float smoothness=0, const bool fast_approx=true)
 Blur an image in its patch-based space.
CImg< T > get_blur_patch (const float sigma_s, const float sigma_p, const unsigned int patch_size=3, const unsigned int lookup_size=4, const float smoothness=0, const bool fast_approx=true) const
CImg< T > & blur_median (const unsigned int n)
 Apply a median filter.
CImg< T > get_blur_median (const unsigned int n) const
CImg< T > & sharpen (const float amplitude, const bool sharpen_type=false, const float edge=1, const float alpha=0, const float sigma=0)
 Sharpen image using anisotropic shock filters or inverse diffusion.
CImg< T > get_sharpen (const float amplitude, const bool sharpen_type=false, const float edge=1, const float alpha=0, const float sigma=0) const
CImgList< Tfloat > get_gradient (const char *const axes=0, const int scheme=3) const
 Compute the list of images, corresponding to the XY-gradients of an image.
CImgList< Tfloat > get_hessian (const char *const axes=0) const
 Get components of the Hessian matrix of an image.
CImg< T > & laplacian ()
 Compute the laplacian of the instance image.
CImg< Tfloat > get_laplacian () const
CImg< T > & structure_tensors (const unsigned int scheme=1)
 Compute the structure tensor field of an image.
CImg< Tfloat > get_structure_tensors (const unsigned int scheme=1) const
CImg< T > & edge_tensors (const float sharpness=0.7f, const float anisotropy=0.6f, const float alpha=0.6f, const float sigma=1.1f, const bool is_sqrt=false)
 Get a diffusion tensor for edge-preserving anisotropic smoothing of an image.
CImg< Tfloat > get_edge_tensors (const float sharpness=0.7f, const float anisotropy=0.6f, const float alpha=0.6f, const float sigma=1.1f, const bool is_sqrt=false) const
CImg< T > & displacement (const CImg< T > &target, const float smooth=0.1f, const float precision=0.1f, const unsigned int nb_scales=0, const unsigned int iteration_max=1000, const bool backward=true)
 Estimate a displacement field between instance image and given target image.
CImg< Tfloat > get_displacement (const CImg< T > &target, const float smoothness=0.1f, const float precision=0.1f, const unsigned int nb_scales=0, const unsigned int iteration_max=1000, const bool backward=true) const
CImg< T > & distance (const T isovalue, const float sizex=1, const float sizey=1, const float sizez=1, const bool compute_sqrt=true)
 Compute the Euclidean distance map to a shape of specified isovalue.
CImg< floatT > get_distance (const T isovalue, const float sizex=1, const float sizey=1, const float sizez=1, const bool compute_sqrt=true) const
CImg< T > & distance_eikonal (const unsigned int nb_iterations, const float band_size=0, const float time_step=0.5f)
 Compute distance function from 0-valued isophotes by the application of an Eikonal PDE.
CImg< Tfloat > get_distance_eikonal (const unsigned int nb_iterations, const float band_size=0, const float time_step=0.5f) const
CImg< T > & haar (const char axis, const bool invert=false, const unsigned int nb_scales=1)
 Compute the Haar multiscale wavelet transform (monodimensional version).
CImg< Tfloat > get_haar (const char axis, const bool invert=false, const unsigned int nb_scales=1) const
CImg< T > & haar (const bool invert=false, const unsigned int nb_scales=1)
 Compute the Haar multiscale wavelet transform.
CImg< Tfloat > get_haar (const bool invert=false, const unsigned int nb_scales=1) const
CImgList< Tfloat > get_FFT (const char axis, const bool invert=false) const
 Compute a 1d Fast Fourier Transform, along a specified axis.
CImgList< Tfloat > get_FFT (const bool invert=false) const
 Compute a n-d Fast-Fourier Transform.
static float _distance_f (const int x, const int i, const float gi2, const float fact)
static int _distance_sep (const int i, const int u, const int gi2, const int gu2, const float fact)
static void FFT (CImg< T > &real, CImg< T > &imag, const char axis, const bool invert=false)
 Compute a 1d Fast Fourier Transform, along a specified axis.
static void FFT (CImg< T > &real, CImg< T > &imag, const bool invert=false)
 Compute a n-d Fast Fourier Transform.

3d Objects Management



CImg< T > & shift_object3d (const float tx, const float ty=0, const float tz=0)
 Shift a 3d object.
CImg< Tfloat > get_shift_object3d (const float tx, const float ty=0, const float tz=0) const
CImg< T > & shift_object3d ()
 Shift a 3d object so that it becomes centered.
CImg< Tfloat > get_shift_object3d () const
CImg< T > & resize_object3d (const float sx, const float sy=-100, const float sz=-100)
 Resize a 3d object.
CImg< Tfloat > get_resize_object3d (const float sx, const float sy=-100, const float sz=-100) const
CImg< T > resize_object3d () const
 Resize a 3d object so that its max dimension if one.
CImg< Tfloat > get_resize_object3d () const
template<typename tf , typename tp , typename tff >
CImg< T > & append_object3d (CImgList< tf > &primitives, const CImg< tp > &obj_vertices, const CImgList< tff > &obj_primitives)
 Append a 3d object to another one.
template<typename tf , typename tc , typename te >
CImg< floatT > get_elevation3d (CImgList< tf > &primitives, CImgList< tc > &colors, const CImg< te > &elevation) const
 Create and return a 3d elevation of the instance image.
template<typename tf >
CImg< floatT > get_isoline3d (CImgList< tf > &primitives, const float isovalue, const int size_x=-100, const int size_y=-100) const
 Create and return a isoline of the instance image as a 3d object.
template<typename tf >
CImg< floatT > get_isosurface3d (CImgList< tf > &primitives, const float isovalue, const int size_x=-100, const int size_y=-100, const int size_z=-100) const
 Create and return a isosurface of the instance image as a 3d object.
template<typename tp , typename tc , typename to >
CImg< T > & object3dtoCImg3d (const CImgList< tp > &primitives, const CImgList< tc > &colors, const to &opacities)
 Convert a 3d object into a CImg3d.
template<typename tp , typename tc >
CImg< T > & object3dtoCImg3d (const CImgList< tp > &primitives, const CImgList< tc > &colors)
template<typename tp >
CImg< T > & object3dtoCImg3d (const CImgList< tp > &primitives)
CImg< T > & object3dtoCImg3d ()
template<typename tp , typename tc , typename to >
CImg< floatT > get_object3dtoCImg3d (const CImgList< tp > &primitives, const CImgList< tc > &colors, const to &opacities) const
template<typename to >
float * _object3dtoCImg3d (const CImgList< to > &opacities, float *ptrd) const
template<typename to >
float * _object3dtoCImg3d (const CImg< to > &opacities, float *ptrd) const
template<typename tp , typename tc , typename to >
unsigned int _size_object3dtoCImg3d (const CImgList< tp > &primitives, const CImgList< tc > &colors, const CImgList< to > &opacities) const
template<typename tp , typename tc , typename to >
unsigned int _size_object3dtoCImg3d (const CImgList< tp > &primitives, const CImgList< tc > &colors, const CImg< to > &opacities) const
template<typename tp , typename tc >
CImg< floatT > get_object3dtoCImg3d (const CImgList< tp > &primitives, const CImgList< tc > &colors) const
template<typename tp >
CImg< floatT > get_object3dtoCImg3d (const CImgList< tp > &primitives) const
CImg< floatT > get_object3dtoCImg3d () const
template<typename tp , typename tc , typename to >
CImg< T > get_CImg3dtoobject3d (CImgList< tp > &primitives, CImgList< tc > &colors, CImgList< to > &opacities) const
 Convert a CImg3d (one-column image) into a 3d object.
template<typename tp , typename tc , typename to >
CImg< T > & CImg3dtoobject3d (CImgList< tp > &primitives, CImgList< tc > &colors, CImgList< to > &opacities)
template<typename tf , typename tfunc >
static CImg< floatT > elevation3d (CImgList< tf > &primitives, const tfunc &func, const float x0, const float y0, const float x1, const float y1, const int size_x=256, const int size_y=256)
 Get elevation3d of a function.
template<typename tf >
static CImg< floatT > elevation3d (CImgList< tf > &primitives, const char *const expression, const float x0, const float y0, const float x1, const float y1, const int sizex=256, const int sizey=256)
template<typename tf , typename tfunc >
static CImg< floatT > isoline3d (CImgList< tf > &primitives, const tfunc &func, const float isovalue, const float x0, const float y0, const float x1, const float y1, const int sizex=256, const int sizey=256)
 Get isoline as a 3d object.
template<typename tf >
static CImg< floatT > isoline3d (CImgList< tf > &primitives, const char *const expression, const float isovalue, const float x0, const float y0, const float x1, const float y1, const int sizex=256, const int sizey=256)
template<typename t >
static int _isoline3d_indice (const unsigned int edge, const CImg< t > &indices1, const CImg< t > &indices2, const unsigned int x, const unsigned int nx)
template<typename tf , typename tfunc >
static CImg< floatT > isosurface3d (CImgList< tf > &primitives, const tfunc &func, const float isovalue, const float x0, const float y0, const float z0, const float x1, const float y1, const float z1, const int size_x=32, const int size_y=32, const int size_z=32)
 Get isosurface as a 3d object.
template<typename tf >
static CImg< floatT > isosurface3d (CImgList< tf > &primitives, const char *const expression, const float isovalue, const float x0, const float y0, const float z0, const float x1, const float y1, const float z1, const int dx=32, const int dy=32, const int dz=32)
template<typename t >
static int _isosurface3d_indice (const unsigned int edge, const CImg< t > &indices1, const CImg< t > &indices2, const unsigned int x, const unsigned int y, const unsigned int nx, const unsigned int ny)
template<typename tf >
static CImg< floatT > box3d (CImgList< tf > &primitives, const float size_x=200, const float size_y=100, const float size_z=100)
 Create and return a 3d box object.
template<typename tf >
static CImg< floatT > cone3d (CImgList< tf > &primitives, const float radius=50, const float size_z=100, const unsigned int subdivisions=24)
 Create and return a 3d cone.
template<typename tf >
static CImg< floatT > cylinder3d (CImgList< tf > &primitives, const float radius=50, const float size_z=100, const unsigned int subdivisions=24)
 Create and return a 3d cylinder.
template<typename tf >
static CImg< floatT > torus3d (CImgList< tf > &primitives, const float radius1=100, const float radius2=30, const unsigned int subdivisions1=24, const unsigned int subdivisions2=12)
 Create and return a 3d torus.
template<typename tf >
static CImg< floatT > plane3d (CImgList< tf > &primitives, const float size_x=100, const float size_y=100, const unsigned int subdivisions_x=10, const unsigned int subdivisions_y=10)
 Create and return a 3d XY-plane.
template<typename tf >
static CImg< floatT > sphere3d (CImgList< tf > &primitives, const float radius=50, const unsigned int subdivisions=3)
 Create and return a 3d sphere.
template<typename tf , typename t >
static CImg< floatT > ellipsoid3d (CImgList< tf > &primitives, const CImg< t > &tensor, const unsigned int subdivisions=3)
 Create and return a 3d ellipsoid.

Data Input



CImg< T > & select (CImgDisplay &disp, const int select_type=2, unsigned int *const XYZ=0, const unsigned char *const color=0)
 Simple interface to select a shape from an image.
CImg< T > & select (const char *const title, const int select_type=2, unsigned int *const XYZ=0, const unsigned char *const color=0)
 Simple interface to select a shape from an image.
CImg< intT > get_select (CImgDisplay &disp, const int select_type=2, unsigned int *const XYZ=0, const unsigned char *const color=0) const
 Simple interface to select a shape from an image.
CImg< intT > get_select (const char *const title, const int select_type=2, unsigned int *const XYZ=0, const unsigned char *const color=0) const
 Simple interface to select a shape from an image.
CImg< intT > _get_select (CImgDisplay &disp, const char *const title, const int coords_type, unsigned int *const XYZ, const unsigned char *const color, const int origX, const int origY, const int origZ) const
CImg< intT > get_select_graph (CImgDisplay &disp, const unsigned int plot_type=1, const unsigned int vertex_type=1, const char *const labelx=0, const double xmin=0, const double xmax=0, const char *const labely=0, const double ymin=0, const double ymax=0) const
 Select sub-graph in a graph.
CImg< T > & load (const char *const filename)
 Load an image from a file.
CImg< T > & load_ascii (const char *const filename)
 Load an image from an ASCII file.
CImg< T > & load_ascii (std::FILE *const file)
 Load an image from an ASCII file.
CImg< T > & _load_ascii (std::FILE *const file, const char *const filename)
CImg< T > & load_dlm (const char *const filename)
 Load an image from a DLM file.
CImg< T > & load_dlm (std::FILE *const file)
 Load an image from a DLM file.
CImg< T > & _load_dlm (std::FILE *const file, const char *const filename)
CImg< T > & load_bmp (const char *const filename)
 Load an image from a BMP file.
CImg< T > & load_bmp (std::FILE *const file)
 Load an image from a BMP file.
CImg< T > & _load_bmp (std::FILE *const file, const char *const filename)
CImg< T > & load_jpeg (const char *const filename)
 Load an image from a JPEG file.
CImg< T > & load_jpeg (std::FILE *const file)
 Load an image from a JPEG file.
CImg< T > & _load_jpeg (std::FILE *const file, const char *const filename)
CImg< T > & load_magick (const char *const filename)
 Load an image from a file, using Magick++ library.
CImg< T > & load_png (const char *const filename)
 Load an image from a PNG file.
CImg< T > & load_png (std::FILE *const file)
 Load an image from a PNG file.
CImg< T > & _load_png (std::FILE *const file, const char *const filename)
CImg< T > & load_pnm (const char *const filename)
 Load an image from a PNM file.
CImg< T > & load_pnm (std::FILE *const file)
 Load an image from a PNM file.
CImg< T > & _load_pnm (std::FILE *const file, const char *const filename)
CImg< T > & load_pfm (const char *const filename)
 Load an image from a PFM file.
CImg< T > & load_pfm (std::FILE *const file)
 Load an image from a PFM file.
CImg< T > & _load_pfm (std::FILE *const file, const char *const filename)
CImg< T > & load_rgb (const char *const filename, const unsigned int dimw, const unsigned int dimh=1)
 Load an image from a RGB file.
CImg< T > & load_rgb (std::FILE *const file, const unsigned int dimw, const unsigned int dimh=1)
 Load an image from a RGB file.
CImg< T > & _load_rgb (std::FILE *const file, const char *const filename, const unsigned int dimw, const unsigned int dimh)
CImg< T > & load_rgba (const char *const filename, const unsigned int dimw, const unsigned int dimh=1)
 Load an image from a RGBA file.
CImg< T > & load_rgba (std::FILE *const file, const unsigned int dimw, const unsigned int dimh=1)
 Load an image from a RGBA file.
CImg< T > & _load_rgba (std::FILE *const file, const char *const filename, const unsigned int dimw, const unsigned int dimh)
CImg< T > & load_tiff (const char *const filename, const unsigned int first_frame=0, const unsigned int last_frame=~0U, const unsigned int step_frame=1)
 Load an image from a TIFF file.
CImg< T > & load_analyze (const char *const filename, float *const voxsize=0)
 Load an image from an ANALYZE7.5/NIFTI file.
CImg< T > & load_analyze (std::FILE *const file, float *const voxsize=0)
 Load an image from an ANALYZE7.5/NIFTI file.
CImg< T > & _load_analyze (std::FILE *const file, const char *const filename, float *const voxsize=0)
CImg< T > & load_cimg (const char *const filename, const char axis='z', const char align='p')
 Load an image (list) from a .cimg file.
CImg< T > & load_cimg (std::FILE *const file, const char axis='z', const char align='p')
 Load an image (list) from a .cimg file.
CImg< 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, const char axis='z', const char align='p')
 Load a sub-image (list) from a .cimg file.
CImg< 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, const char axis='z', const char align='p')
 Load a sub-image (list) from a non-compressed .cimg file.
CImg< T > & load_inr (const char *const filename, float *const voxsize=0)
 Load an image from an INRIMAGE-4 file.
CImg< T > & load_inr (std::FILE *const file, float *const voxsize=0)
 Load an image from an INRIMAGE-4 file.
CImg< T > & _load_inr (std::FILE *const file, const char *const filename, float *const voxsize)
CImg< T > & load_exr (const char *const filename)
 Load an image from a EXR file.
CImg< T > & load_pandore (const char *const filename)
 Load an image from a PANDORE file.
CImg< T > & load_pandore (std::FILE *const file)
 Load an image from a PANDORE file.
CImg< T > & _load_pandore (std::FILE *const file, const char *const filename)
CImg< T > & load_parrec (const char *const filename, const char axis='c', const char align='p')
 Load an image from a PAR-REC (Philips) file.
CImg< T > & load_raw (const char *const filename, const unsigned int sizex, const unsigned int sizey=1, const unsigned int sizez=1, const unsigned int sizev=1, const bool multiplexed=false, const bool invert_endianness=false)
 Load an image from a .RAW file.
CImg< T > & load_raw (std::FILE *const file, const unsigned int sizex, const unsigned int sizey=1, const unsigned int sizez=1, const unsigned int sizev=1, const bool multiplexed=false, const bool invert_endianness=false)
 Load an image from a .RAW file.
CImg< T > & _load_raw (std::FILE *const file, const char *const filename, const unsigned int sizex, const unsigned int sizey, const unsigned int sizez, const unsigned int sizev, const bool multiplexed, const bool invert_endianness)
CImg< T > & load_ffmpeg (const char *const filename, const unsigned int first_frame=0, const unsigned int last_frame=~0U, const unsigned int step_frame=1, const bool pixel_format=true, const bool resume=false, const char axis='z', const char align='p')
 Load a video sequence using FFMPEG av's libraries.
CImg< T > & load_yuv (const char *const filename, const unsigned int sizex, const unsigned int sizey=1, const unsigned int first_frame=0, const unsigned int last_frame=~0U, const unsigned int step_frame=1, const bool yuv2rgb=true, const char axis='z', const char align='p')
 Load an image sequence from a YUV file.
CImg< T > & load_yuv (std::FILE *const file, const unsigned int sizex, const unsigned int sizey=1, const unsigned int first_frame=0, const unsigned int last_frame=~0U, const unsigned int step_frame=1, const bool yuv2rgb=true, const char axis='z', const char align='p')
 Load an image sequence from a YUV file.
template<typename tf , typename tc >
CImg< T > & load_off (const char *const filename, CImgList< tf > &primitives, CImgList< tc > &colors)
 Load a 3d object from a .OFF file.
template<typename tf , typename tc >
CImg< T > & load_off (std::FILE *const file, CImgList< tf > &primitives, CImgList< tc > &colors)
 Load a 3d object from a .OFF file.
template<typename tf , typename tc >
CImg< T > & _load_off (std::FILE *const file, const char *const filename, CImgList< tf > &primitives, CImgList< tc > &colors)
CImg< T > & load_ffmpeg_external (const char *const filename, const char axis='z', const char align='p')
 Load a video sequence using FFMPEG's external tool 'ffmpeg'.
CImg< T > & load_graphicsmagick_external (const char *const filename)
 Load an image using GraphicsMagick's external tool 'gm'.
CImg< T > & load_gzip_external (const char *const filename)
 Load a gzipped image file, using external tool 'gunzip'.
CImg< T > & load_imagemagick_external (const char *const filename)
 Load an image using ImageMagick's external tool 'convert'.
CImg< T > & load_medcon_external (const char *const filename)
 Load a DICOM image file, using XMedcon's external tool 'medcon'.
CImg< T > & load_dcraw_external (const char *const filename)
 Load a RAW Color Camera image file, using external tool 'dcraw'.
CImg< T > & load_other (const char *const filename)
 Load an image using ImageMagick's or GraphicsMagick's executables.
static CImg< T > get_load (const char *const filename)
static CImg< T > get_load_ascii (const char *const filename)
static CImg< T > get_load_ascii (std::FILE *const file)
static CImg< T > get_load_dlm (const char *const filename)
static CImg< T > get_load_dlm (std::FILE *const file)
static CImg< T > get_load_bmp (const char *const filename)
static CImg< T > get_load_bmp (std::FILE *const file)
static CImg< T > get_load_jpeg (const char *const filename)
static CImg< T > get_load_jpeg (std::FILE *const file)
static CImg< T > get_load_magick (const char *const filename)
static CImg< T > get_load_png (const char *const filename)
static CImg< T > get_load_png (std::FILE *const file)
static CImg< T > get_load_pnm (const char *const filename)
static CImg< T > get_load_pnm (std::FILE *const file)
static CImg< T > get_load_pfm (const char *const filename)
static CImg< T > get_load_pfm (std::FILE *const file)
static CImg< T > get_load_rgb (const char *const filename, const unsigned int dimw, const unsigned int dimh=1)
static CImg< T > get_load_rgb (std::FILE *const file, const unsigned int dimw, const unsigned int dimh=1)
static CImg< T > get_load_rgba (const char *const filename, const unsigned int dimw, const unsigned int dimh=1)
static CImg< T > get_load_rgba (std::FILE *const file, const unsigned int dimw, const unsigned int dimh=1)
static CImg< T > get_load_tiff (const char *const filename, const unsigned int first_frame=0, const unsigned int last_frame=~0U, const unsigned int step_frame=1)
static CImg< T > get_load_analyze (const char *const filename, float *const voxsize=0)
static CImg< T > get_load_analyze (std::FILE *const file, float *const voxsize=0)
static CImg< T > get_load_cimg (const char *const filename, const char axis='z', const char align='p')
static CImg< T > get_load_cimg (std::FILE *const file, const char axis='z', const char align='p')
static CImg< 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, const char axis='z', const char align='p')
static CImg< 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, const char axis='z', const char align='p')
static CImg< T > get_load_inr (const char *const filename, float *const voxsize=0)
static CImg< T > get_load_inr (std::FILE *const file, float *voxsize=0)
static void _load_inr_header (std::FILE *file, int out[8], float *const voxsize)
static CImg< T > get_load_exr (const char *const filename)
static CImg< T > get_load_pandore (const char *const filename)
static CImg< T > get_load_pandore (std::FILE *const file)
static CImg< T > get_load_parrec (const char *const filename, const char axis='c', const char align='p')
static CImg< T > get_load_raw (const char *const filename, const unsigned int sizex, const unsigned int sizey=1, const unsigned int sizez=1, const unsigned int sizev=1, const bool multiplexed=false, const bool invert_endianness=false)
static CImg< T > get_load_raw (std::FILE *const file, const unsigned int sizex, const unsigned int sizey=1, const unsigned int sizez=1, const unsigned int sizev=1, const bool multiplexed=false, const bool invert_endianness=false)
static CImg< T > get_load_ffmpeg (const char *const filename, const unsigned int first_frame=0, const unsigned int last_frame=~0U, const unsigned int step_frame=1, const bool pixel_format=true, const bool resume=false, const char axis='z', const char align='p')
static CImg< T > get_load_yuv (const char *const filename, const unsigned int sizex, const unsigned int sizey=1, const unsigned int first_frame=0, const unsigned int last_frame=~0U, const unsigned int step_frame=1, const bool yuv2rgb=true, const char axis='z', const char align='p')
static CImg< T > get_load_yuv (std::FILE *const file, const unsigned int sizex, const unsigned int sizey=1, const unsigned int first_frame=0, const unsigned int last_frame=~0U, const unsigned int step_frame=1, const bool yuv2rgb=true, const char axis='z', const char align='p')
template<typename tf , typename tc >
static CImg< T > get_load_off (const char *const filename, CImgList< tf > &primitives, CImgList< tc > &colors)
template<typename tf , typename tc >
static CImg< T > get_load_off (std::FILE *const file, CImgList< tf > &primitives, CImgList< tc > &colors)
static CImg< T > get_load_ffmpeg_external (const char *const filename, const char axis='z', const char align='p')
static CImg< T > get_load_graphicsmagick_external (const char *const filename)
static CImg< T > get_load_gzip_external (const char *const filename)
static CImg< T > get_load_imagemagick_external (const char *const filename)
static CImg< T > get_load_medcon_external (const char *const filename)
static CImg< T > get_load_dcraw_external (const char *const filename)
static CImg< T > get_load_other (const char *const filename)

Data Output



const CImg< T > & print (const char *const title=0, const bool display_stats=true) const
 Display informations about the image on the standard error output.
const CImg< T > & display (CImgDisplay &disp) const
 Display an image into a CImgDisplay window.
const CImg< T > & display (CImgDisplay &disp, const bool display_info) const
 Display an image in a window with a title title, and wait a '_is_closed' or 'keyboard' event.
.
const CImg< T > & display (const char *const title=0, const bool display_info=true) const
 Display an image in a window with a title title, and wait a '_is_closed' or 'keyboard' event.
.
const CImg< T > & _display (CImgDisplay &disp, const char *const title, const bool display_info) const
template<typename tp , typename tf , typename tc , typename to >
const CImg< T > & display_object3d (CImgDisplay &disp, const CImg< tp > &vertices, const CImgList< tf > &primitives, const CImgList< tc > &colors, const to &opacities, const bool centering=true, const int render_static=4, const int render_motion=1, const bool double_sided=true, const float focale=500, const float light_x=0, const float light_y=0, const float light_z=-5000, const float specular_light=0.2f, const float specular_shine=0.1f, const bool display_axes=true, float *const pose_matrix=0) const
 High-level interface for displaying a 3d object.
template<typename tp , typename tf , typename tc , typename to >
const CImg< T > & display_object3d (const char *const title, const CImg< tp > &vertices, const CImgList< tf > &primitives, const CImgList< tc > &colors, const to &opacities, const bool centering=true, const int render_static=4, const int render_motion=1, const bool double_sided=true, const float focale=500, const float light_x=0, const float light_y=0, const float light_z=-5000, const float specular_light=0.2f, const float specular_shine=0.1f, const bool display_axes=true, float *const pose_matrix=0) const
 High-level interface for displaying a 3d object.
template<typename tp , typename tf , typename tc >
const CImg< T > & display_object3d (CImgDisplay &disp, const CImg< tp > &vertices, const CImgList< tf > &primitives, const CImgList< tc > &colors, const bool centering=true, const int render_static=4, const int render_motion=1, const bool double_sided=true, const float focale=500, const float light_x=0, const float light_y=0, const float light_z=-5000, const float specular_light=0.2f, const float specular_shine=0.1f, const bool display_axes=true, float *const pose_matrix=0) const
 High-level interface for displaying a 3d object.
template<typename tp , typename tf , typename tc >
const CImg< T > & display_object3d (const char *const title, const CImg< tp > &vertices, const CImgList< tf > &primitives, const CImgList< tc > &colors, const bool centering=true, const int render_static=4, const int render_motion=1, const bool double_sided=true, const float focale=500, const float light_x=0, const float light_y=0, const float light_z=-5000, const float specular_light=0.2f, const float specular_shine=0.1f, const bool display_axes=true, float *const pose_matrix=0) const
 High-level interface for displaying a 3d object.
template<typename tp , typename tf >
const CImg< T > & display_object3d (CImgDisplay &disp, const CImg< tp > &vertices, const CImgList< tf > &primitives, const bool centering=true, const int render_static=4, const int render_motion=1, const bool double_sided=true, const float focale=500, const float light_x=0, const float light_y=0, const float light_z=-5000, const float specular_light=0.2f, const float specular_shine=0.1f, const bool display_axes=true, float *const pose_matrix=0) const
 High-level interface for displaying a 3d object.
template<typename tp , typename tf >
const CImg< T > & display_object3d (const char *const title, const CImg< tp > &vertices, const CImgList< tf > &primitives, const bool centering=true, const int render_static=4, const int render_motion=1, const bool double_sided=true, const float focale=500, const float light_x=0, const float light_y=0, const float light_z=-5000, const float specular_light=0.2f, const float specular_shine=0.1f, const bool display_axes=true, float *const pose_matrix=0) const
 High-level interface for displaying a 3d object.
template<typename tp >
const CImg< T > & display_object3d (CImgDisplay &disp, const CImg< tp > &vertices, const bool centering=true, const int render_static=4, const int render_motion=1, const bool double_sided=true, const float focale=500, const float light_x=0, const float light_y=0, const float light_z=-5000, const float specular_light=0.2f, const float specular_shine=0.1f, const bool display_axes=true, float *const pose_matrix=0) const
 High-level interface for displaying a 3d object.
template<typename tp >
const CImg< T > & display_object3d (const char *const title, const CImg< tp > &vertices, const bool centering=true, const int render_static=4, const int render_motion=1, const bool double_sided=true, const float focale=500, const float light_x=0, const float light_y=0, const float light_z=-5000, const float specular_light=0.2f, const float specular_shine=0.1f, const bool display_axes=true, float *const pose_matrix=0) const
 High-level interface for displaying a 3d object.
template<typename tp , typename tf , typename tc , typename to >
const CImg< T > & _display_object3d (CImgDisplay &disp, const char *const title, const CImg< tp > &vertices, const CImgList< tf > &primitives, const CImgList< tc > &colors, const to &opacities, const bool centering, const int render_static, const int render_motion, const bool double_sided, const float focale, const float light_x, const float light_y, const float light_z, const float specular_light, const float specular_shine, const bool display_axes, float *const pose_matrix) const
const CImg< T > & display_graph (CImgDisplay &disp, const unsigned int plot_type=1, const unsigned int vertex_type=1, const char *const labelx=0, const double xmin=0, const double xmax=0, const char *const labely=0, const double ymin=0, const double ymax=0) const
 High-level interface for displaying a graph.
const CImg< T > & display_graph (const char *const title=0, const unsigned int plot_type=1, const unsigned int vertex_type=1, const char *const labelx=0, const double xmin=0, const double xmax=0, const char *const labely=0, const double ymin=0, const double ymax=0) const
 High-level interface for displaying a graph.
const CImg< T > & save (const char *const filename, const int number=-1) const
 Save the image as a file.
const CImg< T > & _save_ascii (std::FILE *const file, const char *const filename) const
const CImg< T > & save_ascii (const char *const filename) const
 Save the image as an ASCII file (ASCII Raw + simple header).
const CImg< T > & save_ascii (std::FILE *const file) const
 Save the image as an ASCII file (ASCII Raw + simple header).
const CImg< T > & _save_cpp (std::FILE *const file, const char *const filename) const
const CImg< T > & save_cpp (const char *const filename) const
 Save the image as a CPP source file.
const CImg< T > & save_cpp (std::FILE *const file) const
 Save the image as a CPP source file.
const CImg< T > & _save_dlm (std::FILE *const file, const char *const filename) const
const CImg< T > & save_dlm (const char *const filename) const
 Save the image as a DLM file.
const CImg< T > & save_dlm (std::FILE *const file) const
 Save the image as a DLM file.
const CImg< T > & _save_bmp (std::FILE *const file, const char *const filename) const
const CImg< T > & save_bmp (const char *const filename) const
 Save the image as a BMP file.
const CImg< T > & save_bmp (std::FILE *const file) const
 Save the image as a BMP file.
const CImg< T > & _save_jpeg (std::FILE *const file, const char *const filename, const unsigned int quality) const
const CImg< T > & save_jpeg (const char *const filename, const unsigned int quality=100) const
 Save a file in JPEG format.
const CImg< T > & save_jpeg (std::FILE *const file, const unsigned int quality=100) const
 Save a file in JPEG format.
const CImg< T > & save_magick (const char *const filename, const unsigned int bytes_per_pixel=0) const
 Save the image using built-in ImageMagick++ library.
const CImg< T > & _save_png (std::FILE *const file, const char *const filename, const unsigned int bytes_per_pixel=0) const
const CImg< T > & save_png (const char *const filename, const unsigned int bytes_per_pixel=0) const
 Save a file in PNG format.
const CImg< T > & save_png (std::FILE *const file, const unsigned int bytes_per_pixel=0) const
 Save a file in PNG format.
const CImg< T > & save_pnm (const char *const filename, const unsigned int bytes_per_pixel=0) const
 Save the image as a PNM file.
const CImg< T > & save_pnm (std::FILE *const file, const unsigned int bytes_per_pixel=0) const
 Save the image as a PNM file.
const CImg< T > & _save_pnm (std::FILE *const file, const char *const filename, const unsigned int bytes_per_pixel=0) const
const CImg< T > & save_pfm (const char *const filename) const
 Save the image as a PFM file.
const CImg< T > & save_pfm (std::FILE *const file) const
 Save the image as a PFM file.
const CImg< T > & _save_pfm (std::FILE *const file, const char *const filename) const
const CImg< T > & _save_rgb (std::FILE *const file, const char *const filename) const
const CImg< T > & save_rgb (const char *const filename) const
 Save the image as a RGB file.
const CImg< T > & save_rgb (std::FILE *const file) const
 Save the image as a RGB file.
const CImg< T > & _save_rgba (std::FILE *const file, const char *const filename) const
const CImg< T > & save_rgba (const char *const filename) const
 Save the image as a RGBA file.
const CImg< T > & save_rgba (std::FILE *const file) const
 Save the image as a RGBA file.
const CImg< T > & save_tiff (const char *const filename) const
 Save a file in TIFF format.
const CImg< T > & save_analyze (const char *const filename, const float *const voxsize=0) const
 Save the image as an ANALYZE7.5 or NIFTI file.
const CImg< T > & save_cimg (const char *const filename, const bool compress=false) const
 Save the image as a .cimg file.
const CImg< T > & save_cimg (std::FILE *const file, const bool compress=false) const
const CImg< 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 into an existing .cimg file, at specified coordinates.
const CImg< 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 into an existing .cimg file, at specified coordinates.
const CImg< T > & _save_inr (std::FILE *const file, const char *const filename, const float *const voxsize) const
const CImg< T > & save_inr (const char *const filename, const float *const voxsize=0) const
 Save the image as an INRIMAGE-4 file.
const CImg< T > & save_inr (std::FILE *const file, const float *const voxsize=0) const
 Save the image as an INRIMAGE-4 file.
const CImg< T > & save_exr (const char *const filename) const
 Save the image as a EXR file.
unsigned int _save_pandore_header_length (unsigned int id, unsigned int *dims, const unsigned int colorspace) const
const CImg< T > & _save_pandore (std::FILE *const file, const char *const filename, const unsigned int colorspace) const
const CImg< T > & save_pandore (const char *const filename, const unsigned int colorspace=0) const
 Save the image as a PANDORE-5 file.
const CImg< T > & save_pandore (std::FILE *const file, const unsigned int colorspace=0) const
 Save the image as a PANDORE-5 file.
const CImg< T > & _save_raw (std::FILE *const file, const char *const filename, const bool multiplexed) const
const CImg< T > & save_raw (const char *const filename, const bool multiplexed=false) const
 Save the image as a RAW file.
const CImg< T > & save_raw (std::FILE *const file, const bool multiplexed=false) const
 Save the image as a RAW file.
const CImg< T > & save_ffmpeg (const char *const filename, const unsigned int first_frame=0, const unsigned int last_frame=~0U, const unsigned int fps=25) const
 Save the image as a video sequence file, using FFMPEG library.
const CImg< T > & save_yuv (const char *const filename, const bool rgb2yuv=true) const
 Save the image as a YUV video sequence file.
const CImg< T > & save_yuv (std::FILE *const file, const bool rgb2yuv=true) const
 Save the image as a YUV video sequence file.
template<typename tf , typename tc >
const CImg< T > & _save_off (std::FILE *const file, const char *const filename, const CImgList< tf > &primitives, const CImgList< tc > &colors) const
template<typename tf , typename tc >
const CImg< T > & save_off (const char *const filename, const CImgList< tf > &primitives, const CImgList< tc > &colors) const
 Save OFF files.
template<typename tf , typename tc >
const CImg< T > & save_off (std::FILE *const file, const CImgList< tf > &primitives, const CImgList< tc > &colors) const
 Save OFF files.
const CImg< T > & save_ffmpeg_external (const char *const filename, const unsigned int first_frame=0, const unsigned int last_frame=~0U, const char *const codec="mpeg2video") const
 Save the image as a video sequence file, using the external tool 'ffmpeg'.
const CImg< T > & save_graphicsmagick_external (const char *const filename, const unsigned int quality=100) const
 Save the image using GraphicsMagick's gm.
const CImg< T > & save_gzip_external (const char *const filename) const
 Save an image as a gzipped file, using external tool 'gzip'.
const CImg< T > & save_imagemagick_external (const char *const filename, const unsigned int quality=100) const
 Save the image using ImageMagick's convert.
const CImg< T > & save_medcon_external (const char *const filename) const
 Save an image as a Dicom file (need '(X)Medcon' : http://xmedcon.sourceforge.net ).
const CImg< T > & save_other (const char *const filename, const unsigned int quality=100) const
static void save_empty_cimg (const char *const filename, const unsigned int dx, const unsigned int dy=1, const unsigned int dz=1, const unsigned int dc=1)
 Save an empty .cimg file with specified dimensions.
static void save_empty_cimg (std::FILE *const file, const unsigned int dx, const unsigned int dy=1, const unsigned int dz=1, const unsigned int dc=1)
 Save an empty .cimg file with specified dimensions.
static CImg< T > logo40x38 ()

Detailed Description

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

Class representing an image (up to 4 dimensions wide), each pixel being of type T.

This is the main class of the CImg Library. It declares and constructs an image, allows access to its pixel values, and is able to perform various image operations.

Image representation

A CImg image is defined as an instance of the container CImg<T>, which contains a regular grid of pixels, each pixel value being of type T. The image grid can have up to 4 dimensions : width, height, depth and number of channels. Usually, the three first dimensions are used to describe spatial coordinates (x,y,z), while the number of channels is rather used as a vector-valued dimension (it may describe the R,G,B color channels for instance). If you need a fifth dimension, you can use image lists CImgList<T> rather than simple images CImg<T>.

Thus, the CImg<T> class is able to represent volumetric images of vector-valued pixels, as well as images with less dimensions (1d scalar signal, 2d color images, ...). Most member functions of the class CImg<T> are designed to handle this maximum case of (3+1) dimensions.

Concerning the pixel value type T : fully supported template types are the basic C++ types : unsigned char, char, short, unsigned int, int, unsigned long, long, float, double, ... . Typically, fast image display can be done using CImg<unsigned char> images, while complex image processing algorithms may be rather coded using CImg<float> or CImg<double> images that have floating-point pixel values. The default value for the template T is float. Using your own template types may be possible. However, you will certainly have to define the complete set of arithmetic and logical operators for your class.

Image structure

The CImg<T> structure contains six fields :

You can access these fields publicly although it is recommended to use the dedicated functions width(), height(), depth(), spectrum() and ptr() to do so. Image dimensions are not limited to a specific range (as long as you got enough available memory). A value of 1 usually means that the corresponding dimension is flat. If one of the dimensions is 0, or if the data pointer is null, the image is considered as empty. Empty images should not contain any pixel data and thus, will not be processed by CImg member functions (a CImgInstanceException will be thrown instead). Pixel data are stored in memory, in a non interlaced mode (See cimg_storage).

Image declaration and construction

Declaring an image can be done by using one of the several available constructors. Here is a list of the most used :

The complete list of constructors can be found here.

Most useful functions

The CImg<T> class contains a lot of functions that operates on images. Some of the most useful are :

Definition at line 8400 of file CImg.h.


Member Typedef Documentation

template<typename T>
typedef const T* cimg_library::CImg< T >::const_iterator

Const iterator type for CImg<T>.

Remarks:
  • A const_iterator is a const T* pointer (address of a pixel value in the pixel buffer).
  • Iterators are not directly used in CImg functions, they have been introduced for compatibility with the STL.

Definition at line 8465 of file CImg.h.

template<typename T>
typedef T* cimg_library::CImg< T >::iterator

Iterator type for CImg<T>.

Remarks:
  • An iterator is a T* pointer (address of a pixel value in the pixel buffer).
  • Iterators are not directly used in CImg functions, they have been introduced for compatibility with the STL.

Definition at line 8457 of file CImg.h.

template<typename T>
typedef T cimg_library::CImg< T >::value_type

Value type.

Definition at line 8468 of file CImg.h.


Constructor & Destructor Documentation

template<typename T>
cimg_library::CImg< T >::~CImg (  )  [inline]

Destructor.

The destructor destroys the instance image.

Remarks:
  • Destructing an empty or shared image does nothing.
  • Otherwise, all memory used to store the pixel data of the instance image is freed.
  • When destroying a non-shared image, be sure that every shared instances of the same image are also destroyed to avoid further access to desallocated memory buffers.

Definition at line 8544 of file CImg.h.

template<typename T>
cimg_library::CImg< T >::CImg (  )  [inline]

Default constructor.

The default constructor creates an empty instance image.

Remarks:
  • An empty image does not contain any data and has all of its dimensions width, height, depth, spectrum set to 0 as well as its pointer to the pixel buffer data.
  • An empty image is non-shared.

Definition at line 8556 of file CImg.h.

template<typename T>
cimg_library::CImg< T >::CImg ( const unsigned int  dx,
const unsigned int  dy = 1,
const unsigned int  dz = 1,
const unsigned int  dc = 1 
) [inline, explicit]

Constructs a new image with given size (dx,dy,dz,dc).

This constructors create an instance image of size (dx,dy,dz,dc) with pixels of type T.

Parameters:
dx Desired size along the X-axis, i.e. the width of the image.
dy Desired size along the Y-axis, i.e. the height of the image.
dz Desired size along the Z-axis, i.e. the depth of the image.
dc Desired size along the C-axis, i.e. the number of image channels spectrum.
Remarks:

Definition at line 8573 of file CImg.h.

template<typename T>
cimg_library::CImg< T >::CImg ( const unsigned int  dx,
const unsigned int  dy,
const unsigned int  dz,
const unsigned int  dc,
const T  val 
) [inline]

Construct an image with given size (dx,dy,dz,dc) and with pixel having a default value val.

This constructor creates an instance image of size (dx,dy,dz,dc) with pixels of type T and sets all pixel values of the created instance image to val.

Parameters:
dx Desired size along the X-axis, i.e. the width of the image.
dy Desired size along the Y-axis, i.e. the height of the image.
dz Desired size along the Z-axis, i.e. the depth of the image.
dc Desired size along the C-axis, i.e. the number of image channels spectrum.
val Default value for image pixels.
Remarks:

Definition at line 8600 of file CImg.h.

template<typename T>
cimg_library::CImg< T >::CImg ( const unsigned int  dx,
const unsigned int  dy,
const unsigned int  dz,
const unsigned int  dc,
const int  val0,
const int  val1,
  ... 
) [inline]

Construct an image with given size (dx,dy,dz,dc) and with specified pixel values (int version).

Definition at line 8617 of file CImg.h.

template<typename T>
cimg_library::CImg< T >::CImg ( const unsigned int  dx,
const unsigned int  dy,
const unsigned int  dz,
const unsigned int  dc,
const double  val0,
const double  val1,
  ... 
) [inline]

Construct an image with given size (dx,dy,dz,dc) and with specified pixel values (double version).

Definition at line 8638 of file CImg.h.

template<typename T>
cimg_library::CImg< T >::CImg ( const unsigned int  dx,
const unsigned int  dy,
const unsigned int  dz,
const unsigned int  dc,
const char *const   values,
const bool  repeat_values 
) [inline]

Construct an image with given size and with specified values given in a string.

Definition at line 8645 of file CImg.h.

template<typename T>
template<typename t >
cimg_library::CImg< T >::CImg ( const t *const   data_buffer,
const unsigned int  dx,
const unsigned int  dy = 1,
const unsigned int  dz = 1,
const unsigned int  dc = 1,
const bool  shared = false 
) [inline]

Construct an image from a raw memory buffer.

This constructor creates an instance image of size (dx,dy,dz,dc) and fill its pixel buffer by copying data values from the input raw pixel buffer data_buffer.

Definition at line 8667 of file CImg.h.

template<typename T>
cimg_library::CImg< T >::CImg ( const char *const   filename  )  [inline, explicit]

Construct an image from an image file.

This constructor creates an instance image by reading it from a file.

Parameters:
filename Filename of the image file.
Remarks:
  • The image format is deduced from the filename only by looking for the filename extension i.e. without analyzing the file itself.
  • Recognized image formats depend on the tools installed on your system or the external libraries you use to link your code with. More informations on this topic can be found in cimg_files_io.
  • If the filename is not found, a CImgIOException is thrown by this constructor.

Definition at line 8721 of file CImg.h.

template<typename T>
template<typename t >
cimg_library::CImg< T >::CImg ( const CImg< t > &  img  )  [inline]

Default copy constructor.

The default copy constructor creates a new instance image having same dimensions (width, height, depth, _spectrum) and same pixel values as the input image img.

Parameters:
img The input image to copy.
Remarks:
  • If the input image img is non-shared or have a different template type t != T, the default copy constructor allocates a new pixel buffer and copy the pixel data of img into it. In this case, the pointers data to the pixel buffers of the two images are different and the resulting instance image is non-shared.
  • If the input image img is shared and has the same template type t == T, the default copy constructor does not allocate a new pixel buffer and the resulting instance image shares its pixel buffer with the input image img, which means that modifying pixels of img also modifies the created instance image.
  • Copying an image having a different template type t != T performs a crude static cast conversion of each pixel value from type t to type T.
  • Copying an image having the same template type t == T is significantly faster.

Definition at line 8744 of file CImg.h.

template<typename T>
template<typename t >
cimg_library::CImg< T >::CImg ( const CImg< t > &  img,
const bool  shared 
) [inline]

Advanced copy constructor.

The advanced copy constructor - as the default constructor CImg(const CImg< t >&) - creates a new instance image having same dimensions width, height, depth, spectrum and same pixel values as the input image img. But it also decides if the created instance image shares its memory with the input image img (if the input parameter shared is set to true) or not (if the input parameter shared is set to false).

Parameters:
img The input image to copy.
shared Boolean flag that decides if the copy is shared on non-shared.
Remarks:
  • It is not possible to create a shared copy if the input image img is empty or has a different pixel type t != T.
  • If a non-shared copy of the input image img is created, a new memory buffer is allocated for pixel data.
  • If a shared copy of the input image img is created, no extra memory is allocated and the pixel buffer of the instance image is the same as the one used by the input image img.

Definition at line 8793 of file CImg.h.

template<typename T>
template<typename t >
cimg_library::CImg< T >::CImg ( const CImg< t > &  img,
const char *const   dimensions 
) [inline]

Construct an image using dimensions of another image.

Definition at line 8837 of file CImg.h.

template<typename T>
template<typename t >
cimg_library::CImg< T >::CImg ( const CImg< t > &  img,
const char *const   dimensions,
const T  val 
) [inline]

Construct an image using dimensions of another image, and fill it with given values.

Definition at line 8843 of file CImg.h.

template<typename T>
template<typename t >
cimg_library::CImg< T >::CImg ( const CImg< t > &  img,
const char *const   dimensions,
const char *const   values,
const bool  repeat_values 
) [inline]

Construct an image using dimensions of another image, and fill it with given values.

Definition at line 8850 of file CImg.h.

template<typename T>
cimg_library::CImg< T >::CImg ( const CImgDisplay disp  )  [inline, explicit]

Construct an image from the content of a CImgDisplay instance.

Definition at line 8856 of file CImg.h.


Member Function Documentation

template<typename T>
Tfloat cimg_library::CImg< T >::_cubic_atX ( const float  fx,
const int  y,
const int  z,
const int  c,
const Tfloat  min_val,
const Tfloat  max_val 
) const [inline]

Read a pixel value using cubic interpolation and Neumann boundary conditions (first coordinates).

Definition at line 10520 of file CImg.h.

template<typename T>
Tfloat cimg_library::CImg< T >::_cubic_atX ( const float  fx,
const int  y = 0,
const int  z = 0,
const int  c = 0 
) const [inline]

Read a pixel value using cubic interpolation and Neumann boundary conditions (first coordinates).

Definition at line 10504 of file CImg.h.

Referenced by cimg_library::CImg< charT >::_cubic_atX(), cimg_library::CImg< charT >::cubic_atX(), and cimg_library::CImg< charT >::draw_graph().

template<typename T>
Tfloat cimg_library::CImg< T >::_cubic_atXY ( const float  fx,
const float  fy,
const int  z,
const int  c,
const Tfloat  min_val,
const Tfloat  max_val 
) const [inline]

Read a pixel value using cubic interpolation and Neumann boundary conditions.

Definition at line 10591 of file CImg.h.

template<typename T>
Tfloat cimg_library::CImg< T >::_cubic_atXY ( const float  fx,
const float  fy,
const int  z = 0,
const int  c = 0 
) const [inline]

Read a pixel value using cubic interpolation and Neumann boundary conditions.

Definition at line 10569 of file CImg.h.

Referenced by cimg_library::CImg< charT >::_cubic_atXY(), and cimg_library::CImg< charT >::cubic_atXY().

template<typename T>
Tfloat cimg_library::CImg< T >::_cubic_atXYZ ( const float  fx,
const float  fy,
const float  fz,
const int  c,
const Tfloat  min_val,
const Tfloat  max_val 
) const [inline]

Read a pixel value using cubic interpolation and Neumann boundary conditions.

Definition at line 10753 of file CImg.h.

template<typename T>
Tfloat cimg_library::CImg< T >::_cubic_atXYZ ( const float  fx,
const float  fy,
const float  fz,
const int  c = 0 
) const [inline]

Read a pixel value using cubic interpolation and Neumann boundary conditions.

Definition at line 10685 of file CImg.h.

Referenced by cimg_library::CImg< charT >::_cubic_atXYZ(), and cimg_library::CImg< charT >::cubic_atXYZ().

template<typename T>
CImg<T>& cimg_library::CImg< T >::abs (  )  [inline]
template<typename T>
CImg<T>& cimg_library::CImg< T >::acos (  )  [inline]

Compute the arc-cosine of each pixel value.

Definition at line 12337 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::append ( const CImg< t > &  img,
const char  axis = 'x',
const char  align = 'p' 
) [inline]

Append an image.

Definition at line 19352 of file CImg.h.

Referenced by cimg_library::CImg< charT >::append_object3d().

template<typename T>
template<typename tf , typename tp , typename tff >
CImg<T>& cimg_library::CImg< T >::append_object3d ( CImgList< tf > &  primitives,
const CImg< tp > &  obj_vertices,
const CImgList< tff > &  obj_primitives 
) [inline]

Append a 3d object to another one.

Definition at line 22313 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::asin (  )  [inline]

Compute the arc-sinus of each pixel value.

Definition at line 12347 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::assign ( const CImgDisplay disp  )  [inline]

In-place version of the previous constructor.

Definition at line 9135 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::assign ( const CImg< t > &  img,
const char *const   dimensions,
const char *const   values,
const bool  repeat_values 
) [inline]

In-place version of the previous constructor.

Definition at line 9130 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::assign ( const CImg< t > &  img,
const char *const   dimensions,
const T  val 
) [inline]

In-place version of the previous constructor.

Definition at line 9124 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::assign ( const CImg< t > &  img,
const char *const   dimensions 
) [inline]

In-place version of the previous constructor.

Definition at line 9094 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::assign ( const CImg< t > &  img,
const bool  shared 
) [inline]

In-place version of the advanced constructor.

This function - as the simpler function assign(const CImg< t >&) - assigns a copy of the input image img to the current instance image. But it also decides if the copy is shared (if the input parameter shared is set to true) or non-shared (if the input parameter shared is set to false).

Parameters:
img The input image to copy.
shared Boolean flag that decides if the copy is shared or non-shared.
Remarks:
  • It is not possible to assign a shared copy if the input image img is empty or has a different pixel type t != T.
  • If a non-shared copy of the input image img is assigned, a new memory buffer is allocated for pixel data.
  • If a shared copy of the input image img is assigned, no extra memory is allocated and the pixel buffer of the instance image is the same as the one used by the input image img.

Definition at line 9088 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::assign ( const CImg< t > &  img  )  [inline]

In-place version of the default copy constructor.

This function assigns a copy of the input image img to the current instance image.

Parameters:
img The input image to copy.
Remarks:
  • If the instance image is non-shared, the content of the input image img is copied into a new buffer becoming the new pixel buffer of the instance image, while the old pixel buffer is freed if necessary.
  • If the instance image is shared, the content of the input image img is copied into the current (shared) pixel buffer of the instance image, modifying then the image referenced by the shared instance image. The instance image still remains shared.

Definition at line 9070 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::assign ( const char *const   filename  )  [inline]

In-place version of the previous constructor.

This function replaces the instance image by the one that have been read from the given file.

Parameters:
filename Filename of the image file.

  • The image format is deduced from the filename only by looking for the filename extension i.e. without analyzing the file itself.
  • Recognized image formats depend on the tools installed on your system or the external libraries you use to link your code with. More informations on this topic can be found in cimg_files_io.
  • If the filename is not found, a CImgIOException is thrown by this constructor.

Definition at line 9055 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::assign ( const t *const   data_buffer,
const unsigned int  dx,
const unsigned int  dy,
const unsigned int  dz,
const unsigned int  dc,
const bool  shared 
) [inline]

In-place version of the previous constructor, allowing to force the shared state of the instance image.

Definition at line 9010 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::assign ( const t *const   data_buffer,
const unsigned int  dx,
const unsigned int  dy = 1,
const unsigned int  dz = 1,
const unsigned int  dc = 1 
) [inline]

In-place version of the previous constructor.

Definition at line 8974 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::assign ( const unsigned int  dx,
const unsigned int  dy,
const unsigned int  dz,
const unsigned int  dc,
const char *const   values,
const bool  repeat_values 
) [inline]

In-place version of the corresponding constructor.

Definition at line 8967 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::assign ( const unsigned int  dx,
const unsigned int  dy,
const unsigned int  dz,
const unsigned int  dc,
const double  val0,
const double  val1,
  ... 
) [inline]

In-place version of the previous constructor.

Definition at line 8959 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::assign ( const unsigned int  dx,
const unsigned int  dy,
const unsigned int  dz,
const unsigned int  dc,
const int  val0,
const int  val1,
  ... 
) [inline]

In-place version of the previous constructor.

Definition at line 8951 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::assign ( const unsigned int  dx,
const unsigned int  dy,
const unsigned int  dz,
const unsigned int  dc,
const T  val 
) [inline]

In-place version of the previous constructor.

This function replaces the instance image by a new image of size (dx,dy,dz,dc) with pixels of type T and sets all pixel values of the instance image to val.

Parameters:
dx Desired size along the X-axis, i.e. the width of the image.
dy Desired size along the Y-axis, i.e. the height of the image.
dz Desired size along the Z-axis, i.e. the depth of the image.
dc Desired size along the C-axis, i.e. the number of image channels _spectrum.
val Default value for image pixels.
Remarks:

Definition at line 8946 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::assign ( const unsigned int  dx,
const unsigned int  dy = 1,
const unsigned int  dz = 1,
const unsigned int  dc = 1 
) [inline]

In-place version of the previous constructor.

This function replaces the instance image by a new image of size (dx,dy,dz,dc) with pixels of type T.

Parameters:
dx Desired size along the X-axis, i.e. the width of the image.
dy Desired size along the Y-axis, i.e. the height of the image.
dz Desired size along the Z-axis, i.e. the depth of the image.
dc Desired size along the C-axis, i.e. the number of image channels _spectrum.

  • If one of the input dimension dx,dy,dz or dc is set to 0, the instance image becomes empty and all has its dimensions set to 0. No memory for pixel data is then allocated.
  • Memory buffer used to store previous pixel values is freed if necessary.
  • If the instance image is shared, this constructor actually does nothing more than verifying that new and old image dimensions fit.
  • Image pixels allocated by this function are not initialized. Use the function assign(const unsigned int,const unsigned int,const unsigned int,const unsigned int,const T) to assign an image of desired size with pixels set to a particular value.

Definition at line 8909 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::assign (  )  [inline]

In-place version of the default constructor/destructor.

This function replaces the instance image by an empty image.

Remarks:
  • Memory used by the previous content of the instance image is freed if necessary.
  • If the instance image was initially shared, it is replaced by a (non-shared) empty image.
  • This function is useful to free memory used by an image that is not of use, but which has been created in the current code scope (i.e. not destroyed yet).

Definition at line 8887 of file CImg.h.

Referenced by cimg_library::CImg< charT >::append_object3d(), cimg_library::CImgList< charT >::assign(), cimg_library::CImg< charT >::assign(), cimg_library::CImg< charT >::CImg(), cimg_library::CImgList< charT >::CImgList(), cimg_library::CImg< charT >::clear(), cimg_library::CImgList< charT >::clear(), cimg_library::CImg< charT >::default_LUT256(), cimg_library::CImg< charT >::dijkstra(), cimg_library::CImg< charT >::draw_fill(), cimg_library::CImg< charT >::draw_mandelbrot(), cimg_library::CImg< charT >::draw_polygon(), cimg_library::CImg< charT >::draw_spline(), cimg_library::CImg< charT >::eigen(), cimg_library::CImg< charT >::empty(), cimg_library::CImg< charT >::FFT(), cimg_library::CImg< charT >::get_CImg3dtoobject3d(), cimg_library::CImg< charT >::get_select_graph(), cimg_library::CImg< charT >::get_vector_at(), cimg_library::CImg< charT >::load_cimg(), cimg_library::CImg< charT >::load_exr(), cimg_library::CImg< charT >::load_magick(), cimg_library::CImg< charT >::load_other(), cimg_library::CImg< charT >::load_parrec(), cimg_library::CImg< charT >::load_tiff(), cimg_library::CImgList< charT >::load_tiff(), cimg_library::CImg< charT >::move_to(), cimg_library::CImgList< charT >::move_to(), cimg_library::CImgList< charT >::operator=(), cimg_library::CImg< charT >::operator=(), cimg_library::CImg< charT >::resize(), cimg_library::CImg< charT >::solve(), cimg_library::CImg< charT >::sort(), cimg_library::CImg< charT >::SVD(), and cimg_library::CImg< charT >::symmetric_eigen().

template<typename T>
T& cimg_library::CImg< T >::at ( const int  off  )  [inline]

Read a pixel value with Neumann boundary conditions.

Definition at line 10058 of file CImg.h.

template<typename T>
T& cimg_library::CImg< T >::at ( const int  off,
const T  out_val 
) [inline]

Read a pixel value with Dirichlet boundary conditions.

Definition at line 10049 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::atan (  )  [inline]

Compute the arc-tangent of each pixel.

Definition at line 12357 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::atan2 ( const CImg< t > &  img  )  [inline]

Compute the arc-tangent of each pixel.

Definition at line 12368 of file CImg.h.

Referenced by cimg_library::CImg< charT >::draw_arrow(), and cimg_library::CImg< charT >::eigen().

template<typename T>
T& cimg_library::CImg< T >::atX ( const int  x,
const int  y = 0,
const int  z = 0,
const int  c = 0 
) [inline]

Read a pixel value with Neumann boundary conditions for the first coordinates (x).

Definition at line 10094 of file CImg.h.

template<typename T>
T& cimg_library::CImg< T >::atX ( const int  x,
const int  y,
const int  z,
const int  c,
const T  out_val 
) [inline]

Read a pixel value with Dirichlet boundary conditions for the first coordinates (x).

Definition at line 10085 of file CImg.h.

Referenced by cimg_library::CImgList< charT >::atNX(), cimg_library::CImg< charT >::cubic_atX(), and cimg_library::CImg< charT >::linear_atX().

template<typename T>
T& cimg_library::CImg< T >::atXY ( const int  x,
const int  y,
const int  z = 0,
const int  c = 0 
) [inline]

Read a pixel value with Neumann boundary conditions for the two first coordinates (x,y).

Definition at line 10128 of file CImg.h.

template<typename T>
T& cimg_library::CImg< T >::atXY ( const int  x,
const int  y,
const int  z,
const int  c,
const T  out_val 
) [inline]

Read a pixel value with Dirichlet boundary conditions for the two first coordinates (x,y).

Definition at line 10119 of file CImg.h.

Referenced by cimg_library::CImgList< charT >::atNXY(), cimg_library::CImg< charT >::cubic_atXY(), cimg_library::CImg< charT >::linear_atX(), and cimg_library::CImg< charT >::linear_atXY().

template<typename T>
T& cimg_library::CImg< T >::atXYZ ( const int  x,
const int  y,
const int  z,
const int  c = 0 
) [inline]

Read a pixel value with Neumann boundary conditions for the three first coordinates (x,y,z).

Definition at line 10163 of file CImg.h.

template<typename T>
T& cimg_library::CImg< T >::atXYZ ( const int  x,
const int  y,
const int  z,
const int  c,
const T  out_val 
) [inline]

Read a pixel value with Dirichlet boundary conditions for the three first coordinates (x,y,z).

Definition at line 10153 of file CImg.h.

Referenced by cimg_library::CImgList< charT >::atNXYZ(), cimg_library::CImg< charT >::cubic_atXYZ(), and cimg_library::CImg< charT >::linear_atXYZ().

template<typename T>
T& cimg_library::CImg< T >::atXYZC ( const int  x,
const int  y,
const int  z,
const int  c 
) [inline]

Read a pixel value with Neumann boundary conditions.

Definition at line 10200 of file CImg.h.

template<typename T>
T& cimg_library::CImg< T >::atXYZC ( const int  x,
const int  y,
const int  z,
const int  c,
const T  out_val 
) [inline]

Read a pixel value with Dirichlet boundary conditions.

Definition at line 10190 of file CImg.h.

Referenced by cimg_library::CImgList< charT >::atNXYZC(), and cimg_library::CImg< charT >::linear_atXYZC().

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::autocrop ( const CImg< t > &  color,
const char *const   axes = "zyx" 
) [inline]

Autocrop an image, regarding of the specified backround color.

Definition at line 19040 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::autocrop ( const T *const   color,
const char *const   axes = "zyx" 
) [inline]

Autocrop an image, regarding of the specified backround color.

Definition at line 18998 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::autocrop ( const T  value,
const char *const   axes = "czyx" 
) [inline]

Autocrop an image, regarding of the specified backround value.

Definition at line 18966 of file CImg.h.

template<typename T>
const T& cimg_library::CImg< T >::back (  )  const [inline]

Return a reference to the last image pixel (STL-compliant name).

Definition at line 10040 of file CImg.h.

Referenced by cimg_library::CImgList< charT >::value_string().

template<typename T>
CImg<T>& cimg_library::CImg< T >::BayertoRGB ( const unsigned int  interpolation_type = 3  )  [inline]

Convert a Bayer-coded image to a (R,G,B) color image.

Definition at line 16714 of file CImg.h.

template<typename T>
iterator cimg_library::CImg< T >::begin (  )  [inline]

Return an iterator to the first image pixel.

Definition at line 10013 of file CImg.h.

Referenced by cimg_library::CImg< charT >::print(), and cimg_library::CImgList< charT >::print().

template<typename T>
CImg<T>& cimg_library::CImg< T >::blur ( const float  sigma,
const bool  cond = true 
) [inline]

Return a blurred version of the image, using a Canny-Deriche filter.

Definition at line 20272 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::blur ( const float  sigmax,
const float  sigmay,
const float  sigmaz,
const bool  cond = true 
) [inline]

Return a blurred version of the image, using a Canny-Deriche filter.

Blur the image with an anisotropic exponential filter (Deriche filter of order 0).

Definition at line 20258 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::blur_anisotropic ( const float  amplitude,
const float  sharpness = 0.7f,
const float  anisotropy = 0.6f,
const float  alpha = 0.6f,
const float  sigma = 1.1f,
const float  dl = 0.8f,
const float  da = 30,
const float  gauss_prec = 2,
const unsigned int  interpolation_type = 0,
const bool  fast_approx = true 
) [inline]

Blur an image following in an anisotropic way.

Definition at line 20544 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::blur_anisotropic ( const CImg< t > &  G,
const float  amplitude = 60,
const float  dl = 0.8f,
const float  da = 30,
const float  gauss_prec = 2,
const unsigned int  interpolation_type = 0,
const bool  fast_approx = 1 
) [inline]

Blur the image anisotropically following a field of diffusion tensors.

Parameters:
G = Field of square roots of diffusion tensors/vectors used to drive the smoothing.
amplitude = amplitude of the smoothing.
dl = spatial discretization.
da = angular discretization.
gauss_prec = precision of the gaussian function.
interpolation Used interpolation scheme (0 = nearest-neighbor, 1 = linear, 2 = Runge-Kutta)
fast_approx = Tell to use the fast approximation or not.

Definition at line 20292 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::blur_bilateral ( const float  sigma_s,
const float  sigma_r,
const int  bgrid_s = -33,
const int  bgrid_r = 32,
const bool  interpolation_type = true 
) [inline]

Blur an image using the bilateral filter.

Definition at line 20657 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::blur_bilateral ( const float  sigma_x,
const float  sigma_y,
const float  sigma_z,
const float  sigma_r,
const int  bgrid_x,
const int  bgrid_y,
const int  bgrid_z,
const int  bgrid_r,
const bool  interpolation_type = true 
) [inline]

Blur an image using the bilateral filter.

Parameters:
sigma_x Amount of blur along the X-axis.
sigma_y Amount of blur along the Y-axis.
sigma_z Amount of blur along the Z-axis.
sigma_r Amount of blur along the range axis.
bgrid_x Size of the bilateral grid along the X-axis.
bgrid_y Size of the bilateral grid along the Y-axis.
bgrid_z Size of the bilateral grid along the Z-axis.
bgrid_r Size of the bilateral grid along the range axis.
interpolation_type Use interpolation for image slicing.
Note:
This algorithm uses the optimisation technique proposed by S. Paris and F. Durand, in ECCV'2006 (extended for 3d volumetric images).

Definition at line 20573 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::blur_median ( const unsigned int  n  )  [inline]

Apply a median filter.

Definition at line 20855 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::blur_patch ( const float  sigma_s,
const float  sigma_p,
const unsigned int  patch_size = 3,
const unsigned int  lookup_size = 4,
const float  smoothness = 0,
const bool  fast_approx = true 
) [inline]

Blur an image in its patch-based space.

Definition at line 20669 of file CImg.h.

template<typename T>
template<typename tf >
static CImg<floatT> cimg_library::CImg< T >::box3d ( CImgList< tf > &  primitives,
const float  size_x = 200,
const float  size_y = 100,
const float  size_z = 100 
) [inline, static]

Create and return a 3d box object.

Parameters:
[out] primitives The returned list of the 3d object primitives (template type tf should be at least unsigned int).
size_x The width of the box (dimension along the X-axis).
size_y The height of the box (dimension along the Y-axis).
size_z The depth of the box (dimension along the Z-axis).
Returns:
The N vertices (xi,yi,zi) of the 3d object as a Nx3 CImg<float> image (0<=i<=N-1).
Sample code :
       CImgList<unsigned int> faces3d;
       const CImg<float> points3d = CImg<float>::box3d(faces3d,10,20,30);
       CImg<unsigned char>().display_object3d(points3d,faces3d);
ref_box3d.jpg

Definition at line 23002 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::channel ( const unsigned int  c0  )  [inline]

Get a channel.

Definition at line 19147 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::channels ( const unsigned int  c0,
const unsigned int  c1 
) [inline]

Get a set of channels.

Definition at line 19156 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::clear ( void   )  [inline]

In-place version of the default constructor (STL-compliant name).

This function is strictly equivalent to assign() and has been introduced for having a STL-compatible function name.

Definition at line 8874 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::CMYKtoCMY (  )  [inline]

Convert (C,M,Y,K) pixels of a color image into the (C,M,Y) color space.

Definition at line 16426 of file CImg.h.

Referenced by cimg_library::CImg< charT >::CMYKtoRGB().

template<typename T>
CImg<T>& cimg_library::CImg< T >::CMYKtoRGB (  )  [inline]

Convert a (C,M,Y,K) image to a (R,G,B) one.

Definition at line 16675 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::CMYtoCMYK (  )  [inline]

Convert color pixels from (C,M,Y) to (C,M,Y,K).

Definition at line 16396 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::CMYtoRGB (  )  [inline]

Convert (C,M,Y) pixels of a color image into the (R,G,B) color space.

Definition at line 16369 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::column ( const unsigned int  x0  )  [inline]

Get one column.

Definition at line 19093 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::columns ( const unsigned int  x0,
const unsigned int  x1 
) [inline]

Get a set of columns.

Definition at line 19102 of file CImg.h.

template<typename T>
template<typename tf >
static CImg<floatT> cimg_library::CImg< T >::cone3d ( CImgList< tf > &  primitives,
const float  radius = 50,
const float  size_z = 100,
const unsigned int  subdivisions = 24 
) [inline, static]

Create and return a 3d cone.

Parameters:
[out] primitives The returned list of the 3d object primitives (template type tf should be at least unsigned int).
radius The radius of the cone basis.
size_z The cone's height.
subdivisions The number of basis angular subdivisions.
Returns:
The N vertices (xi,yi,zi) of the 3d object as a Nx3 CImg<float> image (0<=i<=N-1).
Sample code :
       CImgList<unsigned int> faces3d;
       const CImg<float> points3d = CImg<float>::cone3d(faces3d,50);
       CImg<unsigned char>().display_object3d(points3d,faces3d);
ref_cone3d.jpg

Definition at line 23028 of file CImg.h.

template<typename T>
bool cimg_library::CImg< T >::contains ( const T &  pixel  )  const [inline]

Return true if specified referenced value is inside the image boundaries.

Definition at line 11126 of file CImg.h.

template<typename T>
template<typename t >
bool cimg_library::CImg< T >::contains ( const T &  pixel,
t &  x 
) const [inline]

Return true if specified referenced value is inside image boundaries. If true, returns pixel coordinates in (x).

Definition at line 11118 of file CImg.h.

template<typename T>
template<typename t >
bool cimg_library::CImg< T >::contains ( const T &  pixel,
t &  x,
t &  y 
) const [inline]

Return true if specified referenced value is inside image boundaries. If true, returns pixel coordinates in (x,y).

Definition at line 11106 of file CImg.h.

template<typename T>
template<typename t >
bool cimg_library::CImg< T >::contains ( const T &  pixel,
t &  x,
t &  y,
t &  z 
) const [inline]

Return true if specified referenced value is inside image boundaries. If true, returns pixel coordinates in (x,y,z).

Definition at line 11092 of file CImg.h.

template<typename T>
template<typename t >
bool cimg_library::CImg< T >::contains ( const T &  pixel,
t &  x,
t &  y,
t &  z,
t &  c 
) const [inline]

Return true if specified referenced value is inside image boundaries. If true, returns pixel coordinates in (x,y,z,c).

Definition at line 11076 of file CImg.h.

template<typename T>
bool cimg_library::CImg< T >::containsXYZC ( const int  x,
const int  y = 0,
const int  z = 0,
const int  c = 0 
) const [inline]

Return true if pixel (x,y,z,c) is inside image boundaries.

Definition at line 11070 of file CImg.h.

template<typename T>
static CImg<Tuchar> cimg_library::CImg< T >::contrast_LUT256 (  )  [inline, static]

Return a contrasted indexed color palette with 256 (R,G,B) entries.

Returns:
An instance of a contrasted color palette with 256 (R,G,B) colors.
ref_contrast_LUT256.jpg

Definition at line 15968 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::convolve ( const CImg< t > &  mask,
const unsigned int  cond = 1,
const bool  weighted_convol = false 
) [inline]

Compute the convolution of the image by a mask.

The result res of the convolution of an image img by a mask mask is defined to be :

res(x,y,z) = sum_{i,j,k} img(x-i,y-j,z-k)*mask(i,j,k)

Parameters:
mask = the correlation kernel.
cond = the border condition type (0=zero, 1=dirichlet)
weighted_convol = enable local normalization.

Definition at line 19627 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::correlate ( const CImg< t > &  mask,
const unsigned int  cond = 1,
const bool  weighted_correl = false 
) [inline]

Compute the correlation of the instance image by a mask.

The correlation of the instance image *this by the mask mask is defined to be :

res(x,y,z) = sum_{i,j,k} (*this)(x+i,y+j,z+k)*mask(i,j,k)

Parameters:
mask = the correlation kernel.
cond = the border condition type (0=zero, 1=dirichlet)
weighted_correl = enable local normalization.

Definition at line 19395 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::cos (  )  [inline]

Compute the cosinus of each pixel value.

Definition at line 12267 of file CImg.h.

Referenced by cimg_library::CImg< charT >::HSItoRGB(), and cimg_library::CImg< charT >::torus3d().

template<typename T>
CImg<T>& cimg_library::CImg< T >::cosh (  )  [inline]

Compute the hyperbolic cosine of each pixel value.

Definition at line 12307 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::crop ( const int  x0,
const int  x1,
const bool  border_condition = false 
) [inline]

Get a rectangular part of the instance image.

Parameters:
x0 = X-coordinate of the upper-left crop rectangle corner.
x1 = X-coordinate of the lower-right crop rectangle corner.
border_condition = determine the type of border condition if some of the desired region is outside the image.

Definition at line 18957 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::crop ( const int  x0,
const int  y0,
const int  x1,
const int  y1,
const bool  border_condition = false 
) [inline]

Get a rectangular part of the instance image.

Parameters:
x0 = X-coordinate of the upper-left crop rectangle corner.
y0 = Y-coordinate of the upper-left crop rectangle corner.
x1 = X-coordinate of the lower-right crop rectangle corner.
y1 = Y-coordinate of the lower-right crop rectangle corner.
border_condition = determine the type of border condition if some of the desired region is outside the image.

Definition at line 18938 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::crop ( const int  x0,
const int  y0,
const int  z0,
const int  x1,
const int  y1,
const int  z1,
const bool  border_condition = false 
) [inline]

Get a rectangular part of the instance image.

Parameters:
x0 = X-coordinate of the upper-left crop rectangle corner.
y0 = Y-coordinate of the upper-left crop rectangle corner.
z0 = Z-coordinate of the upper-left crop rectangle corner.
x1 = X-coordinate of the lower-right crop rectangle corner.
y1 = Y-coordinate of the lower-right crop rectangle corner.
z1 = Z-coordinate of the lower-right crop rectangle corner.
border_condition = determine the type of border condition if some of the desired region is outside the image.

Definition at line 18917 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::crop ( const int  x0,
const int  y0,
const int  z0,
const int  c0,
const int  x1,
const int  y1,
const int  z1,
const int  c1,
const bool  border_condition = false 
) [inline]

Get a square region of the image.

Parameters:
x0 = X-coordinate of the upper-left crop rectangle corner.
y0 = Y-coordinate of the upper-left crop rectangle corner.
z0 = Z-coordinate of the upper-left crop rectangle corner.
c0 = C-coordinate of the upper-left crop rectangle corner.
x1 = X-coordinate of the lower-right crop rectangle corner.
y1 = Y-coordinate of the lower-right crop rectangle corner.
z1 = Z-coordinate of the lower-right crop rectangle corner.
c1 = C-coordinate of the lower-right crop rectangle corner.
border_condition = Dirichlet (false) or Neumann border conditions.

Definition at line 18883 of file CImg.h.

Referenced by cimg_library::CImgList< charT >::value_string(), and cimg_library::CImg< charT >::value_string().

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::cross ( const CImg< t > &  img  )  [inline]

Compute the cross product between two 3d vectors.

Definition at line 13356 of file CImg.h.

template<typename T>
Tfloat cimg_library::CImg< T >::cubic_atX ( const float  fx,
const int  y,
const int  z,
const int  c,
const Tfloat  min_val,
const Tfloat  max_val 
) const [inline]

Read a pixel value using cubic interpolation and Neumann boundary conditions (first coordinates).

Definition at line 10497 of file CImg.h.

template<typename T>
Tfloat cimg_library::CImg< T >::cubic_atX ( const float  fx,
const int  y = 0,
const int  z = 0,
const int  c = 0 
) const [inline]

Read a pixel value using cubic interpolation and Neumann boundary conditions (first coordinates).

Definition at line 10488 of file CImg.h.

template<typename T>
Tfloat cimg_library::CImg< T >::cubic_atX ( const float  fx,
const int  y,
const int  z,
const int  c,
const T  out_val,
const Tfloat  min_val,
const Tfloat  max_val 
) const [inline]

Read a pixel value using cubic interpolation and Dirichlet boundary conditions (first coordinates).

Definition at line 10481 of file CImg.h.

template<typename T>
Tfloat cimg_library::CImg< T >::cubic_atX ( const float  fx,
const int  y,
const int  z,
const int  c,
const T  out_val 
) const [inline]

Read a pixel value using cubic interpolation and Dirichlet boundary conditions (first coordinates).

Definition at line 10469 of file CImg.h.

Referenced by cimg_library::CImg< charT >::cubic_atX().

template<typename T>
Tfloat cimg_library::CImg< T >::cubic_atXY ( const float  fx,
const float  fy,
const int  z,
const int  c,
const Tfloat  min_val,
const Tfloat  max_val 
) const [inline]

Read a pixel value using cubic interpolation and Neumann boundary conditions.

Definition at line 10562 of file CImg.h.

template<typename T>
Tfloat cimg_library::CImg< T >::cubic_atXY ( const float  fx,
const float  fy,
const int  z = 0,
const int  c = 0 
) const [inline]

Read a pixel value using cubic interpolation and Neumann boundary conditions.

Definition at line 10552 of file CImg.h.

template<typename T>
Tfloat cimg_library::CImg< T >::cubic_atXY ( const float  fx,
const float  fy,
const int  z,
const int  c,
const T  out_val,
const Tfloat  min_val,
const Tfloat  max_val 
) const [inline]

Read a pixel value using cubic interpolation and Dirichlet boundary conditions.

Definition at line 10545 of file CImg.h.

template<typename T>
Tfloat cimg_library::CImg< T >::cubic_atXY ( const float  fx,
const float  fy,
const int  z,
const int  c,
const T  out_val 
) const [inline]

Read a pixel value using cubic interpolation and Dirichlet boundary conditions.

Definition at line 10527 of file CImg.h.

Referenced by cimg_library::CImg< charT >::cubic_atXY().

template<typename T>
Tfloat cimg_library::CImg< T >::cubic_atXYZ ( const float  fx,
const float  fy,
const float  fz,
const int  c,
const Tfloat  min_val,
const Tfloat  max_val 
) const [inline]

Read a pixel value using cubic interpolation and Neumann boundary conditions.

Definition at line 10678 of file CImg.h.

template<typename T>
Tfloat cimg_library::CImg< T >::cubic_atXYZ ( const float  fx,
const float  fy,
const float  fz,
const int  c = 0 
) const [inline]

Read a pixel value using cubic interpolation and Neumann boundary conditions.

Definition at line 10668 of file CImg.h.

template<typename T>
Tfloat cimg_library::CImg< T >::cubic_atXYZ ( const float  fx,
const float  fy,
const float  fz,
const int  c,
const T  out_val,
const Tfloat  min_val,
const Tfloat  max_val 
) const [inline]

Read a pixel value using cubic interpolation and Dirichlet boundary conditions.

Definition at line 10661 of file CImg.h.

template<typename T>
Tfloat cimg_library::CImg< T >::cubic_atXYZ ( const float  fx,
const float  fy,
const float  fz,
const int  c,
const T  out_val 
) const [inline]

Read a pixel value using cubic interpolation and Dirichlet boundary conditions.

Definition at line 10598 of file CImg.h.

Referenced by cimg_library::CImg< charT >::cubic_atXYZ().

template<typename T>
CImg<T>& cimg_library::CImg< T >::cut ( const T  value_min,
const T  value_max 
) [inline]

Cut values of the instance image between value_min and value_max.

Parameters:
value_min Minimum desired value of the resulting image.
value_max Maximum desired value of the resulting image.
Returns:
A reference to the modified instance image.
Note:
  • Function CImg<T>::get_cut() is also defined. It returns a non-shared modified copy of the instance image.
Sample code :
       const CImg<float> img("reference.jpg"), res = img.get_cut(160,220);
       (img,res).display();
ref_cut.jpg

Definition at line 15364 of file CImg.h.

template<typename T>
template<typename tf >
static CImg<floatT> cimg_library::CImg< T >::cylinder3d ( CImgList< tf > &  primitives,
const float  radius = 50,
const float  size_z = 100,
const unsigned int  subdivisions = 24 
) [inline, static]

Create and return a 3d cylinder.

Parameters:
[out] primitives The returned list of the 3d object primitives (template type tf should be at least unsigned int).
radius The radius of the cylinder basis.
size_z The cylinder's height.
subdivisions The number of basis angular subdivisions.
Returns:
The N vertices (xi,yi,zi) of the 3d object as a Nx3 CImg<float> image (0<=i<=N-1).
Sample code :
       CImgList<unsigned int> faces3d;
       const CImg<float> points3d = CImg<float>::cylinder3d(faces3d,50);
       CImg<unsigned char>().display_object3d(points3d,faces3d);
ref_cylinder3d.jpg

Definition at line 23065 of file CImg.h.

template<typename T>
T* cimg_library::CImg< T >::data ( const unsigned int  x,
const unsigned int  y = 0,
const unsigned int  z = 0,
const unsigned int  c = 0 
) [inline]

Return a pointer to the pixel value located at (x,y,z,v).

Parameters:
x X-coordinate of the pixel.
y Y-coordinate of the pixel.
z Z-coordinate of the pixel.
v C-coordinate of the pixel.
  • When called without parameters, data() returns a pointer to the begining of the pixel buffer.
  • If the macro 'cimg_verbosity'>=3, boundary checking is performed and warning messages may appear if given coordinates are outside the image range (but function performances decrease).
example:
       CImg<float> img(100,100,1,1,0);   // Define a 100x100 greyscale image with float-valued pixels.
       float *ptr = data(10,10);         // Get a pointer to the pixel located at (10,10).
       float val = *ptr;                 // Get the pixel value.

Definition at line 9983 of file CImg.h.

template<typename T>
T* cimg_library::CImg< T >::data (  )  [inline]

Return a pointer to the pixel buffer.

Definition at line 9940 of file CImg.h.

Referenced by cimg_library::CImg< charT >::CMYtoRGB(), cimg_library::CImg< charT >::display_graph(), cimg_library::CImg< charT >::draw_fill(), cimg_library::CImg< charT >::draw_gaussian(), cimg_library::CImg< charT >::draw_image(), cimg_library::CImg< charT >::draw_line(), cimg_library::CImg< charT >::draw_point(), cimg_library::CImg< charT >::draw_rectangle(), cimg_library::CImg< charT >::draw_triangle(), cimg_library::CImg< charT >::elevation3d(), cimg_library::CImg< charT >::FFT(), cimg_library::CImg< charT >::get_matrix_at(), cimg_library::CImg< charT >::get_tensor_at(), cimg_library::CImg< charT >::get_vector_at(), cimg_library::CImg< charT >::HSItoRGB(), cimg_library::CImg< charT >::HSLtoRGB(), cimg_library::CImg< charT >::HSVtoRGB(), cimg_library::CImg< charT >::LabtoXYZ(), cimg_library::CImg< charT >::load_exr(), cimg_library::CImg< charT >::load_magick(), cimg_library::CImg< charT >::mirror(), cimg_library::CImg< charT >::RGBtoCMY(), cimg_library::CImg< charT >::RGBtoHSI(), cimg_library::CImg< charT >::RGBtoHSL(), cimg_library::CImg< charT >::RGBtoHSV(), cimg_library::CImg< charT >::RGBtoXYZ(), cimg_library::CImg< charT >::RGBtoYCbCr(), cimg_library::CImg< charT >::RGBtoYUV(), cimg_library::CImg< charT >::save_exr(), cimg_library::CImg< charT >::save_magick(), cimg_library::CImg< charT >::set_tensor_at(), cimg_library::CImg< charT >::set_vector_at(), cimg_library::CImg< charT >::shift(), cimg_library::CImg< charT >::streamline(), cimg_library::CImg< charT >::SVD(), cimg_library::CImg< charT >::symmetric_eigen(), cimg_library::CImg< charT >::xyYtoXYZ(), cimg_library::CImg< charT >::XYZtoLab(), cimg_library::CImg< charT >::XYZtoRGB(), cimg_library::CImg< charT >::XYZtoxyY(), cimg_library::CImg< charT >::YCbCrtoRGB(), and cimg_library::CImg< charT >::YUVtoRGB().

template<typename T>
static CImg<Tuchar> cimg_library::CImg< T >::default_LUT256 (  )  [inline, static]

Return a default indexed color palette with 256 (R,G,B) entries.

Returns:
An instance of a default color palette with 256 (R,G,B) colors.
Note:
This color palette is particularly used by CImg when displaying images on 256 colors displays. It consists in the quantification of the (R,G,B) color space using 3:3:2 bits for color coding (i.e 8 levels for the Red and Green and 4 levels for the Blue).
ref_default_LUT256.jpg

Definition at line 15927 of file CImg.h.

template<typename T>
int cimg_library::CImg< T >::depth (  )  const [inline]
template<typename T>
CImg<T>& cimg_library::CImg< T >::deriche ( const float  sigma,
const int  order = 0,
const char  axis = 'x',
const bool  cond = true 
) [inline]

Compute the result of the Deriche filter.

The Canny-Deriche filter is a recursive algorithm allowing to compute blurred derivatives of order 0,1 or 2 of an image.

Definition at line 20162 of file CImg.h.

template<typename T>
Tdouble cimg_library::CImg< T >::det (  )  const [inline]

Return the determinant of the image, viewed as a matrix.

Definition at line 13112 of file CImg.h.

Referenced by cimg_library::CImg< charT >::invert().

template<typename T>
static CImg<T> cimg_library::CImg< T >::diagonal ( const T &  a0,
const T &  a1,
const T &  a2,
const T &  a3,
const T &  a4 
) [inline, static]

Return a 5x5 diagonal matrix with specified coefficients.

Definition at line 14552 of file CImg.h.

template<typename T>
static CImg<T> cimg_library::CImg< T >::diagonal ( const T &  a0,
const T &  a1,
const T &  a2,
const T &  a3 
) [inline, static]

Return a 4x4 diagonal matrix with specified coefficients.

Definition at line 14547 of file CImg.h.

template<typename T>
static CImg<T> cimg_library::CImg< T >::diagonal ( const T &  a0,
const T &  a1,
const T &  a2 
) [inline, static]

Return a 3x3 diagonal matrix with specified coefficients.

Definition at line 14542 of file CImg.h.

template<typename T>
static CImg<T> cimg_library::CImg< T >::diagonal ( const T &  a0,
const T &  a1 
) [inline, static]

Return a 2x2 diagonal matrix with specified coefficients.

Definition at line 14537 of file CImg.h.

template<typename T>
static CImg<T> cimg_library::CImg< T >::diagonal ( const T &  a0  )  [inline, static]

Return a 1x1 diagonal matrix with specified coefficients.

Definition at line 14532 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::diagonal (  )  [inline]

Get a diagonal matrix, whose diagonal coefficients are the coefficients of the input image.

Definition at line 13303 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::dijkstra ( const unsigned int  starting_node,
const unsigned int  ending_node = ~0U 
) [inline]

Return minimal path in a graph, using the Dijkstra algorithm.

Definition at line 14052 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::dijkstra ( const unsigned int  starting_node,
const unsigned int  ending_node,
CImg< t > &  previous 
) [inline]

Return minimal path in a graph, using the Dijkstra algorithm.

Instance image corresponds to the adjacency matrix of the graph.

Parameters:
starting_node Indice of the starting node.
previous Array that gives the previous node indice in the path to the starting node (optional parameter).
Returns:
Array of distances of each node to the starting node.

Definition at line 14037 of file CImg.h.

template<typename T>
template<typename tf , typename t >
static CImg<T> cimg_library::CImg< T >::dijkstra ( const tf &  distance,
const unsigned int  nb_nodes,
const unsigned int  starting_node,
const unsigned int  ending_node = ~0U 
) [inline, static]

Return minimal path in a graph, using the Dijkstra algorithm.

Definition at line 14023 of file CImg.h.

template<typename T>
template<typename tf , typename t >
static CImg<T> cimg_library::CImg< T >::dijkstra ( const tf &  distance,
const unsigned int  nb_nodes,
const unsigned int  starting_node,
const unsigned int  ending_node,
CImg< t > &  previous 
) [inline, static]

Compute minimal path in a graph, using the Dijkstra algorithm.

Parameters:
distance An object having operator()(unsigned int i, unsigned int j) which returns distance between two nodes (i,j).
nb_nodes Number of graph nodes.
starting_node Indice of the starting node.
ending_node Indice of the ending node (set to ~0U to ignore ending node).
previous Array that gives the previous node indice in the path to the starting node (optional parameter).
Returns:
Array of distances of each node to the starting node.

Definition at line 13974 of file CImg.h.

Referenced by cimg_library::CImg< charT >::dijkstra().

template<typename T>
CImg<T>& cimg_library::CImg< T >::dilate ( const unsigned int  s  )  [inline]

Erode the image by a square structuring element of size sx.

Definition at line 19996 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::dilate ( const unsigned int  sx,
const unsigned int  sy,
const unsigned int  sz = 1 
) [inline]

Dilate the image by a rectangular structuring element of size sx,sy,sz.

Definition at line 19913 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::dilate ( const CImg< t > &  mask,
const unsigned int  cond = 1,
const bool  weighted_dilatation = false 
) [inline]

Dilate the image by a structuring element.

Definition at line 19826 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::displacement ( const CImg< T > &  target,
const float  smooth = 0.1f,
const float  precision = 0.1f,
const unsigned int  nb_scales = 0,
const unsigned int  iteration_max = 1000,
const bool  backward = true 
) [inline]

Estimate a displacement field between instance image and given target image.

Parameters:
backward : if false, match I2(X+U(X)) = I1(X), else match I2(X) = I1(X-U(X)).

Definition at line 21448 of file CImg.h.

template<typename T>
const CImg<T>& cimg_library::CImg< T >::display ( const char *const   title = 0,
const bool  display_info = true 
) const [inline]

Display an image in a window with a title title, and wait a '_is_closed' or 'keyboard' event.
.

Definition at line 32692 of file CImg.h.

template<typename T>
const CImg<T>& cimg_library::CImg< T >::display ( CImgDisplay disp,
const bool  display_info 
) const [inline]

Display an image in a window with a title title, and wait a '_is_closed' or 'keyboard' event.
.

Definition at line 32687 of file CImg.h.

template<typename T>
const CImg<T>& cimg_library::CImg< T >::display ( CImgDisplay disp  )  const [inline]
template<typename T>
const CImg<T>& cimg_library::CImg< T >::display_graph ( const char *const   title = 0,
const unsigned int  plot_type = 1,
const unsigned int  vertex_type = 1,
const char *const   labelx = 0,
const double  xmin = 0,
const double  xmax = 0,
const char *const   labely = 0,
const double  ymin = 0,
const double  ymax = 0 
) const [inline]

High-level interface for displaying a graph.

Definition at line 33559 of file CImg.h.

template<typename T>
const CImg<T>& cimg_library::CImg< T >::display_graph ( CImgDisplay disp,
const unsigned int  plot_type = 1,
const unsigned int  vertex_type = 1,
const char *const   labelx = 0,
const double  xmin = 0,
const double  xmax = 0,
const char *const   labely = 0,
const double  ymin = 0,
const double  ymax = 0 
) const [inline]

High-level interface for displaying a graph.

Definition at line 33446 of file CImg.h.

Referenced by cimg_library::CImg< charT >::display_graph().

template<typename T>
template<typename tp >
const CImg<T>& cimg_library::CImg< T >::display_object3d ( const char *const   title,
const CImg< tp > &  vertices,
const bool  centering = true,
const int  render_static = 4,
const int  render_motion = 1,
const bool  double_sided = true,
const float  focale = 500,
const float  light_x = 0,
const float  light_y = 0,
const float  light_z = -5000,
const float  specular_light = 0.2f,
const float  specular_shine = 0.1f,
const bool  display_axes = true,
float *const   pose_matrix = 0 
) const [inline]

High-level interface for displaying a 3d object.

Definition at line 33024 of file CImg.h.

template<typename T>
template<typename tp >
const CImg<T>& cimg_library::CImg< T >::display_object3d ( CImgDisplay disp,
const CImg< tp > &  vertices,
const bool  centering = true,
const int  render_static = 4,
const int  render_motion = 1,
const bool  double_sided = true,
const float  focale = 500,
const float  light_x = 0,
const float  light_y = 0,
const float  light_z = -5000,
const float  specular_light = 0.2f,
const float  specular_shine = 0.1f,
const bool  display_axes = true,
float *const   pose_matrix = 0 
) const [inline]

High-level interface for displaying a 3d object.

Definition at line 33008 of file CImg.h.

template<typename T>
template<typename tp , typename tf >
const CImg<T>& cimg_library::CImg< T >::display_object3d ( const char *const   title,
const CImg< tp > &  vertices,
const CImgList< tf > &  primitives,
const bool  centering = true,
const int  render_static = 4,
const int  render_motion = 1,
const bool  double_sided = true,
const float  focale = 500,
const float  light_x = 0,
const float  light_y = 0,
const float  light_z = -5000,
const float  specular_light = 0.2f,
const float  specular_shine = 0.1f,
const bool  display_axes = true,
float *const   pose_matrix = 0 
) const [inline]

High-level interface for displaying a 3d object.

Definition at line 32991 of file CImg.h.

template<typename T>
template<typename tp , typename tf >
const CImg<T>& cimg_library::CImg< T >::display_object3d ( CImgDisplay disp,
const CImg< tp > &  vertices,
const CImgList< tf > &  primitives,
const bool  centering = true,
const int  render_static = 4,
const int  render_motion = 1,
const bool  double_sided = true,
const float  focale = 500,
const float  light_x = 0,
const float  light_y = 0,
const float  light_z = -5000,
const float  specular_light = 0.2f,
const float  specular_shine = 0.1f,
const bool  display_axes = true,
float *const   pose_matrix = 0 
) const [inline]

High-level interface for displaying a 3d object.

Definition at line 32974 of file CImg.h.

template<typename T>
template<typename tp , typename tf , typename tc >
const CImg<T>& cimg_library::CImg< T >::display_object3d ( const char *const   title,
const CImg< tp > &  vertices,
const CImgList< tf > &  primitives,
const CImgList< tc > &  colors,
const bool  centering = true,
const int  render_static = 4,
const int  render_motion = 1,
const bool  double_sided = true,
const float  focale = 500,
const float  light_x = 0,
const float  light_y = 0,
const float  light_z = -5000,
const float  specular_light = 0.2f,
const float  specular_shine = 0.1f,
const bool  display_axes = true,
float *const   pose_matrix = 0 
) const [inline]

High-level interface for displaying a 3d object.

Definition at line 32956 of file CImg.h.

template<typename T>
template<typename tp , typename tf , typename tc >
const CImg<T>& cimg_library::CImg< T >::display_object3d ( CImgDisplay disp,
const CImg< tp > &  vertices,
const CImgList< tf > &  primitives,
const CImgList< tc > &  colors,
const bool  centering = true,
const int  render_static = 4,
const int  render_motion = 1,
const bool  double_sided = true,
const float  focale = 500,
const float  light_x = 0,
const float  light_y = 0,
const float  light_z = -5000,
const float  specular_light = 0.2f,
const float  specular_shine = 0.1f,
const bool  display_axes = true,
float *const   pose_matrix = 0 
) const [inline]

High-level interface for displaying a 3d object.

Definition at line 32938 of file CImg.h.

template<typename T>
template<typename tp , typename tf , typename tc , typename to >
const CImg<T>& cimg_library::CImg< T >::display_object3d ( const char *const   title,
const CImg< tp > &  vertices,
const CImgList< tf > &  primitives,
const CImgList< tc > &  colors,
const to &  opacities,
const bool  centering = true,
const int  render_static = 4,
const int  render_motion = 1,
const bool  double_sided = true,
const float  focale = 500,
const float  light_x = 0,
const float  light_y = 0,
const float  light_z = -5000,
const float  specular_light = 0.2f,
const float  specular_shine = 0.1f,
const bool  display_axes = true,
float *const   pose_matrix = 0 
) const [inline]

High-level interface for displaying a 3d object.

Definition at line 32918 of file CImg.h.

template<typename T>
template<typename tp , typename tf , typename tc , typename to >
const CImg<T>& cimg_library::CImg< T >::display_object3d ( CImgDisplay disp,
const CImg< tp > &  vertices,
const CImgList< tf > &  primitives,
const CImgList< tc > &  colors,
const to &  opacities,
const bool  centering = true,
const int  render_static = 4,
const int  render_motion = 1,
const bool  double_sided = true,
const float  focale = 500,
const float  light_x = 0,
const float  light_y = 0,
const float  light_z = -5000,
const float  specular_light = 0.2f,
const float  specular_shine = 0.1f,
const bool  display_axes = true,
float *const   pose_matrix = 0 
) const [inline]

High-level interface for displaying a 3d object.

Definition at line 32899 of file CImg.h.

Referenced by cimg_library::CImg< charT >::display_object3d().

template<typename T>
CImg<T>& cimg_library::CImg< T >::distance ( const T  isovalue,
const float  sizex = 1,
const float  sizey = 1,
const float  sizez = 1,
const bool  compute_sqrt = true 
) [inline]

Compute the Euclidean distance map to a shape of specified isovalue.

Definition at line 21564 of file CImg.h.

Referenced by cimg_library::CImg< charT >::dijkstra().

template<typename T>
CImg<T>& cimg_library::CImg< T >::distance_eikonal ( const unsigned int  nb_iterations,
const float  band_size = 0,
const float  time_step = 0.5f 
) [inline]

Compute distance function from 0-valued isophotes by the application of an Eikonal PDE.

Definition at line 21670 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::div ( const CImg< t > &  img  )  [inline]

Pointwise division between two images.

Definition at line 12439 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::div ( const char *const   expression  )  [inline]

Pointwise division between an image and an expression.

Definition at line 12419 of file CImg.h.

Referenced by cimg_library::CImg< charT >::div().

template<typename T>
template<typename t >
Tdouble cimg_library::CImg< T >::dot ( const CImg< t > &  img  )  const [inline]

Return the dot product of the current vector/matrix with the vector/matrix img.

Definition at line 13143 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_arrow ( const int  x0,
const int  y0,
const int  x1,
const int  y1,
const tc *const   color,
const float  opacity = 1,
const float  angle = 30,
const float  length = -10,
const unsigned int  pattern = ~0U 
) [inline]

Draw a colored arrow in the instance image.

Parameters:
x0 X-coordinate of the starting arrow point (tail).
y0 Y-coordinate of the starting arrow point (tail).
x1 X-coordinate of the ending arrow point (head).
y1 Y-coordinate of the ending arrow point (head).
color Pointer to spectrum() consecutive values of type T, defining the drawing color.
angle Aperture angle of the arrow head (optional).
length Length of the arrow head. If negative, describes a percentage of the arrow length (optional).
opacity Drawing opacity (optional).
pattern An integer whose bits describe the line pattern (optional).
Note:
  • Clipping is supported.

Definition at line 24349 of file CImg.h.

Referenced by cimg_library::CImg< charT >::draw_axis(), and cimg_library::CImg< charT >::draw_quiver().

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_axes ( const float  x0,
const float  x1,
const float  y0,
const float  y1,
const tc *const   color,
const float  opacity = 1,
const int  subdivisionx = -60,
const int  subdivisiony = -60,
const float  precisionx = 0,
const float  precisiony = 0,
const unsigned int  patternx = ~0U,
const unsigned int  patterny = ~0U 
) [inline]

Draw a labeled horizontal+vertical axis on the instance image.

Definition at line 27728 of file CImg.h.

template<typename T>
template<typename tx , typename ty , typename tc >
CImg<T>& cimg_library::CImg< T >::draw_axes ( const CImg< tx > &  xvalues,
const CImg< ty > &  yvalues,
const tc *const   color,
const float  opacity = 1,
const unsigned int  patternx = ~0U,
const unsigned int  patterny = ~0U 
) [inline]

Draw a labeled horizontal+vertical axis on the instance image.

Definition at line 27698 of file CImg.h.

Referenced by cimg_library::CImg< charT >::draw_axes(), and cimg_library::CImg< charT >::get_select_graph().

template<typename T>
template<typename t , typename tc >
CImg<T>& cimg_library::CImg< T >::draw_axis ( const int  x,
const CImg< t > &  yvalues,
const tc *const   color,
const float  opacity = 1,
const unsigned int  pattern = ~0U 
) [inline]

Draw a labeled vertical axis on the instance image.

Definition at line 27670 of file CImg.h.

template<typename T>
template<typename t , typename tc >
CImg<T>& cimg_library::CImg< T >::draw_axis ( const CImg< t > &  xvalues,
const int  y,
const tc *const   color,
const float  opacity = 1,
const unsigned int  pattern = ~0U 
) [inline]

Draw a labeled horizontal axis on the instance image.

Parameters:
xvalues Lower bound of the x-range.
y Y-coordinate of the horizontal axis in the instance image.
color Array of spectrum() values of type T, defining the drawing color.
opacity Drawing opacity.
pattern Drawing pattern.
opacity_out Drawing opacity of 'outside' axes.
Note:
if precision==0, precision of the labels is automatically computed.

Definition at line 27646 of file CImg.h.

Referenced by cimg_library::CImg< charT >::draw_axes(), and cimg_library::CImg< charT >::get_select_graph().

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_circle ( const int  x0,
const int  y0,
int  radius,
const tc *const   color,
const float  opacity,
const unsigned  int 
) [inline]

Draw an outlined circle.

Parameters:
x0 X-coordinate of the circle center.
y0 Y-coordinate of the circle center.
radius Circle radius.
color Array of spectrum() values of type T, defining the drawing color.
opacity Drawing opacity.

Definition at line 27001 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_circle ( const int  x0,
const int  y0,
int  radius,
const tc *const   color,
const float  opacity = 1 
) [inline]

Draw a filled circle.

Parameters:
x0 X-coordinate of the circle center.
y0 Y-coordinate of the circle center.
radius Circle radius.
color Array of spectrum() values of type T, defining the drawing color.
opacity Drawing opacity.
Note:
  • Circle version of the Bresenham's algorithm is used.

Definition at line 26963 of file CImg.h.

Referenced by cimg_library::CImg< charT >::draw_graph().

template<typename T>
template<typename t , typename tc >
CImg<T>& cimg_library::CImg< T >::draw_ellipse ( const int  x0,
const int  y0,
const CImg< t > &  tensor,
const tc *const   color,
const float  opacity,
const unsigned int  pattern 
) [inline]

Draw an outlined ellipse.

Parameters:
x0 = X-coordinate of the ellipse center.
y0 = Y-coordinate of the ellipse center.
tensor = Diffusion tensor describing the ellipse.
color = array of spectrum() values of type T, defining the drawing color.
pattern = If zero, the ellipse is filled, else pattern is an integer whose bits describe the outline pattern.
opacity = opacity of the drawing.

Definition at line 27150 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_ellipse ( const int  x0,
const int  y0,
const float  r1,
const float  r2,
const float  angle,
const tc *const   color,
const float  opacity,
const unsigned int  pattern 
) [inline]

Draw an outlined ellipse.

Parameters:
x0 = X-coordinate of the ellipse center.
y0 = Y-coordinate of the ellipse center.
r1 = First radius of the ellipse.
r2 = Second radius of the ellipse.
ru = X-coordinate of the orientation vector related to the first radius.
rv = Y-coordinate of the orientation vector related to the first radius.
color = array of spectrum() values of type T, defining the drawing color.
pattern = If zero, the ellipse is filled, else pattern is an integer whose bits describe the outline pattern.
opacity = opacity of the drawing.

Definition at line 27134 of file CImg.h.

template<typename T>
template<typename t , typename tc >
CImg<T>& cimg_library::CImg< T >::draw_ellipse ( const int  x0,
const int  y0,
const CImg< t > &  tensor,
const tc *const   color,
const float  opacity = 1 
) [inline]

Draw a filled ellipse.

Parameters:
x0 = X-coordinate of the ellipse center.
y0 = Y-coordinate of the ellipse center.
tensor = Diffusion tensor describing the ellipse.
color = array of spectrum() values of type T, defining the drawing color.
opacity = opacity of the drawing.

Definition at line 27114 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_ellipse ( const int  x0,
const int  y0,
const float  r1,
const float  r2,
const float  angle,
const tc *const   color,
const float  opacity = 1 
) [inline]

Draw a filled ellipse.

Parameters:
x0 = X-coordinate of the ellipse center.
y0 = Y-coordinate of the ellipse center.
r1 = First radius of the ellipse.
r2 = Second radius of the ellipse.
angle = Angle of the first radius.
color = array of spectrum() values of type T, defining the drawing color.
opacity = opacity of the drawing.

Definition at line 27100 of file CImg.h.

Referenced by cimg_library::CImg< charT >::draw_ellipse().

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_fill ( const int  x,
const int  y,
const tc *const   color,
const float  opacity = 1,
const float  sigma = 0,
const bool  high_connexity = false 
) [inline]

Draw a 2d filled region starting from a point (x,y) in the instance image.

Parameters:
x = X-coordinate of the starting point of the region to fill.
y = Y-coordinate of the starting point of the region to fill.
color = an array of spectrum() values of type T, defining the drawing color.
sigma = tolerance concerning neighborhood values.
opacity = opacity of the drawing.

Definition at line 28160 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_fill ( const int  x,
const int  y,
const int  z,
const tc *const   color,
const float  opacity = 1,
const float  sigma = 0,
const bool  high_connexity = false 
) [inline]

Draw a 3d filled region starting from a point (x,y,\ z) in the instance image.

Parameters:
x = X-coordinate of the starting point of the region to fill.
y = Y-coordinate of the starting point of the region to fill.
z = Z-coordinate of the starting point of the region to fill.
color = an array of spectrum() values of type T, defining the drawing color.
sigma = tolerance concerning neighborhood values.
opacity = opacity of the drawing.

Definition at line 28144 of file CImg.h.

template<typename T>
template<typename tc , typename t >
CImg<T>& cimg_library::CImg< T >::draw_fill ( const int  x,
const int  y,
const int  z,
const tc *const   color,
const float  opacity,
CImg< t > &  region,
const float  sigma = 0,
const bool  high_connexity = false 
) [inline]

Draw a 3d filled region starting from a point (x,y,\ z) in the instance image.

Parameters:
x X-coordinate of the starting point of the region to fill.
y Y-coordinate of the starting point of the region to fill.
z Z-coordinate of the starting point of the region to fill.
color An array of spectrum() values of type T, defining the drawing color.
region Image that will contain the mask of the filled region mask, as an output.
sigma Tolerance concerning neighborhood values.
opacity Opacity of the drawing.
high_connexity Tells if 8-connexity must be used (only for 2d images).
Returns:
region is initialized with the binary mask of the filled region.

Definition at line 27951 of file CImg.h.

Referenced by cimg_library::CImg< charT >::draw_fill().

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_gaussian ( const float  xc,
const float  yc,
const float  zc,
const float  sigma,
const tc *const   color,
const float  opacity = 1 
) [inline]

Draw an isotropic 3d gaussian function.

Parameters:
xc = X-coordinate of the gaussian center.
yc = Y-coordinate of the gaussian center.
zc = Z-coordinate of the gaussian center.
sigma = standard variation of the gaussian distribution.
color = array of spectrum() values of type T, defining the drawing color.
opacity = opacity of the drawing.

Definition at line 28468 of file CImg.h.

template<typename T>
template<typename t , typename tc >
CImg<T>& cimg_library::CImg< T >::draw_gaussian ( const float  xc,
const float  yc,
const float  zc,
const CImg< t > &  tensor,
const tc *const   color,
const float  opacity = 1 
) [inline]

Draw an anisotropic 3d gaussian function.

Parameters:
xc = X-coordinate of the gaussian center.
yc = Y-coordinate of the gaussian center.
zc = Z-coordinate of the gaussian center.
tensor = 3x3 covariance matrix.
color = array of spectrum() values of type T, defining the drawing color.
opacity = opacity of the drawing.

Definition at line 28431 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_gaussian ( const float  xc,
const float  yc,
const float  sigma,
const tc *const   color,
const float  opacity = 1 
) [inline]

Draw an isotropic 2d gaussian function.

Parameters:
xc = X-coordinate of the gaussian center.
yc = Y-coordinate of the gaussian center.
sigma = standard variation of the gaussian distribution.
color = array of spectrum() values of type T, defining the drawing color.
opacity = opacity of the drawing.

Definition at line 28416 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_gaussian ( const int  xc,
const int  yc,
const float  r1,
const float  r2,
const float  ru,
const float  rv,
const tc *const   color,
const float  opacity = 1 
) [inline]

Draw an anisotropic 2d gaussian function.

Definition at line 28397 of file CImg.h.

template<typename T>
template<typename t , typename tc >
CImg<T>& cimg_library::CImg< T >::draw_gaussian ( const float  xc,
const float  yc,
const CImg< t > &  tensor,
const tc *const   color,
const float  opacity = 1 
) [inline]

Draw an anisotropic 2d gaussian function.

Parameters:
xc = X-coordinate of the gaussian center.
yc = Y-coordinate of the gaussian center.
tensor = 2x2 covariance matrix.
color = array of spectrum() values of type T, defining the drawing color.
opacity = opacity of the drawing.

Definition at line 28360 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_gaussian ( const float  xc,
const float  sigma,
const tc *const   color,
const float  opacity = 1 
) [inline]

Draw a 1d gaussian function in the instance image.

Parameters:
xc = X-coordinate of the gaussian center.
sigma = Standard variation of the gaussian distribution.
color = array of spectrum() values of type T, defining the drawing color.
opacity = opacity of the drawing.

Definition at line 28330 of file CImg.h.

Referenced by cimg_library::CImg< charT >::draw_gaussian().

template<typename T>
template<typename t , typename tc >
CImg<T>& cimg_library::CImg< T >::draw_graph ( const CImg< t > &  data,
const tc *const   color,
const float  opacity = 1,
const unsigned int  plot_type = 1,
const int  vertex_type = 1,
const double  ymin = 0,
const double  ymax = 0,
const bool  expand = false,
const unsigned int  pattern = ~0U 
) [inline]

Draw a 1d graph on the instance image.

Parameters:
data Image containing the graph values I = f(x).
color Array of spectrum() values of type T, defining the drawing color.
opacity Drawing opacity.
plot_type Define the type of the plot :

  • 0 = No plot.
  • 1 = Plot using segments.
  • 2 = Plot using cubic splines.
  • 3 = Plot with bars.
vertex_type Define the type of points :

  • 0 = No points.
  • 1 = Point.
  • 2 = Straight cross.
  • 3 = Diagonal cross.
  • 4 = Filled circle.
  • 5 = Outlined circle.
  • 6 = Square.
  • 7 = Diamond.
ymin Lower bound of the y-range.
ymax Upper bound of the y-range.
expand Expand plot along the X-axis.
pattern Drawing pattern.
Note:
  • if ymin==ymax==0, the y-range is computed automatically from the input samples.

Definition at line 27817 of file CImg.h.

Referenced by cimg_library::CImg< charT >::get_select_graph().

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_grid ( const float  deltax,
const float  deltay,
const float  offsetx,
const float  offsety,
const bool  invertx,
const bool  inverty,
const tc *const   color,
const float  opacity = 1,
const unsigned int  patternx = ~0U,
const unsigned int  patterny = ~0U 
) [inline]

Draw grid.

Definition at line 27765 of file CImg.h.

template<typename T>
template<typename tx , typename ty , typename tc >
CImg<T>& cimg_library::CImg< T >::draw_grid ( const CImg< tx > &  xvalues,
const CImg< ty > &  yvalues,
const tc *const   color,
const float  opacity = 1,
const unsigned int  patternx = ~0U,
const unsigned int  patterny = ~0U 
) [inline]
template<typename T>
template<typename ti , typename tm >
CImg<T>& cimg_library::CImg< T >::draw_image ( const CImg< ti > &  sprite,
const CImg< tm > &  mask,
const float  opacity = 1,
const float  mask_valmax = 1 
) [inline]

Draw an image.

Definition at line 27386 of file CImg.h.

template<typename T>
template<typename ti , typename tm >
CImg<T>& cimg_library::CImg< T >::draw_image ( const int  x0,
const CImg< ti > &  sprite,
const CImg< tm > &  mask,
const float  opacity = 1,
const float  mask_valmax = 1 
) [inline]

Draw an image.

Definition at line 27378 of file CImg.h.

template<typename T>
template<typename ti , typename tm >
CImg<T>& cimg_library::CImg< T >::draw_image ( const int  x0,
const int  y0,
const CImg< ti > &  sprite,
const CImg< tm > &  mask,
const float  opacity = 1,
const float  mask_valmax = 1 
) [inline]

Draw an image.

Definition at line 27370 of file CImg.h.

template<typename T>
template<typename ti , typename tm >
CImg<T>& cimg_library::CImg< T >::draw_image ( const int  x0,
const int  y0,
const int  z0,
const CImg< ti > &  sprite,
const CImg< tm > &  mask,
const float  opacity = 1,
const float  mask_valmax = 1 
) [inline]

Draw an image.

Definition at line 27362 of file CImg.h.

template<typename T>
template<typename ti , typename tm >
CImg<T>& cimg_library::CImg< T >::draw_image ( const int  x0,
const int  y0,
const int  z0,
const int  c0,
const CImg< ti > &  sprite,
const CImg< tm > &  mask,
const float  opacity = 1,
const float  mask_valmax = 1 
) [inline]

Draw a sprite image in the instance image (masked version).

Parameters:
sprite Sprite image.
mask Mask image.
x0 X-coordinate of the sprite position in the instance image.
y0 Y-coordinate of the sprite position in the instance image.
z0 Z-coordinate of the sprite position in the instance image.
c0 C-coordinate of the sprite position in the instance image.
mask_valmax Maximum pixel value of the mask image mask (optional).
opacity Drawing opacity.
Note:
  • Pixel values of mask set the opacity of the corresponding pixels in sprite.
  • Clipping is supported.
  • Dimensions along x,y and z of sprite and mask must be the same.

Definition at line 27301 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::draw_image ( const CImg< t > &  sprite,
const float  opacity = 1 
) [inline]

Draw an image.

Definition at line 27281 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::draw_image ( const int  x0,
const CImg< t > &  sprite,
const float  opacity = 1 
) [inline]

Draw an image.

Definition at line 27274 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::draw_image ( const int  x0,
const int  y0,
const CImg< t > &  sprite,
const float  opacity = 1 
) [inline]

Draw an image.

Definition at line 27267 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::draw_image ( const int  x0,
const int  y0,
const int  z0,
const CImg< t > &  sprite,
const float  opacity = 1 
) [inline]

Draw an image.

Definition at line 27260 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::draw_image ( const int  x0,
const int  y0,
const int  z0,
const int  c0,
const CImg< t > &  sprite,
const float  opacity = 1 
) [inline]

Draw an image.

Parameters:
sprite Sprite image.
x0 X-coordinate of the sprite position.
y0 Y-coordinate of the sprite position.
z0 Z-coordinate of the sprite position.
c0 C-coordinate of the sprite position.
opacity Drawing opacity (optional).
Note:
  • Clipping is supported.

Definition at line 27170 of file CImg.h.

Referenced by cimg_library::cimg::dialog(), cimg_library::CImg< charT >::draw_image(), cimg_library::CImg< charT >::get_select_graph(), and cimg_library::CImg< charT >::load_tiff().

template<typename T>
template<typename t , typename tc >
CImg<T>& cimg_library::CImg< T >::draw_line ( const CImg< t > &  points,
const tc *const   color,
const float  opacity = 1,
const unsigned int  pattern = ~0U,
const bool  init_hatch = true 
) [inline]

Draw a set of consecutive colored lines in the instance image.

Parameters:
points Coordinates of vertices, stored as a list of vectors.
color Pointer to spectrum() consecutive values of type T, defining the drawing color.
opacity Drawing opacity (optional).
pattern An integer whose bits describe the line pattern (optional).
init_hatch If set to true, init hatch motif.
Note:
  • This function uses several call to the single CImg::draw_line() procedure, depending on the vectors size in points.
Example:
       CImg<unsigned char> img(100,100,1,3,0);
       const unsigned char color[] = { 255,128,64 };
       CImgList<int> points;
       points.insert(CImg<int>::vector(0,0)).
             .insert(CImg<int>::vector(70,10)).
             .insert(CImg<int>::vector(80,60)).
             .insert(CImg<int>::vector(10,90));
       img.draw_line(points,color);

Definition at line 24298 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_line ( CImg< floatT > &  zbuffer,
const int  x0,
const int  y0,
const float  z0,
const int  x1,
const int  y1,
const float  z1,
const CImg< tc > &  texture,
const int  tx0,
const int  ty0,
const int  tx1,
const int  ty1,
const float  opacity = 1,
const unsigned int  pattern = ~0U,
const bool  init_hatch = true 
) [inline]

Draw a 2d textured line, with z-buffering and perspective correction.

Definition at line 24139 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_line ( const int  x0,
const int  y0,
const float  z0,
const int  x1,
const int  y1,
const float  z1,
const CImg< tc > &  texture,
const int  tx0,
const int  ty0,
const int  tx1,
const int  ty1,
const float  opacity = 1,
const unsigned int  pattern = ~0U,
const bool  init_hatch = true 
) [inline]

Draw a 2d textured line, with perspective correction.

Definition at line 24024 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_line ( const int  x0,
const int  y0,
const int  x1,
const int  y1,
const CImg< tc > &  texture,
const int  tx0,
const int  ty0,
const int  tx1,
const int  ty1,
const float  opacity = 1,
const unsigned int  pattern = ~0U,
const bool  init_hatch = true 
) [inline]

Draw a 2d textured line.

Parameters:
x0 X-coordinate of the starting line point.
y0 Y-coordinate of the starting line point.
x1 X-coordinate of the ending line point.
y1 Y-coordinate of the ending line point.
texture Texture image defining the pixel colors.
tx0 X-coordinate of the starting texture point.
ty0 Y-coordinate of the starting texture point.
tx1 X-coordinate of the ending texture point.
ty1 Y-coordinate of the ending texture point.
opacity Drawing opacity (optional).
pattern An integer whose bits describe the line pattern (optional).
init_hatch Flag telling if the hash variable must be reinitialized (optional).
Note:
  • Clipping is supported but not for texture coordinates.
  • Line routine uses the well known Bresenham's algorithm.
Example:
       CImg<unsigned char> img(100,100,1,3,0), texture("texture256x256.ppm");
       const unsigned char color[] = { 255,128,64 };
       img.draw_line(40,40,80,70,texture,0,0,255,255);

Definition at line 23918 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_line ( const int  x0,
const int  y0,
const int  z0,
const int  x1,
const int  y1,
const int  z1,
const tc *const   color,
const float  opacity = 1,
const unsigned int  pattern = ~0U,
const bool  init_hatch = true 
) [inline]

Draw a 3d colored line.

Definition at line 23846 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_line ( CImg< floatT > &  zbuffer,
const int  x0,
const int  y0,
const float  z0,
const int  x1,
const int  y1,
const float  z1,
const tc *const   color,
const float  opacity = 1,
const unsigned int  pattern = ~0U,
const bool  init_hatch = true 
) [inline]

Draw a 2d colored line, with z-buffering.

Definition at line 23730 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_line ( const int  x0,
const int  y0,
const int  x1,
const int  y1,
const tc *const   color,
const float  opacity = 1,
const unsigned int  pattern = ~0U,
const bool  init_hatch = true 
) [inline]

Draw a 2d colored line.

Parameters:
x0 X-coordinate of the starting line point.
y0 Y-coordinate of the starting line point.
x1 X-coordinate of the ending line point.
y1 Y-coordinate of the ending line point.
color Pointer to spectrum() consecutive values of type T, defining the drawing color.
opacity Drawing opacity (optional).
pattern An integer whose bits describe the line pattern (optional).
init_hatch Flag telling if a reinitialization of the hash state must be done (optional).
Note:
  • Clipping is supported.
  • Line routine uses Bresenham's algorithm.
  • Set init_hatch = false to draw consecutive hatched segments without breaking the line pattern.
Example:
       CImg<unsigned char> img(100,100,1,3,0);
       const unsigned char color[] = { 255,128,64 };
        img.draw_line(40,40,80,70,color);

Definition at line 23662 of file CImg.h.

Referenced by cimg_library::cimg::dialog(), cimg_library::CImg< charT >::draw_arrow(), cimg_library::CImg< charT >::draw_axis(), cimg_library::CImg< charT >::draw_graph(), cimg_library::CImg< charT >::draw_grid(), cimg_library::CImg< charT >::draw_line(), cimg_library::CImg< charT >::draw_polygon(), cimg_library::CImg< charT >::draw_quiver(), cimg_library::CImg< charT >::draw_rectangle(), cimg_library::CImg< charT >::draw_spline(), cimg_library::CImg< charT >::draw_triangle(), and cimg_library::CImg< charT >::get_select_graph().

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_mandelbrot ( const CImg< tc > &  color_palette,
const float  opacity = 1,
const double  z0r = -2,
const double  z0i = -2,
const double  z1r = 2,
const double  z1i = 2,
const unsigned int  iteration_max = 255,
const bool  normalized_iteration = false,
const bool  julia_set = false,
const double  paramr = 0,
const double  parami = 0 
) [inline]

Draw a quadratic Mandelbrot or Julia fractal set, computed using the Escape Time Algorithm.

Definition at line 28312 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_mandelbrot ( const int  x0,
const int  y0,
const int  x1,
const int  y1,
const CImg< tc > &  color_palette,
const float  opacity = 1,
const double  z0r = -2,
const double  z0i = -2,
const double  z1r = 2,
const double  z1i = 2,
const unsigned int  iteration_max = 255,
const bool  normalized_iteration = false,
const bool  julia_set = false,
const double  paramr = 0,
const double  parami = 0 
) [inline]

Draw a quadratic Mandelbrot or Julia fractal set, computed using the Escape Time Algorithm.

Definition at line 28250 of file CImg.h.

Referenced by cimg_library::CImg< charT >::draw_mandelbrot().

template<typename T>
template<typename tp , typename tf , typename tc >
CImg<T>& cimg_library::CImg< T >::draw_object3d ( const float  x0,
const float  y0,
const float  z0,
const CImg< tp > &  vertices,
const CImgList< tf > &  primitives,
const CImgList< tc > &  colors,
const unsigned int  render_type = 4,
const bool  double_sided = false,
const float  focale = 500,
const float  lightx = 0,
const float  lighty = 0,
const float  lightz = -5000,
const float  specular_light = 0.2f,
const float  specular_shine = 0.1f,
CImg< floatT > &  zbuffer = cimg_library::CImg<floatT>::empty() 
) [inline]

Draw a 3d object.

Definition at line 28550 of file CImg.h.

template<typename T>
template<typename tp , typename tf , typename tc , typename to >
CImg<T>& cimg_library::CImg< T >::draw_object3d ( const float  x0,
const float  y0,
const float  z0,
const CImg< tp > &  vertices,
const CImgList< tf > &  primitives,
const CImgList< tc > &  colors,
const CImg< to > &  opacities,
const unsigned int  render_type = 4,
const bool  double_sided = false,
const float  focale = 500,
const float  lightx = 0,
const float  lighty = 0,
const float  lightz = -5000,
const float  specular_light = 0.2f,
const float  specular_shine = 0.1f,
CImg< floatT > &  zbuffer = cimg_library::CImg<floatT>::empty() 
) [inline]

Draw a 3d object.

Parameters:
X = X-coordinate of the 3d object position
Y = Y-coordinate of the 3d object position
Z = Z-coordinate of the 3d object position
vertices = Image Nx3 describing 3d point coordinates
primitives = List of P primitives
colors = List of P color (or textures)
opacities = Image or list of P opacities
render_type = Render type (0=Points, 1=Lines, 2=Faces (no light), 3=Faces (flat), 4=Faces(Gouraud)
double_sided = Tell if object faces have two sides or are oriented.
focale = length of the focale
lightx = X-coordinate of the light
lighty = Y-coordinate of the light
lightz = Z-coordinate of the light
specular_shine = Shininess of the object

Definition at line 28491 of file CImg.h.

Referenced by cimg_library::CImg< charT >::draw_object3d().

template<typename T>
CImg<T>& cimg_library::CImg< T >::draw_plasma ( const float  alpha = 1,
const float  beta = 1,
const float  opacity = 1 
) [inline]

Draw a plasma random texture.

Parameters:
alpha = Alpha-parameter of the plasma.
beta = Beta-parameter of the plasma.
opacity = opacity of the drawing.

Definition at line 28243 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::draw_plasma ( const int  x0,
const int  y0,
const int  x1,
const int  y1,
const float  alpha = 1,
const float  beta = 1,
const float  opacity = 1 
) [inline]

Draw a plasma random texture.

Parameters:
x0 = X-coordinate of the upper-left corner of the plasma.
y0 = Y-coordinate of the upper-left corner of the plasma.
x1 = X-coordinate of the lower-right corner of the plasma.
y1 = Y-coordinate of the lower-right corner of the plasma.
alpha = Alpha-parameter of the plasma.
beta = Beta-parameter of the plasma.
opacity = opacity of the drawing.

Definition at line 28177 of file CImg.h.

Referenced by cimg_library::CImg< charT >::draw_plasma().

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_point ( const int  x0,
const int  y0,
const int  z0,
const tc *const   color,
const float  opacity = 1 
) [inline]

Draw a 3d colored point (voxel).

Definition at line 23600 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_point ( const int  x0,
const int  y0,
const tc *const   color,
const float  opacity = 1 
) [inline]

Draw a 2d colored point (pixel).

Parameters:
x0 X-coordinate of the point.
y0 Y-coordinate of the point.
color Pointer to spectrum() consecutive values, defining the color values.
opacity Drawing opacity (optional).
Note:
  • Clipping is supported.
  • To set pixel values without clipping needs, you should use the faster CImg::operator()() function.
Example:
       CImg<unsigned char> img(100,100,1,3,0);
       const unsigned char color[] = { 255,128,64 };
       img.draw_point(50,50,color);

Definition at line 23593 of file CImg.h.

Referenced by cimg_library::CImg< charT >::draw_arrow(), cimg_library::CImg< charT >::draw_axis(), cimg_library::CImg< charT >::draw_circle(), cimg_library::CImg< charT >::draw_graph(), and cimg_library::CImg< charT >::draw_point().

template<typename T>
template<typename t , typename tc >
CImg<T>& cimg_library::CImg< T >::draw_polygon ( const CImg< t > &  points,
const tc *const   color,
const float  opacity,
const unsigned int  pattern 
) [inline]

Draw a outlined polygon in the instance image.

Definition at line 26903 of file CImg.h.

template<typename T>
template<typename t , typename tc >
CImg<T>& cimg_library::CImg< T >::draw_polygon ( const CImg< t > &  points,
const tc *const   color,
const float  opacity = 1 
) [inline]

Draw a filled polygon in the instance image.

Definition at line 26830 of file CImg.h.

template<typename T>
template<typename t1 , typename t2 >
CImg<T>& cimg_library::CImg< T >::draw_quiver ( const CImg< t1 > &  flow,
const CImg< t2 > &  color,
const float  opacity = 1,
const unsigned int  sampling = 25,
const float  factor = -20,
const bool  arrows = true,
const unsigned int  pattern = ~0U 
) [inline]

Draw a vector field in the instance image, using a colormap.

Parameters:
flow Image of 2d vectors used as input data.
color Image of spectrum()-D vectors corresponding to the color of each arrow.
sampling Length (in pixels) between each arrow.
factor Length factor of each arrow (if <0, computed as a percentage of the maximum length).
opacity Opacity of the drawing.
pattern Used pattern to draw lines.
Note:
Clipping is supported.

Definition at line 27589 of file CImg.h.

template<typename T>
template<typename t1 , typename t2 >
CImg<T>& cimg_library::CImg< T >::draw_quiver ( const CImg< t1 > &  flow,
const t2 *const   color,
const float  opacity = 1,
const unsigned int  sampling = 25,
const float  factor = -20,
const bool  arrows = true,
const unsigned int  pattern = ~0U 
) [inline]

Draw a vector field in the instance image, using a colormap.

Parameters:
flow Image of 2d vectors used as input data.
color Image of spectrum()-D vectors corresponding to the color of each arrow.
sampling Length (in pixels) between each arrow.
factor Length factor of each arrow (if <0, computed as a percentage of the maximum length).
opacity Opacity of the drawing.
pattern Used pattern to draw lines.
Note:
Clipping is supported.

Definition at line 27571 of file CImg.h.

Referenced by cimg_library::CImg< charT >::draw_quiver().

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_rectangle ( const int  x0,
const int  y0,
const int  x1,
const int  y1,
const tc *const   color,
const float  opacity,
const unsigned int  pattern 
) [inline]

Draw a 2d outlined colored rectangle.

Definition at line 26809 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_rectangle ( const int  x0,
const int  y0,
const int  x1,
const int  y1,
const tc *const   color,
const float  opacity = 1 
) [inline]

Draw a 2d filled colored rectangle in the instance image, at coordinates (x0,y0)-(x1,y1).

Parameters:
x0 X-coordinate of the upper-left rectangle corner.
y0 Y-coordinate of the upper-left rectangle corner.
x1 X-coordinate of the lower-right rectangle corner.
y1 Y-coordinate of the lower-right rectangle corner.
color Pointer to spectrum() consecutive values of type T, defining the drawing color.
opacity Drawing opacity (optional).
Note:
  • Clipping is supported.

Definition at line 26801 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_rectangle ( const int  x0,
const int  y0,
const int  z0,
const int  x1,
const int  y1,
const int  z1,
const tc *const   color,
const float  opacity,
const unsigned int  pattern 
) [inline]

Draw a 3d outlined colored rectangle in the instance image.

Definition at line 26771 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_rectangle ( const int  x0,
const int  y0,
const int  z0,
const int  x1,
const int  y1,
const int  z1,
const tc *const   color,
const float  opacity = 1 
) [inline]

Draw a 3d filled colored rectangle in the instance image, at coordinates (x0,y0,z0)-(x1,y1,z1).

Parameters:
x0 X-coordinate of the upper-left rectangle corner.
y0 Y-coordinate of the upper-left rectangle corner.
z0 Z-coordinate of the upper-left rectangle corner.
x1 X-coordinate of the lower-right rectangle corner.
y1 Y-coordinate of the lower-right rectangle corner.
z1 Z-coordinate of the lower-right rectangle corner.
color Pointer to spectrum() consecutive values of type T, defining the drawing color.
opacity Drawing opacity (optional).
Note:
  • Clipping is supported.

Definition at line 26756 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::draw_rectangle ( const int  x0,
const int  y0,
const int  z0,
const int  c0,
const int  x1,
const int  y1,
const int  z1,
const int  c1,
const T  val,
const float  opacity = 1 
) [inline]

Draw a 4d filled rectangle in the instance image, at coordinates (x0,y0,z0,c0)-(x1,y1,z1,c1).

Parameters:
x0 X-coordinate of the upper-left rectangle corner.
y0 Y-coordinate of the upper-left rectangle corner.
z0 Z-coordinate of the upper-left rectangle corner.
c0 C-coordinate of the upper-left rectangle corner.
x1 X-coordinate of the lower-right rectangle corner.
y1 Y-coordinate of the lower-right rectangle corner.
z1 Z-coordinate of the lower-right rectangle corner.
c1 C-coordinate of the lower-right rectangle corner.
val Scalar value used to fill the rectangle area.
opacity Drawing opacity (optional).
Note:
  • Clipping is supported.

Definition at line 26708 of file CImg.h.

Referenced by cimg_library::cimg::dialog(), cimg_library::CImg< charT >::draw_graph(), cimg_library::CImg< charT >::draw_rectangle(), and cimg_library::CImg< charT >::get_select_graph().

template<typename T>
template<typename tp , typename tc >
CImg<T>& cimg_library::CImg< T >::draw_spline ( const CImg< tp > &  points,
const tc *const   color,
const float  opacity = 1,
const bool  close_set = false,
const float  precision = 4,
const unsigned int  pattern = ~0U,
const bool  init_hatch = true 
) [inline]

Draw a set of consecutive colored splines in the instance image.

Definition at line 24601 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::draw_spline ( const int  x0,
const int  y0,
const float  u0,
const float  v0,
const int  x1,
const int  y1,
const float  u1,
const float  v1,
const CImg< t > &  texture,
const int  tx0,
const int  ty0,
const int  tx1,
const int  ty1,
const float  opacity = 1,
const float  precision = 4,
const unsigned int  pattern = ~0U,
const bool  init_hatch = true 
) [inline]

Draw a cubic spline curve in the instance image.

Parameters:
x0 X-coordinate of the starting curve point
y0 Y-coordinate of the starting curve point
u0 X-coordinate of the starting velocity
v0 Y-coordinate of the starting velocity
x1 X-coordinate of the ending curve point
y1 Y-coordinate of the ending curve point
u1 X-coordinate of the ending velocity
v1 Y-coordinate of the ending velocity
texture Texture image defining line pixel colors.
tx0 X-coordinate of the starting texture point.
ty0 Y-coordinate of the starting texture point.
tx1 X-coordinate of the ending texture point.
ty1 Y-coordinate of the ending texture point.
precision Curve drawing precision (optional).
opacity Drawing opacity (optional).
pattern An integer whose bits describe the line pattern (optional).
init_hatch if true, reinit hatch motif.

Definition at line 24509 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_spline ( const int  x0,
const int  y0,
const int  z0,
const float  u0,
const float  v0,
const float  w0,
const int  x1,
const int  y1,
const int  z1,
const float  u1,
const float  v1,
const float  w1,
const tc *const   color,
const float  opacity = 1,
const float  precision = 4,
const unsigned int  pattern = ~0U,
const bool  init_hatch = true 
) [inline]

Draw a cubic spline curve in the instance image (for volumetric images).

Note:

Definition at line 24447 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_spline ( const int  x0,
const int  y0,
const float  u0,
const float  v0,
const int  x1,
const int  y1,
const float  u1,
const float  v1,
const tc *const   color,
const float  opacity = 1,
const float  precision = 4,
const unsigned int  pattern = ~0U,
const bool  init_hatch = true 
) [inline]

Draw a cubic spline curve in the instance image.

Parameters:
x0 X-coordinate of the starting curve point
y0 Y-coordinate of the starting curve point
u0 X-coordinate of the starting velocity
v0 Y-coordinate of the starting velocity
x1 X-coordinate of the ending curve point
y1 Y-coordinate of the ending curve point
u1 X-coordinate of the ending velocity
v1 Y-coordinate of the ending velocity
color Pointer to spectrum() consecutive values of type T, defining the drawing color.
precision Curve drawing precision (optional).
opacity Drawing opacity (optional).
pattern An integer whose bits describe the line pattern (optional).
init_hatch If true, init hatch motif.
Note:
  • The curve is a 2d cubic Bezier spline, from the set of specified starting/ending points and corresponding velocity vectors.
  • The spline is drawn as a serie of connected segments. The precision parameter sets the average number of pixels in each drawn segment.
  • A cubic Bezier curve is sometimes defined by a set of 4 points { (x0,y0), (xa,ya), (xb,yb), (x1,y1) } where (x0,y0) is the starting point, (x1,y1) is the ending point and (xa,ya), (xb,yb) are two control points. The starting and ending velocities (u0,v0) and (u1,v1) can be deduced easily from the control points as u0 = (xa - x0), v0 = (ya - y0), u1 = (x1 - xb) and v1 = (y1 - yb).
Example:
       CImg<unsigned char> img(100,100,1,3,0);
       const unsigned char color[] = { 255,255,255 };
       img.draw_spline(30,30,0,100,90,40,0,-100,color);

Definition at line 24404 of file CImg.h.

Referenced by cimg_library::CImg< charT >::draw_spline().

template<typename T>
template<typename tc1 , typename tc2 >
CImg<T>& cimg_library::CImg< T >::draw_text ( const int  x0,
const int  y0,
const char *const   text,
const tc1 *const   foreground_color,
const tc2 *const   background_color,
const float  opacity = 1,
const unsigned int  font_height = 13,
  ... 
) [inline]

Draw a text.

Parameters:
x0 X-coordinate of the text in the instance image.
y0 Y-coordinate of the text in the instance image.
foreground_color Array of spectrum() values of type T, defining the foreground color (0 means 'transparent').
background_color Array of spectrum() values of type T, defining the background color (0 means 'transparent').
font_size Size of the font (exact match for 13,24,32,57).
opacity Drawing opacity.
format 'printf'-style format string, followed by arguments.
Note:
Clipping is supported.

Definition at line 27447 of file CImg.h.

template<typename T>
template<typename tc1 , typename tc2 , typename t >
CImg<T>& cimg_library::CImg< T >::draw_text ( const int  x0,
const int  y0,
const char *const   text,
const tc1 *const   foreground_color,
const tc2 *const   background_color,
const float  opacity,
const CImgList< t > &  font,
  ... 
) [inline]

Draw a text.

Parameters:
x0 X-coordinate of the text in the instance image.
y0 Y-coordinate of the text in the instance image.
foreground_color Array of spectrum() values of type T, defining the foreground color (0 means 'transparent').
background_color Array of spectrum() values of type T, defining the background color (0 means 'transparent').
font Font used for drawing text.
opacity Drawing opacity.
format 'printf'-style format string, followed by arguments.
Note:
Clipping is supported.

Definition at line 27403 of file CImg.h.

Referenced by cimg_library::cimg::dialog(), cimg_library::CImg< charT >::draw_axis(), and cimg_library::CImg< charT >::get_select_graph().

template<typename T>
template<typename tc , typename tl >
CImg<T>& cimg_library::CImg< T >::draw_triangle ( CImg< floatT > &  zbuffer,
const int  x0,
const int  y0,
const float  z0,
const int  x1,
const int  y1,
const float  z1,
const int  x2,
const int  y2,
const float  z2,
const CImg< tc > &  texture,
const int  tx0,
const int  ty0,
const int  tx1,
const int  ty1,
const int  tx2,
const int  ty2,
const CImg< tl > &  light,
const int  lx0,
const int  ly0,
const int  lx1,
const int  ly1,
const int  lx2,
const int  ly2,
const float  opacity = 1 
) [inline]

Draw a 2d Pseudo-Phong-shaded textured triangle, with z-buffering and perspective correction.

Definition at line 26555 of file CImg.h.

template<typename T>
template<typename tc , typename tl >
CImg<T>& cimg_library::CImg< T >::draw_triangle ( const int  x0,
const int  y0,
const float  z0,
const int  x1,
const int  y1,
const float  z1,
const int  x2,
const int  y2,
const float  z2,
const CImg< tc > &  texture,
const int  tx0,
const int  ty0,
const int  tx1,
const int  ty1,
const int  tx2,
const int  ty2,
const CImg< tl > &  light,
const int  lx0,
const int  ly0,
const int  lx1,
const int  ly1,
const int  lx2,
const int  ly2,
const float  opacity = 1 
) [inline]

Draw a 2d Pseudo-Phong-shaded textured triangle, with perspective correction.

Definition at line 26432 of file CImg.h.

template<typename T>
template<typename tc , typename tl >
CImg<T>& cimg_library::CImg< T >::draw_triangle ( const int  x0,
const int  y0,
const int  x1,
const int  y1,
const int  x2,
const int  y2,
const CImg< tc > &  texture,
const int  tx0,
const int  ty0,
const int  tx1,
const int  ty1,
const int  tx2,
const int  ty2,
const CImg< tl > &  light,
const int  lx0,
const int  ly0,
const int  lx1,
const int  ly1,
const int  lx2,
const int  ly2,
const float  opacity = 1 
) [inline]

Draw a 2d Pseudo-Phong-shaded textured triangle.

Parameters:
x0 = X-coordinate of the first corner in the instance image.
y0 = Y-coordinate of the first corner in the instance image.
x1 = X-coordinate of the second corner in the instance image.
y1 = Y-coordinate of the second corner in the instance image.
x2 = X-coordinate of the third corner in the instance image.
y2 = Y-coordinate of the third corner in the instance image.
texture = texture image used to fill the triangle.
tx0 = X-coordinate of the first corner in the texture image.
ty0 = Y-coordinate of the first corner in the texture image.
tx1 = X-coordinate of the second corner in the texture image.
ty1 = Y-coordinate of the second corner in the texture image.
tx2 = X-coordinate of the third corner in the texture image.
ty2 = Y-coordinate of the third corner in the texture image.
light = light image.
lx0 = X-coordinate of the first corner in the light image.
ly0 = Y-coordinate of the first corner in the light image.
lx1 = X-coordinate of the second corner in the light image.
ly1 = Y-coordinate of the second corner in the light image.
lx2 = X-coordinate of the third corner in the light image.
ly2 = Y-coordinate of the third corner in the light image.
opacity = opacity of the drawing.
Note:
Clipping is supported, but texture coordinates do not support clipping.

Definition at line 26328 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_triangle ( CImg< floatT > &  zbuffer,
const int  x0,
const int  y0,
const float  z0,
const int  x1,
const int  y1,
const float  z1,
const int  x2,
const int  y2,
const float  z2,
const CImg< tc > &  texture,
const int  tx0,
const int  ty0,
const int  tx1,
const int  ty1,
const int  tx2,
const int  ty2,
const float  brightness0,
const float  brightness1,
const float  brightness2,
const float  opacity = 1 
) [inline]

Draw a 2d Gouraud-shaded textured triangle, with z-buffering and perspective correction.

Definition at line 26179 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_triangle ( const int  x0,
const int  y0,
const float  z0,
const int  x1,
const int  y1,
const float  z1,
const int  x2,
const int  y2,
const float  z2,
const CImg< tc > &  texture,
const int  tx0,
const int  ty0,
const int  tx1,
const int  ty1,
const int  tx2,
const int  ty2,
const float  brightness0,
const float  brightness1,
const float  brightness2,
const float  opacity = 1 
) [inline]

Draw a 2d Gouraud-shaded textured triangle, with perspective correction.

Definition at line 26070 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_triangle ( const int  x0,
const int  y0,
const int  x1,
const int  y1,
const int  x2,
const int  y2,
const CImg< tc > &  texture,
const int  tx0,
const int  ty0,
const int  tx1,
const int  ty1,
const int  tx2,
const int  ty2,
const float  brightness0,
const float  brightness1,
const float  brightness2,
const float  opacity = 1 
) [inline]

Draw a 2d Gouraud-shaded textured triangle.

Parameters:
x0 = X-coordinate of the first corner in the instance image.
y0 = Y-coordinate of the first corner in the instance image.
x1 = X-coordinate of the second corner in the instance image.
y1 = Y-coordinate of the second corner in the instance image.
x2 = X-coordinate of the third corner in the instance image.
y2 = Y-coordinate of the third corner in the instance image.
texture = texture image used to fill the triangle.
tx0 = X-coordinate of the first corner in the texture image.
ty0 = Y-coordinate of the first corner in the texture image.
tx1 = X-coordinate of the second corner in the texture image.
ty1 = Y-coordinate of the second corner in the texture image.
tx2 = X-coordinate of the third corner in the texture image.
ty2 = Y-coordinate of the third corner in the texture image.
brightness0 = brightness value of the first corner.
brightness1 = brightness value of the second corner.
brightness2 = brightness value of the third corner.
opacity = opacity of the drawing.
Note:
Clipping is supported, but texture coordinates do not support clipping.

Definition at line 25979 of file CImg.h.

template<typename T>
template<typename tc , typename tl >
CImg<T>& cimg_library::CImg< T >::draw_triangle ( CImg< floatT > &  zbuffer,
const int  x0,
const int  y0,
const float  z0,
const int  x1,
const int  y1,
const float  z1,
const int  x2,
const int  y2,
const float  z2,
const tc *const   color,
const CImg< tl > &  light,
const int  lx0,
const int  ly0,
const int  lx1,
const int  ly1,
const int  lx2,
const int  ly2,
const float  opacity = 1 
) [inline]

Draw a 2d Pseudo-Phong-shaded triangle, with z-buffering.

Definition at line 25847 of file CImg.h.

template<typename T>
template<typename tc , typename tl >
CImg<T>& cimg_library::CImg< T >::draw_triangle ( const int  x0,
const int  y0,
const int  x1,
const int  y1,
const int  x2,
const int  y2,
const tc *const   color,
const CImg< tl > &  light,
const int  lx0,
const int  ly0,
const int  lx1,
const int  ly1,
const int  lx2,
const int  ly2,
const float  opacity = 1 
) [inline]

Draw a 2d Pseudo-Phong-shaded triangle.

Parameters:
x0 = X-coordinate of the first corner in the instance image.
y0 = Y-coordinate of the first corner in the instance image.
x1 = X-coordinate of the second corner in the instance image.
y1 = Y-coordinate of the second corner in the instance image.
x2 = X-coordinate of the third corner in the instance image.
y2 = Y-coordinate of the third corner in the instance image.
color = array of spectrum() values of type T, defining the global drawing color.
light = light image.
lx0 = X-coordinate of the first corner in the light image.
ly0 = Y-coordinate of the first corner in the light image.
lx1 = X-coordinate of the second corner in the light image.
ly1 = Y-coordinate of the second corner in the light image.
lx2 = X-coordinate of the third corner in the light image.
ly2 = Y-coordinate of the third corner in the light image.
opacity = opacity of the drawing.
Note:
Clipping is supported, but texture coordinates do not support clipping.

Definition at line 25765 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_triangle ( CImg< floatT > &  zbuffer,
const int  x0,
const int  y0,
const float  z0,
const int  x1,
const int  y1,
const float  z1,
const int  x2,
const int  y2,
const float  z2,
const CImg< tc > &  texture,
const int  tx0,
const int  ty0,
const int  tx1,
const int  ty1,
const int  tx2,
const int  ty2,
const float  opacity = 1,
const float  brightness = 1 
) [inline]

Draw a 2d textured triangle, with z-buffering and perspective correction.

Definition at line 25585 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_triangle ( const int  x0,
const int  y0,
const float  z0,
const int  x1,
const int  y1,
const float  z1,
const int  x2,
const int  y2,
const float  z2,
const CImg< tc > &  texture,
const int  tx0,
const int  ty0,
const int  tx1,
const int  ty1,
const int  tx2,
const int  ty2,
const float  opacity = 1,
const float  brightness = 1 
) [inline]

Draw a 2d textured triangle, with perspective correction.

Definition at line 25455 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_triangle ( const int  x0,
const int  y0,
const int  x1,
const int  y1,
const int  x2,
const int  y2,
const CImg< tc > &  texture,
const int  tx0,
const int  ty0,
const int  tx1,
const int  ty1,
const int  tx2,
const int  ty2,
const float  opacity = 1,
const float  brightness = 1 
) [inline]

Draw a 2d textured triangle.

Parameters:
x0 = X-coordinate of the first corner in the instance image.
y0 = Y-coordinate of the first corner in the instance image.
x1 = X-coordinate of the second corner in the instance image.
y1 = Y-coordinate of the second corner in the instance image.
x2 = X-coordinate of the third corner in the instance image.
y2 = Y-coordinate of the third corner in the instance image.
texture = texture image used to fill the triangle.
tx0 = X-coordinate of the first corner in the texture image.
ty0 = Y-coordinate of the first corner in the texture image.
tx1 = X-coordinate of the second corner in the texture image.
ty1 = Y-coordinate of the second corner in the texture image.
tx2 = X-coordinate of the third corner in the texture image.
ty2 = Y-coordinate of the third corner in the texture image.
opacity = opacity of the drawing.
brightness = brightness of the drawing (in [0,2]).
Note:
Clipping is supported, but texture coordinates do not support clipping.

Definition at line 25336 of file CImg.h.

template<typename T>
template<typename tc1 , typename tc2 , typename tc3 >
CImg<T>& cimg_library::CImg< T >::draw_triangle ( const int  x0,
const int  y0,
const int  x1,
const int  y1,
const int  x2,
const int  y2,
const tc1 *const   color1,
const tc2 *const   color2,
const tc3 *const   color3,
const float  opacity = 1 
) [inline]

Draw a colored triangle with interpolated colors.

Definition at line 25304 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_triangle ( CImg< floatT > &  zbuffer,
const int  x0,
const int  y0,
const float  z0,
const int  x1,
const int  y1,
const float  z1,
const int  x2,
const int  y2,
const float  z2,
const tc *const   color,
const float  brightness0,
const float  brightness1,
const float  brightness2,
const float  opacity = 1 
) [inline]

Draw a 2d Gouraud-shaded colored triangle, with z-buffering.

Definition at line 25212 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_triangle ( const int  x0,
const int  y0,
const int  x1,
const int  y1,
const int  x2,
const int  y2,
const tc *const   color,
const float  brightness0,
const float  brightness1,
const float  brightness2,
const float  opacity = 1 
) [inline]

Draw a 2d Gouraud-shaded colored triangle.

Parameters:
x0 = X-coordinate of the first corner in the instance image.
y0 = Y-coordinate of the first corner in the instance image.
x1 = X-coordinate of the second corner in the instance image.
y1 = Y-coordinate of the second corner in the instance image.
x2 = X-coordinate of the third corner in the instance image.
y2 = Y-coordinate of the third corner in the instance image.
color = array of spectrum() values of type T, defining the global drawing color.
brightness0 = brightness of the first corner (in [0,2]).
brightness1 = brightness of the second corner (in [0,2]).
brightness2 = brightness of the third corner (in [0,2]).
opacity = opacity of the drawing.
Note:
Clipping is supported.

Definition at line 25149 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_triangle ( CImg< floatT > &  zbuffer,
const int  x0,
const int  y0,
const float  z0,
const int  x1,
const int  y1,
const float  z1,
const int  x2,
const int  y2,
const float  z2,
const tc *const   color,
const float  opacity = 1,
const float  brightness = 1 
) [inline]

Draw a 2d filled colored triangle, with z-buffering.

Definition at line 25030 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_triangle ( const int  x0,
const int  y0,
const int  x1,
const int  y1,
const int  x2,
const int  y2,
const tc *const   color,
const float  opacity,
const unsigned int  pattern 
) [inline]

Draw a 2d outlined colored triangle.

Definition at line 25011 of file CImg.h.

template<typename T>
template<typename tc >
CImg<T>& cimg_library::CImg< T >::draw_triangle ( const int  x0,
const int  y0,
const int  x1,
const int  y1,
const int  x2,
const int  y2,
const tc *const   color,
const float  opacity = 1 
) [inline]

Draw a 2d filled colored triangle.

Definition at line 24995 of file CImg.h.

Referenced by cimg_library::CImg< charT >::draw_polygon(), and cimg_library::CImg< charT >::draw_triangle().

template<typename T>
CImg<T>& cimg_library::CImg< T >::edge_tensors ( const float  sharpness = 0.7f,
const float  anisotropy = 0.6f,
const float  alpha = 0.6f,
const float  sigma = 1.1f,
const bool  is_sqrt = false 
) [inline]

Get a diffusion tensor for edge-preserving anisotropic smoothing of an image.

Definition at line 21389 of file CImg.h.

template<typename T>
template<typename t >
const CImg<T>& cimg_library::CImg< T >::eigen ( CImg< t > &  val,
CImg< t > &  vec 
) const [inline]

Compute the eigenvalues and eigenvectors of a matrix.

Definition at line 13578 of file CImg.h.

Referenced by cimg_library::CImg< charT >::symmetric_eigen().

template<typename T>
template<typename tf , typename tfunc >
static CImg<floatT> cimg_library::CImg< T >::elevation3d ( CImgList< tf > &  primitives,
const tfunc &  func,
const float  x0,
const float  y0,
const float  x1,
const float  y1,
const int  size_x = 256,
const int  size_y = 256 
) [inline, static]

Get elevation3d of a function.

Definition at line 22463 of file CImg.h.

Referenced by cimg_library::CImg< charT >::get_elevation3d().

template<typename T>
template<typename tf , typename t >
static CImg<floatT> cimg_library::CImg< T >::ellipsoid3d ( CImgList< tf > &  primitives,
const CImg< t > &  tensor,
const unsigned int  subdivisions = 3 
) [inline, static]

Create and return a 3d ellipsoid.

Parameters:
[out] primitives The returned list of the 3d object primitives (template type tf should be at least unsigned int).
tensor The tensor which gives the shape and size of the ellipsoid.
subdivisions The number of recursive subdivisions from an initial stretched icosahedron.
Returns:
The N vertices (xi,yi,zi) of the 3d object as a Nx3 CImg<float> image (0<=i<=N-1).
Sample code :
       CImgList<unsigned int> faces3d;
       const CImg<float> tensor = CImg<float>::diagonal(10,7,3),
                         points3d = CImg<float>::ellipsoid3d(faces3d,tensor,4);
       CImg<unsigned char>().display_object3d(points3d,faces3d);
ref_ellipsoid3d.jpg

Definition at line 23256 of file CImg.h.

template<typename T>
static CImg<T>& cimg_library::CImg< T >::empty (  )  [inline, static]

Return a reference to an empty image.

Definition at line 9164 of file CImg.h.

Referenced by cimg_library::cimg::eval(), and cimg_library::CImgList< charT >::font().

template<typename T>
iterator cimg_library::CImg< T >::end (  )  [inline]
template<typename T>
CImg<T>& cimg_library::CImg< T >::equalize ( const unsigned int  nb_levels,
const T  value_min = (T)0,
const T  value_max = (T)0 
) [inline]

Compute the histogram-equalized version of the instance image.

Parameters:
nb_levels Number of histogram levels used for the equalization.
value_min Minimum pixel value considered for the histogram computation. All pixel values lower than value_min will not be counted.
value_max Maximum pixel value considered for the histogram computation. All pixel values higher than value_max will not be counted.
Returns:
A reference to the modified instance image.
Note:
  • If value_min==value_max==0 (default behavior), the function first estimates the whole range of pixel values then uses it to equalize the histogram.
  • Function CImg<T>::get_equalize() is also defined. It returns a non-shared modified copy of the instance image.
Sample code :
       const CImg<float> img("reference.jpg"), res = img.get_equalize(256);
       (img,res).display();
ref_equalize.jpg

Definition at line 15501 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::erode ( const unsigned int  s  )  [inline]

Erode the image by a square structuring element of size sx.

Definition at line 19816 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::erode ( const unsigned int  sx,
const unsigned int  sy,
const unsigned int  sz = 1 
) [inline]

Erode the image by a rectangular structuring element of size sx,sy,sz.

Definition at line 19733 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::erode ( const CImg< t > &  mask,
const unsigned int  cond = 1,
const bool  weighted_erosion = false 
) [inline]

Return the erosion of the image by a structuring element.

Definition at line 19646 of file CImg.h.

template<typename T>
double cimg_library::CImg< T >::eval ( const char *const   expression,
const double  x = 0,
const double  y = 0,
const double  z = 0,
const double  c = 0 
) const [inline]
template<typename T>
CImg<T>& cimg_library::CImg< T >::exp (  )  [inline]

Compute the exponential of each pixel value.

Definition at line 12217 of file CImg.h.

Referenced by cimg_library::CImg< charT >::draw_gaussian().

template<typename T>
static void cimg_library::CImg< T >::FFT ( CImg< T > &  real,
CImg< T > &  imag,
const bool  invert = false 
) [inline, static]

Compute a n-d Fast Fourier Transform.

Definition at line 22186 of file CImg.h.

template<typename T>
static void cimg_library::CImg< T >::FFT ( CImg< T > &  real,
CImg< T > &  imag,
const char  axis,
const bool  invert = false 
) [inline, static]

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

Definition at line 21976 of file CImg.h.

Referenced by cimg_library::CImgList< charT >::FFT(), and cimg_library::CImg< charT >::FFT().

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::fill ( const CImg< t > &  values,
const bool  repeat_values = true 
) [inline]

Fill image values according to the values found in the specified image.

Definition at line 15060 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::fill ( const char *const   expression,
const bool  repeat_flag 
) [inline]

Fill image values according to the given expression, which can be a formula or a list of values.

Definition at line 15025 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::fill ( const T  val0,
const T  val1,
const T  val2,
const T  val3,
const T  val4,
const T  val5,
const T  val6,
const T  val7,
const T  val8,
const T  val9,
const T  val10,
const T  val11,
const T  val12,
const T  val13,
const T  val14,
const T  val15 
) [inline]

Fill sequentially pixel values.

Definition at line 14986 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::fill ( const T  val0,
const T  val1,
const T  val2,
const T  val3,
const T  val4,
const T  val5,
const T  val6,
const T  val7,
const T  val8,
const T  val9,
const T  val10,
const T  val11,
const T  val12,
const T  val13,
const T  val14 
) [inline]

Fill sequentially pixel values.

Definition at line 14948 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::fill ( const T  val0,
const T  val1,
const T  val2,
const T  val3,
const T  val4,
const T  val5,
const T  val6,
const T  val7,
const T  val8,
const T  val9,
const T  val10,
const T  val11,
const T  val12,
const T  val13 
) [inline]

Fill sequentially pixel values.

Definition at line 14911 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::fill ( const T  val0,
const T  val1,
const T  val2,
const T  val3,
const T  val4,
const T  val5,
const T  val6,
const T  val7,
const T  val8,
const T  val9,
const T  val10,
const T  val11,
const T  val12 
) [inline]

Fill sequentially pixel values.

Definition at line 14878 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::fill ( const T  val0,
const T  val1,
const T  val2,
const T  val3,
const T  val4,
const T  val5,
const T  val6,
const T  val7,
const T  val8,
const T  val9,
const T  val10,
const T  val11 
) [inline]

Fill sequentially pixel values.

Definition at line 14847 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::fill ( const T  val0,
const T  val1,
const T  val2,
const T  val3,
const T  val4,
const T  val5,
const T  val6,
const T  val7,
const T  val8,
const T  val9,
const T  val10 
) [inline]

Fill sequentially pixel values.

Definition at line 14816 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::fill ( const T  val0,
const T  val1,
const T  val2,
const T  val3,
const T  val4,
const T  val5,
const T  val6,
const T  val7,
const T  val8,
const T  val9 
) [inline]

Fill sequentially pixel values.

Definition at line 14787 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::fill ( const T  val0,
const T  val1,
const T  val2,
const T  val3,
const T  val4,
const T  val5,
const T  val6,
const T  val7,
const T  val8 
) [inline]

Fill sequentially pixel values.

Definition at line 14758 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::fill ( const T  val0,
const T  val1,
const T  val2,
const T  val3,
const T  val4,
const T  val5,
const T  val6,
const T  val7 
) [inline]

Fill sequentially pixel values.

Definition at line 14731 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::fill ( const T  val0,
const T  val1,
const T  val2,
const T  val3,
const T  val4,
const T  val5,
const T  val6 
) [inline]

Fill sequentially pixel values.

Definition at line 14708 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::fill ( const T  val0,
const T  val1,
const T  val2,
const T  val3,
const T  val4,
const T  val5 
) [inline]

Fill sequentially all pixel values with values val0 and val1 and val2 and val3 and val4 and val5.

Definition at line 14686 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::fill ( const T  val0,
const T  val1,
const T  val2,
const T  val3,
const T  val4 
) [inline]

Fill sequentially all pixel values with values val0 and val1 and val2 and val3 and val4.

Definition at line 14667 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::fill ( const T  val0,
const T  val1,
const T  val2,
const T  val3 
) [inline]

Fill sequentially all pixel values with values val0 and val1 and val2 and val3.

Definition at line 14649 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::fill ( const T  val0,
const T  val1,
const T  val2 
) [inline]

Fill sequentially all pixel values with values val0 and val1 and val2.

Definition at line 14632 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::fill ( const T  val0,
const T  val1 
) [inline]

Fill sequentially all pixel values with values val0 and val1 respectively.

Definition at line 14619 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::fill ( const T  val  )  [inline]
template<typename T>
CImg<T>& cimg_library::CImg< T >::fillC ( const unsigned int  x,
const unsigned int  y,
const unsigned int  z,
const int  a0,
  ... 
) [inline]

Fill image values along the C-axis at the specified pixel position (x,y,z).

Definition at line 15113 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::fillX ( const unsigned int  y,
const unsigned int  z,
const unsigned int  c,
const int  a0,
  ... 
) [inline]

Fill image values along the X-axis at the specified pixel position (y,z,c).

Definition at line 15074 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::fillY ( const unsigned int  x,
const unsigned int  z,
const unsigned int  c,
const int  a0,
  ... 
) [inline]

Fill image values along the Y-axis at the specified pixel position (x,z,c).

Definition at line 15089 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::fillZ ( const unsigned int  x,
const unsigned int  y,
const unsigned int  c,
const int  a0,
  ... 
) [inline]

Fill image values along the Z-axis at the specified pixel position (x,y,c).

Definition at line 15100 of file CImg.h.

template<typename T>
const T& cimg_library::CImg< T >::front (  )  const [inline]

Return reference to the first image pixel (STL-compliant name).

Definition at line 10031 of file CImg.h.

template<typename T>
template<typename tp , typename tc , typename to >
CImg<T> cimg_library::CImg< T >::get_CImg3dtoobject3d ( CImgList< tp > &  primitives,
CImgList< tc > &  colors,
CImgList< to > &  opacities 
) const [inline]

Convert a CImg3d (one-column image) into a 3d object.

Definition at line 23444 of file CImg.h.

template<typename T>
template<typename tf , typename tc , typename te >
CImg<floatT> cimg_library::CImg< T >::get_elevation3d ( CImgList< tf > &  primitives,
CImgList< tc > &  colors,
const CImg< te > &  elevation 
) const [inline]

Create and return a 3d elevation of the instance image.

Parameters:
[out] primitives The returned list of the 3d object primitives (template type tf should be at least unsigned int).
[out] colors The returned list of the 3d object colors.
elevation The input elevation map.
Returns:
The N vertices (xi,yi,zi) of the 3d object as a Nx3 CImg<float> image (0<=i<=N-1).
Sample code :
       const CImg<float> img("reference.jpg");
       CImgList<unsigned int> faces3d;
       CImgList<unsigned char> colors3d;
       const CImg<float> points3d = img.get_elevation3d(faces3d,colors,img.get_norm()*0.2);
       CImg<unsigned char>().display_object3d(points3d,faces3d,colors3d);
ref_elevation3d.jpg

Definition at line 22362 of file CImg.h.

template<typename T>
CImgList<Tfloat> cimg_library::CImg< T >::get_FFT ( const bool  invert = false  )  const [inline]

Compute a n-d Fast-Fourier Transform.

Definition at line 21969 of file CImg.h.

template<typename T>
CImgList<Tfloat> cimg_library::CImg< T >::get_FFT ( const char  axis,
const bool  invert = false 
) const [inline]

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

Definition at line 21962 of file CImg.h.

template<typename T>
CImgList<Tfloat> cimg_library::CImg< T >::get_gradient ( const char *const   axes = 0,
const int  scheme = 3 
) const [inline]

Compute the list of images, corresponding to the XY-gradients of an image.

Parameters:
scheme = Numerical scheme used for the gradient computation :

  • -1 = Backward finite differences
  • 0 = Centered finite differences
  • 1 = Forward finite differences
  • 2 = Using Sobel masks
  • 3 = Using rotation invariant masks
  • 4 = Using Deriche recusrsive filter.

Definition at line 21063 of file CImg.h.

template<typename T>
CImgList<Tfloat> cimg_library::CImg< T >::get_hessian ( const char *const   axes = 0  )  const [inline]

Get components of the Hessian matrix of an image.

Definition at line 21173 of file CImg.h.

template<typename T>
template<typename tf >
CImg<floatT> cimg_library::CImg< T >::get_isoline3d ( CImgList< tf > &  primitives,
const float  isovalue,
const int  size_x = -100,
const int  size_y = -100 
) const [inline]

Create and return a isoline of the instance image as a 3d object.

Parameters:
[out] primitives The returned list of the 3d object primitives (template type tf should be at least unsigned int).
isovalue The returned list of the 3d object colors.
size_x The number of subdivisions along the X-axis.
size_y The number of subdisivions along the Y-axis.
Returns:
The N vertices (xi,yi,zi) of the 3d object as a Nx3 CImg<float> image (0<=i<=N-1).
Sample code :
       const CImg<float> img("reference.jpg");
       CImgList<unsigned int> faces3d;
       const CImg<float> points3d = img.get_isoline3d(faces3d,100);
       CImg<unsigned char>().display_object3d(points3d,faces3d,colors3d);
ref_isoline3d.jpg

Definition at line 22405 of file CImg.h.

template<typename T>
template<typename tf >
CImg<floatT> cimg_library::CImg< T >::get_isosurface3d ( CImgList< tf > &  primitives,
const float  isovalue,
const int  size_x = -100,
const int  size_y = -100,
const int  size_z = -100 
) const [inline]

Create and return a isosurface of the instance image as a 3d object.

Parameters:
[out] primitives The returned list of the 3d object primitives (template type tf should be at least unsigned int).
isovalue The returned list of the 3d object colors.
size_x The number of subdivisions along the X-axis.
size_y The number of subdisivions along the Y-axis.
Returns:
The N vertices (xi,yi,zi) of the 3d object as a Nx3 CImg<float> image (0<=i<=N-1).
Sample code :
       const CImg<float> img = CImg<unsigned char>("reference.jpg").resize(-100,-100,20);
       CImgList<unsigned int> faces3d;
       const CImg<float> points3d = img.get_isosurface3d(faces3d,100);
       CImg<unsigned char>().display_object3d(points3d,faces3d,colors3d);
ref_isosurface3d.jpg

Definition at line 22442 of file CImg.h.

template<typename T>
CImg<T> cimg_library::CImg< T >::get_matrix_at ( const unsigned int  x = 0,
const unsigned int  y = 0,
const unsigned int  z = 0 
) const [inline]

Return a new image corresponding to the square matrix located at (x,y,z) of the current vector-valued image.

Definition at line 13171 of file CImg.h.

template<typename T>
CImg<intT> cimg_library::CImg< T >::get_select ( const char *const   title,
const int  select_type = 2,
unsigned int *const   XYZ = 0,
const unsigned char *const   color = 0 
) const [inline]

Simple interface to select a shape from an image.

Definition at line 29587 of file CImg.h.

template<typename T>
CImg<intT> cimg_library::CImg< T >::get_select ( CImgDisplay disp,
const int  select_type = 2,
unsigned int *const   XYZ = 0,
const unsigned char *const   color = 0 
) const [inline]

Simple interface to select a shape from an image.

Definition at line 29580 of file CImg.h.

Referenced by cimg_library::CImg< charT >::select().

template<typename T>
CImg<intT> cimg_library::CImg< T >::get_select_graph ( CImgDisplay disp,
const unsigned int  plot_type = 1,
const unsigned int  vertex_type = 1,
const char *const   labelx = 0,
const double  xmin = 0,
const double  xmax = 0,
const char *const   labely = 0,
const double  ymin = 0,
const double  ymax = 0 
) const [inline]

Select sub-graph in a graph.

Definition at line 29908 of file CImg.h.

Referenced by cimg_library::CImg< charT >::display_graph().

template<typename T>
CImg<T> cimg_library::CImg< T >::get_shared (  )  [inline]

Return a shared version of the instance image.

Definition at line 8861 of file CImg.h.

template<typename T>
CImg<T> cimg_library::CImg< T >::get_shared_channel ( const unsigned int  c0  )  [inline]
template<typename T>
CImg<T> cimg_library::CImg< T >::get_shared_channels ( const unsigned int  c0,
const unsigned int  c1 
) [inline]

Return a shared-memory image referencing a set of channels (c0->c1) of the instance image.

Definition at line 19256 of file CImg.h.

template<typename T>
CImg<T> cimg_library::CImg< T >::get_shared_line ( const unsigned int  y0,
const unsigned int  z0 = 0,
const unsigned int  c0 = 0 
) [inline]

Return a shared-memory image referencing one particular line (y0,z0,c0) of the instance image.

Definition at line 19215 of file CImg.h.

Referenced by cimg_library::CImg< charT >::ellipsoid3d(), cimg_library::CImg< charT >::resize_object3d(), and cimg_library::CImg< charT >::shift_object3d().

template<typename T>
CImg<T> cimg_library::CImg< T >::get_shared_lines ( const unsigned int  y0,
const unsigned int  y1,
const unsigned int  z0 = 0,
const unsigned int  c0 = 0 
) [inline]

Return a shared-memory image referencing a set of lines of the instance image.

Definition at line 19190 of file CImg.h.

template<typename T>
CImg<T> cimg_library::CImg< T >::get_shared_plane ( const unsigned int  z0,
const unsigned int  c0 = 0 
) [inline]

Return a shared-memory image referencing one plane (z0,c0) of the instance image.

Definition at line 19247 of file CImg.h.

template<typename T>
CImg<T> cimg_library::CImg< T >::get_shared_planes ( const unsigned int  z0,
const unsigned int  z1,
const unsigned int  c0 = 0 
) [inline]

Return a shared memory image referencing a set of planes (z0->z1,c0) of the instance image.

Definition at line 19224 of file CImg.h.

template<typename T>
CImg<T> cimg_library::CImg< T >::get_shared_points ( const unsigned int  x0,
const unsigned int  x1,
const unsigned int  y0 = 0,
const unsigned int  z0 = 0,
const unsigned int  c0 = 0 
) [inline]

Get a shared-memory image referencing a set of points of the instance image.

Definition at line 19165 of file CImg.h.

Referenced by cimg_library::CImg< charT >::draw_polygon().

template<typename T>
CImgList<T> cimg_library::CImg< T >::get_split ( const char  axis,
const int  nb = 0 
) const [inline]
template<typename T>
CImg<floatT> cimg_library::CImg< T >::get_streamline ( const float  x,
const float  y,
const float  z,
const float  L = 256,
const float  dl = 0.1f,
const unsigned int  interpolation_type = 2,
const bool  is_backward_tracking = false,
const bool  is_oriented_only = false 
) const [inline]

Return stream line of a 2d or 3d vector field.

Definition at line 14062 of file CImg.h.

template<typename T>
CImg<T> cimg_library::CImg< T >::get_tensor_at ( const unsigned int  x,
const unsigned int  y = 0,
const unsigned int  z = 0 
) const [inline]

Return a new image corresponding to the diffusion tensor located at (x,y,z) of the current vector-valued image.

Definition at line 13182 of file CImg.h.

template<typename T>
CImg<T> cimg_library::CImg< T >::get_vector_at ( const unsigned int  x,
const unsigned int  y = 0,
const unsigned int  z = 0 
) const [inline]

Return a new image corresponding to the vector located at (x,y,z) of the current vector-valued image.

Definition at line 13160 of file CImg.h.

Referenced by cimg_library::CImg< charT >::draw_fill(), and cimg_library::CImg< charT >::draw_quiver().

template<typename T>
CImg<T>& cimg_library::CImg< T >::haar ( const bool  invert = false,
const unsigned int  nb_scales = 1 
) [inline]

Compute the Haar multiscale wavelet transform.

Parameters:
invert Set inverse of direct transform.
nb_scales Number of scales used for the transform.

Definition at line 21873 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::haar ( const char  axis,
const bool  invert = false,
const unsigned int  nb_scales = 1 
) [inline]

Compute the Haar multiscale wavelet transform (monodimensional version).

Parameters:
axis Axis considered for the transform.
invert Set inverse of direct transform.
nb_scales Number of scales used for the transform.

Definition at line 21726 of file CImg.h.

template<typename T>
int cimg_library::CImg< T >::height (  )  const [inline]
template<typename T>
CImg<T>& cimg_library::CImg< T >::histogram ( const unsigned int  nb_levels,
const T  value_min = (T)0,
const T  value_max = (T)0 
) [inline]

Compute the histogram of the instance image.

Parameters:
nb_levels Number of desired histogram levels.
value_min Minimum pixel value considered for the histogram computation. All pixel values lower than value_min will not be counted.
value_max Maximum pixel value considered for the histogram computation. All pixel values higher than value_max will not be counted.
Returns:
Instance image is replaced by its histogram, defined as a CImg<T>(nb_levels) image.
Note:
  • The histogram H of an image I is the 1d function where H(x) counts the number of occurences of the value x in the image I.
  • If value_min==value_max==0 (default behavior), the function first estimates the whole range of pixel values then uses it to compute the histogram.
  • The resulting histogram is always defined in 1d. Histograms of multi-valued images are not multi-dimensional.
  • Function CImg<T>::get_histogram() is also defined. It returns a non-shared modified copy of the instance image.
Sample code :
       const CImg<float> img = CImg<float>("reference.jpg").histogram(256);
       img.display_graph(0,3);
ref_histogram.jpg

Definition at line 15463 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::HSItoRGB (  )  [inline]

Convert color pixels from (H,S,I) to (R,G,B).

Definition at line 16194 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::HSLtoRGB (  )  [inline]

Convert color pixels from (H,S,L) to (R,G,B).

Definition at line 16123 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::HSVtoRGB (  )  [inline]

Convert color pixels from (H,S,V) to (R,G,B).

Definition at line 16038 of file CImg.h.

Referenced by cimg_library::CImg< charT >::rainbow_LUT256().

template<typename T>
static CImg<T> cimg_library::CImg< T >::identity_matrix ( const unsigned int  N  )  [inline, static]

Return a NxN identity matrix.

Definition at line 14557 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::identity_matrix (  )  [inline]

Get an identity matrix having same dimension than instance image.

Definition at line 13315 of file CImg.h.

Referenced by cimg_library::CImg< charT >::identity_matrix().

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::index ( const CImg< t > &  palette,
const bool  dithering = false,
const bool  map_indexes = false 
) [inline]

Index multi-valued pixels of the instance image, regarding to a predefined palette.

Parameters:
palette Multi-valued palette used as the basis for multi-valued pixel indexing.
dithering Tells if Floyd-Steinberg dithering is activated or not.
map_indexes Tell if the values of the resulting image are the palette indices or the palette vectors.
Returns:
A reference to the modified instance image.
Note:
  • img.index(palette,dithering,1) is equivalent to img.index(palette,dithering,0).map(palette).
  • Function CImg<T>::get_index() is also defined. It returns a non-shared modified copy of the instance image.
Sample code :
       const CImg<float> img("reference.jpg"), palette(3,1,1,3, 0,128,255, 0,128,255, 0,128,255);
       const CImg<float> res = img.get_index(palette,true,true);
       (img,res).display();
ref_index.jpg

Definition at line 15539 of file CImg.h.

Referenced by cimg_library::CImg< charT >::default_LUT256().

template<typename T>
CImg<T>& cimg_library::CImg< T >::invert ( const bool  use_LU = true  )  [inline]

Invert the current matrix.

Definition at line 13376 of file CImg.h.

Referenced by cimg_library::CImgList< charT >::FFT(), and cimg_library::CImg< charT >::FFT().

template<typename T>
CImg<T>& cimg_library::CImg< T >::invert_endianness (  )  [inline]
template<typename T>
bool cimg_library::CImg< T >::is_CImg3d ( const bool  full_check = true,
char *const   error_message = 0 
) const [inline]

Test if an image is a valid CImg3d object.

Definition at line 11297 of file CImg.h.

Referenced by cimg_library::CImg< charT >::get_CImg3dtoobject3d().

template<typename T>
bool cimg_library::CImg< T >::is_empty (  )  const [inline]

Return true if current image is empty.

Definition at line 10885 of file CImg.h.

Referenced by cimg_library::CImg< charT >::append_object3d(), cimg_library::CImgList< charT >::at(), cimg_library::CImg< charT >::at(), cimg_library::CImgList< charT >::atN(), cimg_library::CImgList< charT >::atNX(), cimg_library::CImgList< charT >::atNXY(), cimg_library::CImgList< charT >::atNXYZ(), cimg_library::CImgList< charT >::atNXYZC(), cimg_library::CImg< charT >::atX(), cimg_library::CImg< charT >::atXY(), cimg_library::CImg< charT >::atXYZ(), cimg_library::CImg< charT >::atXYZC(), cimg_library::CImg< charT >::contains(), cimg_library::CImg< charT >::containsXYZC(), cimg_library::CImg< charT >::cubic_atX(), cimg_library::CImg< charT >::cubic_atXY(), cimg_library::CImg< charT >::cubic_atXYZ(), cimg_library::CImg< charT >::cut(), cimg_library::CImg< charT >::det(), cimg_library::CImgList< charT >::display(), cimg_library::CImg< charT >::display_graph(), cimg_library::CImg< charT >::dot(), cimg_library::CImg< charT >::draw_arrow(), cimg_library::CImg< charT >::draw_axes(), cimg_library::CImg< charT >::draw_axis(), cimg_library::CImg< charT >::draw_circle(), cimg_library::CImg< charT >::draw_gaussian(), cimg_library::CImg< charT >::draw_graph(), cimg_library::CImg< charT >::draw_grid(), cimg_library::CImg< charT >::draw_image(), cimg_library::CImg< charT >::draw_line(), cimg_library::CImg< charT >::draw_mandelbrot(), cimg_library::CImg< charT >::draw_plasma(), cimg_library::CImg< charT >::draw_point(), cimg_library::CImg< charT >::draw_polygon(), cimg_library::CImg< charT >::draw_quiver(), cimg_library::CImg< charT >::draw_rectangle(), cimg_library::CImg< charT >::draw_spline(), cimg_library::CImg< charT >::draw_triangle(), cimg_library::CImg< charT >::eigen(), cimg_library::CImg< charT >::equalize(), cimg_library::CImgList< charT >::FFT(), cimg_library::CImg< charT >::fill(), cimg_library::CImg< charT >::get_elevation3d(), cimg_library::CImg< charT >::get_isoline3d(), cimg_library::CImg< charT >::get_isosurface3d(), cimg_library::CImg< charT >::get_select_graph(), cimg_library::CImg< charT >::is_object3d(), cimg_library::CImg< charT >::kth_smallest(), cimg_library::CImg< charT >::linear_atX(), cimg_library::CImg< charT >::linear_atXY(), cimg_library::CImg< charT >::linear_atXYZ(), cimg_library::CImg< charT >::linear_atXYZC(), cimg_library::CImg< charT >::load_other(), cimg_library::CImg< charT >::magnitude(), cimg_library::CImg< charT >::max(), cimg_library::CImg< charT >::max_min(), cimg_library::CImg< charT >::mean(), cimg_library::CImg< charT >::min(), cimg_library::CImg< charT >::min_max(), cimg_library::CImg< charT >::mirror(), cimg_library::CImg< charT >::noise(), cimg_library::CImg< charT >::normalize(), cimg_library::CImg< charT >::print(), cimg_library::CImg< charT >::quantize(), cimg_library::CImg< charT >::resize(), cimg_library::CImg< charT >::save_analyze(), cimg_library::CImg< charT >::save_exr(), cimg_library::CImg< charT >::save_ffmpeg(), cimg_library::CImgList< charT >::save_ffmpeg(), cimg_library::CImg< charT >::save_ffmpeg_external(), cimg_library::CImgList< charT >::save_ffmpeg_external(), cimg_library::CImg< charT >::save_graphicsmagick_external(), cimg_library::CImg< charT >::save_gzip_external(), cimg_library::CImg< charT >::save_imagemagick_external(), cimg_library::CImg< charT >::save_magick(), cimg_library::CImg< charT >::save_medcon_external(), cimg_library::CImg< charT >::save_tiff(), cimg_library::CImg< charT >::sequence(), cimg_library::CImg< charT >::shift(), cimg_library::CImg< charT >::sort(), cimg_library::CImg< charT >::sum(), cimg_library::CImg< charT >::SVD(), cimg_library::CImg< charT >::symmetric_eigen(), cimg_library::CImg< charT >::threshold(), cimg_library::CImg< charT >::trace(), cimg_library::CImgList< charT >::value_string(), cimg_library::CImg< charT >::value_string(), and cimg_library::CImg< charT >::variance_mean().

template<typename T>
template<typename tp , typename tc , typename to >
bool cimg_library::CImg< T >::is_object3d ( const CImgList< tp > &  primitives,
const CImgList< tc > &  colors,
const to &  opacities,
const bool  full_check = true,
char *const   error_message = 0 
) const [inline]

Return true if the set (instance,primitives,colors,opacities) stands for a valid 3d object.

Definition at line 11140 of file CImg.h.

template<typename T>
template<typename t >
bool cimg_library::CImg< T >::is_overlapped ( const CImg< t > &  img  )  const [inline]
template<typename T>
template<typename t >
bool cimg_library::CImg< T >::is_sameC ( const CImg< t > &  img  )  const [inline]

Return true if images (*this) and img have same _spectrum.

Definition at line 10939 of file CImg.h.

template<typename T>
bool cimg_library::CImg< T >::is_sameC ( const unsigned int  dc  )  const [inline]
template<typename T>
bool cimg_library::CImg< T >::is_sameX ( const CImgDisplay disp  )  const [inline]

Return true if images (*this) and the display disp have same width.

Definition at line 10901 of file CImg.h.

template<typename T>
template<typename t >
bool cimg_library::CImg< T >::is_sameX ( const CImg< t > &  img  )  const [inline]

Return true if images (*this) and img have same width.

Definition at line 10896 of file CImg.h.

template<typename T>
bool cimg_library::CImg< T >::is_sameX ( const unsigned int  dx  )  const [inline]
template<typename T>
template<typename t >
bool cimg_library::CImg< T >::is_sameXC ( const CImg< t > &  img  )  const [inline]

Return true if images have same width and same number of channels.

Definition at line 10977 of file CImg.h.

template<typename T>
bool cimg_library::CImg< T >::is_sameXC ( const unsigned int  dx,
const unsigned int  dc 
) const [inline]

Return true if image (*this) has the specified width and number of channels.

Definition at line 10971 of file CImg.h.

template<typename T>
bool cimg_library::CImg< T >::is_sameXY ( const CImgDisplay disp  )  const [inline]

Return true if image (*this) and the display disp have same width and same height.

Definition at line 10955 of file CImg.h.

template<typename T>
template<typename t >
bool cimg_library::CImg< T >::is_sameXY ( const CImg< t > &  img  )  const [inline]

Return true if images have same width and same height.

Definition at line 10950 of file CImg.h.

template<typename T>
bool cimg_library::CImg< T >::is_sameXY ( const unsigned int  dx,
const unsigned int  dy 
) const [inline]
template<typename T>
template<typename t >
bool cimg_library::CImg< T >::is_sameXYC ( const CImg< t > &  img  )  const [inline]

Return true if images have same width, same height and same number of channels.

Definition at line 11032 of file CImg.h.

template<typename T>
bool cimg_library::CImg< T >::is_sameXYC ( const unsigned int  dx,
const unsigned int  dy,
const unsigned int  dc 
) const [inline]

Return true if image (*this) has the specified width, height and depth.

Definition at line 11026 of file CImg.h.

template<typename T>
template<typename t >
bool cimg_library::CImg< T >::is_sameXYZ ( const CImg< t > &  img  )  const [inline]

Return true if images have same width, same height and same depth.

Definition at line 11021 of file CImg.h.

template<typename T>
bool cimg_library::CImg< T >::is_sameXYZ ( const unsigned int  dx,
const unsigned int  dy,
const unsigned int  dz 
) const [inline]

Return true if image (*this) has the specified width, height and depth.

Definition at line 11015 of file CImg.h.

Referenced by cimg_library::CImg< charT >::is_sameXYZC(), cimg_library::CImgList< charT >::save_ffmpeg(), and cimg_library::CImgList< charT >::save_ffmpeg_external().

template<typename T>
template<typename t >
bool cimg_library::CImg< T >::is_sameXYZC ( const CImg< t > &  img  )  const [inline]

Return true if images (*this) and img have same width, same height, same depth and same number of channels.

Definition at line 11065 of file CImg.h.

template<typename T>
bool cimg_library::CImg< T >::is_sameXYZC ( const unsigned int  dx,
const unsigned int  dy,
const unsigned int  dz,
const unsigned int  dc 
) const [inline]

Return true if image (*this) has the specified width, height, depth and number of channels.

Definition at line 11059 of file CImg.h.

Referenced by cimg_library::CImg< charT >::FFT().

template<typename T>
template<typename t >
bool cimg_library::CImg< T >::is_sameXZ ( const CImg< t > &  img  )  const [inline]

Return true if images have same width and same depth.

Definition at line 10966 of file CImg.h.

template<typename T>
bool cimg_library::CImg< T >::is_sameXZ ( const unsigned int  dx,
const unsigned int  dz 
) const [inline]

Return true if image (*this) has the specified width and depth.

Definition at line 10960 of file CImg.h.

Referenced by cimg_library::CImg< charT >::is_sameXZC().

template<typename T>
template<typename t >
bool cimg_library::CImg< T >::is_sameXZC ( const CImg< t > &  img  )  const [inline]

Return true if images have same width, same depth and same number of channels.

Definition at line 11043 of file CImg.h.

template<typename T>
bool cimg_library::CImg< T >::is_sameXZC ( const unsigned int  dx,
const unsigned int  dz,
const unsigned int  dc 
) const [inline]

Return true if image (*this) has the specified width, height and number of channels.

Definition at line 11037 of file CImg.h.

template<typename T>
bool cimg_library::CImg< T >::is_sameY ( const CImgDisplay disp  )  const [inline]

Return true if images (*this) and the display disp have same height.

Definition at line 10917 of file CImg.h.

template<typename T>
template<typename t >
bool cimg_library::CImg< T >::is_sameY ( const CImg< t > &  img  )  const [inline]

Return true if images (*this) and img have same height.

Definition at line 10912 of file CImg.h.

template<typename T>
bool cimg_library::CImg< T >::is_sameY ( const unsigned int  dy  )  const [inline]
template<typename T>
template<typename t >
bool cimg_library::CImg< T >::is_sameYC ( const CImg< t > &  img  )  const [inline]

Return true if images have same height and same number of channels.

Definition at line 10999 of file CImg.h.

template<typename T>
bool cimg_library::CImg< T >::is_sameYC ( const unsigned int  dy,
const unsigned int  dc 
) const [inline]

Return true if image (*this) has the specified height and number of channels.

Definition at line 10993 of file CImg.h.

template<typename T>
template<typename t >
bool cimg_library::CImg< T >::is_sameYZ ( const CImg< t > &  img  )  const [inline]

Return true if images have same height and same depth.

Definition at line 10988 of file CImg.h.

template<typename T>
bool cimg_library::CImg< T >::is_sameYZ ( const unsigned int  dy,
const unsigned int  dz 
) const [inline]

Return true if image (*this) has the specified height and depth.

Definition at line 10982 of file CImg.h.

Referenced by cimg_library::CImg< charT >::is_sameYZC().

template<typename T>
template<typename t >
bool cimg_library::CImg< T >::is_sameYZC ( const CImg< t > &  img  )  const [inline]

Return true if images have same heigth, same depth and same number of channels.

Definition at line 11054 of file CImg.h.

template<typename T>
bool cimg_library::CImg< T >::is_sameYZC ( const unsigned int  dy,
const unsigned int  dz,
const unsigned int  dc 
) const [inline]

Return true if image (*this) has the specified height, depth and number of channels.

Definition at line 11048 of file CImg.h.

template<typename T>
template<typename t >
bool cimg_library::CImg< T >::is_sameZ ( const CImg< t > &  img  )  const [inline]

Return true if images (*this) and img have same depth.

Definition at line 10928 of file CImg.h.

template<typename T>
bool cimg_library::CImg< T >::is_sameZ ( const unsigned int  dz  )  const [inline]
template<typename T>
template<typename t >
bool cimg_library::CImg< T >::is_sameZC ( const CImg< t > &  img  )  const [inline]

Return true if images have same depth and same number of channels.

Definition at line 11010 of file CImg.h.

template<typename T>
bool cimg_library::CImg< T >::is_sameZC ( const unsigned int  dz,
const unsigned int  dc 
) const [inline]

Return true if image (*this) has the specified depth and number of channels.

Definition at line 11004 of file CImg.h.

template<typename T>
bool cimg_library::CImg< T >::is_shared (  )  const [inline]

Return true if current image has shared memory.

Definition at line 10880 of file CImg.h.

template<typename T>
template<typename tf , typename tfunc >
static CImg<floatT> cimg_library::CImg< T >::isoline3d ( CImgList< tf > &  primitives,
const tfunc &  func,
const float  isovalue,
const float  x0,
const float  y0,
const float  x1,
const float  y1,
const int  sizex = 256,
const int  sizey = 256 
) [inline, static]

Get isoline as a 3d object.

Definition at line 22509 of file CImg.h.

Referenced by cimg_library::CImg< charT >::get_isoline3d().

template<typename T>
template<typename tf , typename tfunc >
static CImg<floatT> cimg_library::CImg< T >::isosurface3d ( CImgList< tf > &  primitives,
const tfunc &  func,
const float  isovalue,
const float  x0,
const float  y0,
const float  z0,
const float  x1,
const float  y1,
const float  z1,
const int  size_x = 32,
const int  size_y = 32,
const int  size_z = 32 
) [inline, static]

Get isosurface as a 3d object.

Definition at line 22612 of file CImg.h.

Referenced by cimg_library::CImg< charT >::get_isosurface3d().

template<typename T>
T cimg_library::CImg< T >::kth_smallest ( const unsigned int  k  )  const [inline]

Return the kth smallest element of the image.

Definition at line 12835 of file CImg.h.

Referenced by cimg_library::CImg< charT >::median().

template<typename T>
CImg<T>& cimg_library::CImg< T >::label_regions (  )  [inline]

Create a map of indexed labels counting disconnected regions with same intensities.

Returns:
A reference to the modified instance image.
Note:
  • Function CImg<T>::get_label_regions() is also defined. It returns a non-shared modified copy of the instance image.
Sample code :
       const CImg<float> img = CImg<float>("reference.jpg").norm().quantize(4),
                         palette = CImg<float>::default_LUT256(),
                         res = img.get_label_regions().normalize(0,255).map(palette);
       (img,res).display();
ref_label_regions.jpg

Definition at line 15840 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::LabtoRGB (  )  [inline]

Convert a (L,a,b) image to a (R,G,B) one.

Definition at line 16639 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::LabtoXYZ (  )  [inline]

Convert (L,a,b) pixels of a color image into the (X,Y,Z) color space.

Definition at line 16542 of file CImg.h.

Referenced by cimg_library::CImg< charT >::LabtoRGB().

template<typename T>
CImg<T>& cimg_library::CImg< T >::laplacian (  )  [inline]

Compute the laplacian of the instance image.

Definition at line 21246 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::line ( const unsigned int  y0  )  [inline]

Get a line.

Definition at line 19111 of file CImg.h.

template<typename T>
Tfloat cimg_library::CImg< T >::linear_atX ( const float  fx,
const int  y = 0,
const int  z = 0,
const int  c = 0 
) const [inline]

Read a pixel value using linear interpolation and Neumann boundary conditions (first coordinate).

Definition at line 10238 of file CImg.h.

template<typename T>
Tfloat cimg_library::CImg< T >::linear_atX ( const float  fx,
const int  y,
const int  z,
const int  c,
const T  out_val 
) const [inline]

Read a pixel value using linear interpolation and Dirichlet boundary conditions (first coordinate).

Definition at line 10227 of file CImg.h.

template<typename T>
Tfloat cimg_library::CImg< T >::linear_atXY ( const float  fx,
const float  fy,
const int  z = 0,
const int  c = 0 
) const [inline]

Read a pixel value using linear interpolation and Neumann boundary conditions (first two coordinates).

Definition at line 10276 of file CImg.h.

template<typename T>
Tfloat cimg_library::CImg< T >::linear_atXY ( const float  fx,
const float  fy,
const int  z,
const int  c,
const T  out_val 
) const [inline]

Read a pixel value using linear interpolation and Dirichlet boundary conditions (first two coordinates).

Definition at line 10262 of file CImg.h.

template<typename T>
Tfloat cimg_library::CImg< T >::linear_atXYZ ( const float  fx,
const float  fy = 0,
const float  fz = 0,
const int  c = 0 
) const [inline]

Read a pixel value using linear interpolation and Neumann boundary conditions (first three coordinates).

Definition at line 10330 of file CImg.h.

template<typename T>
Tfloat cimg_library::CImg< T >::linear_atXYZ ( const float  fx,
const float  fy,
const float  fz,
const int  c,
const T  out_val 
) const [inline]

Read a pixel value using linear interpolation and Dirichlet boundary conditions (first three coordinates).

Definition at line 10305 of file CImg.h.

template<typename T>
Tfloat cimg_library::CImg< T >::linear_atXYZC ( const float  fx,
const float  fy = 0,
const float  fz = 0,
const float  fc = 0 
) const [inline]

Read a pixel value using linear interpolation and Neumann boundary conditions.

Definition at line 10411 of file CImg.h.

template<typename T>
Tfloat cimg_library::CImg< T >::linear_atXYZC ( const float  fx,
const float  fy,
const float  fz,
const float  fc,
const T  out_val 
) const [inline]

Read a pixel value using linear interpolation and Dirichlet boundary conditions.

Definition at line 10372 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::lines ( const unsigned int  y0,
const unsigned int  y1 
) [inline]

Get a set of lines.

Definition at line 19120 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::load ( const char *const   filename  )  [inline]

Load an image from a file.

Parameters:
filename is the name of the image file to load.
Note:
The extension of filename defines the file format. If no filename extension is provided, CImg<T>::get_load() will try to load a .cimg file.

Definition at line 30125 of file CImg.h.

Referenced by cimg_library::CImgList< charT >::assign(), cimg_library::CImg< charT >::assign(), cimg_library::CImg< charT >::load_gzip_external(), cimg_library::CImg< charT >::max(), cimg_library::CImg< charT >::min(), cimg_library::CImg< charT >::operator=(), and cimg_library::CImg< charT >::pow().

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_analyze ( std::FILE *const   file,
float *const   voxsize = 0 
) [inline]

Load an image from an ANALYZE7.5/NIFTI file.

Definition at line 31508 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_analyze ( const char *const   filename,
float *const   voxsize = 0 
) [inline]

Load an image from an ANALYZE7.5/NIFTI file.

Definition at line 31499 of file CImg.h.

Referenced by cimg_library::CImg< charT >::load(), and cimg_library::CImg< charT >::load_medcon_external().

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_ascii ( std::FILE *const   file  )  [inline]

Load an image from an ASCII file.

Definition at line 30281 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_ascii ( const char *const   filename  )  [inline]

Load an image from an ASCII file.

Definition at line 30272 of file CImg.h.

Referenced by cimg_library::CImg< charT >::load().

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_bmp ( std::FILE *const   file  )  [inline]

Load an image from a BMP file.

Definition at line 30389 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_bmp ( const char *const   filename  )  [inline]

Load an image from a BMP file.

Definition at line 30380 of file CImg.h.

Referenced by cimg_library::CImg< charT >::load().

template<typename T>
CImg<T>& cimg_library::CImg< 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,
const char  axis = 'z',
const char  align = 'p' 
) [inline]

Load a sub-image (list) from a non-compressed .cimg file.

Definition at line 31681 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< 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,
const char  axis = 'z',
const char  align = 'p' 
) [inline]

Load a sub-image (list) from a .cimg file.

Definition at line 31661 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_cimg ( std::FILE *const   file,
const char  axis = 'z',
const char  align = 'p' 
) [inline]

Load an image (list) from a .cimg file.

Definition at line 31649 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_cimg ( const char *const   filename,
const char  axis = 'z',
const char  align = 'p' 
) [inline]

Load an image (list) from a .cimg file.

Definition at line 31637 of file CImg.h.

Referenced by cimg_library::CImg< charT >::load().

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_dcraw_external ( const char *const   filename  )  [inline]

Load a RAW Color Camera image file, using external tool 'dcraw'.

Definition at line 32566 of file CImg.h.

Referenced by cimg_library::CImg< charT >::load().

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_dlm ( std::FILE *const   file  )  [inline]

Load an image from a DLM file.

Definition at line 30336 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_dlm ( const char *const   filename  )  [inline]

Load an image from a DLM file.

Definition at line 30327 of file CImg.h.

Referenced by cimg_library::CImg< charT >::load().

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_exr ( const char *const   filename  )  [inline]

Load an image from a EXR file.

Definition at line 31814 of file CImg.h.

Referenced by cimg_library::CImg< charT >::load().

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_ffmpeg ( const char *const   filename,
const unsigned int  first_frame = 0,
const unsigned int  last_frame = ~0U,
const unsigned int  step_frame = 1,
const bool  pixel_format = true,
const bool  resume = false,
const char  axis = 'z',
const char  align = 'p' 
) [inline]

Load a video sequence using FFMPEG av's libraries.

Definition at line 32138 of file CImg.h.

Referenced by cimg_library::CImg< charT >::load().

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_ffmpeg_external ( const char *const   filename,
const char  axis = 'z',
const char  align = 'p' 
) [inline]

Load a video sequence using FFMPEG's external tool 'ffmpeg'.

Definition at line 32403 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_graphicsmagick_external ( const char *const   filename  )  [inline]

Load an image using GraphicsMagick's external tool 'gm'.

Definition at line 32412 of file CImg.h.

Referenced by cimg_library::CImg< charT >::load_other().

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_gzip_external ( const char *const   filename  )  [inline]

Load a gzipped image file, using external tool 'gunzip'.

Definition at line 32449 of file CImg.h.

Referenced by cimg_library::CImg< charT >::load().

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_imagemagick_external ( const char *const   filename  )  [inline]

Load an image using ImageMagick's external tool 'convert'.

Definition at line 32492 of file CImg.h.

Referenced by cimg_library::CImg< charT >::load_other().

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_inr ( std::FILE *const   file,
float *const   voxsize = 0 
) [inline]

Load an image from an INRIMAGE-4 file.

Definition at line 31710 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_inr ( const char *const   filename,
float *const   voxsize = 0 
) [inline]

Load an image from an INRIMAGE-4 file.

Definition at line 31701 of file CImg.h.

Referenced by cimg_library::CImg< charT >::load().

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_jpeg ( std::FILE *const   file  )  [inline]

Load an image from a JPEG file.

Definition at line 30547 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_jpeg ( const char *const   filename  )  [inline]

Load an image from a JPEG file.

Definition at line 30538 of file CImg.h.

Referenced by cimg_library::CImg< charT >::load().

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_magick ( const char *const   filename  )  [inline]

Load an image from a file, using Magick++ library.

Definition at line 30641 of file CImg.h.

Referenced by cimg_library::CImg< charT >::load_other().

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_medcon_external ( const char *const   filename  )  [inline]

Load a DICOM image file, using XMedcon's external tool 'medcon'.

Definition at line 32529 of file CImg.h.

Referenced by cimg_library::CImg< charT >::load().

template<typename T>
template<typename tf , typename tc >
CImg<T>& cimg_library::CImg< T >::load_off ( std::FILE *const   file,
CImgList< tf > &  primitives,
CImgList< tc > &  colors 
) [inline]

Load a 3d object from a .OFF file.

Definition at line 32193 of file CImg.h.

template<typename T>
template<typename tf , typename tc >
CImg<T>& cimg_library::CImg< T >::load_off ( const char *const   filename,
CImgList< tf > &  primitives,
CImgList< tc > &  colors 
) [inline]

Load a 3d object from a .OFF file.

Definition at line 32182 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_other ( const char *const   filename  )  [inline]

Load an image using ImageMagick's or GraphicsMagick's executables.

Definition at line 32603 of file CImg.h.

Referenced by cimg_library::CImg< charT >::load(), cimg_library::CImg< charT >::load_exr(), and cimg_library::CImg< charT >::load_tiff().

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_pandore ( std::FILE *const   file  )  [inline]

Load an image from a PANDORE file.

Definition at line 31858 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_pandore ( const char *const   filename  )  [inline]

Load an image from a PANDORE file.

Definition at line 31849 of file CImg.h.

Referenced by cimg_library::CImg< charT >::load().

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_parrec ( const char *const   filename,
const char  axis = 'c',
const char  align = 'p' 
) [inline]

Load an image from a PAR-REC (Philips) file.

Definition at line 32067 of file CImg.h.

Referenced by cimg_library::CImg< charT >::load().

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_pfm ( std::FILE *const   file  )  [inline]

Load an image from a PFM file.

Definition at line 31046 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_pfm ( const char *const   filename  )  [inline]

Load an image from a PFM file.

Definition at line 31037 of file CImg.h.

Referenced by cimg_library::CImg< charT >::load().

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_png ( std::FILE *const   file  )  [inline]

Load an image from a PNG file.

Definition at line 30720 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_png ( const char *const   filename  )  [inline]

Load an image from a PNG file.

Definition at line 30711 of file CImg.h.

Referenced by cimg_library::CImg< charT >::load().

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_pnm ( std::FILE *const   file  )  [inline]

Load an image from a PNM file.

Definition at line 30899 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_pnm ( const char *const   filename  )  [inline]
template<typename T>
CImg<T>& cimg_library::CImg< T >::load_raw ( std::FILE *const   file,
const unsigned int  sizex,
const unsigned int  sizey = 1,
const unsigned int  sizez = 1,
const unsigned int  sizev = 1,
const bool  multiplexed = false,
const bool  invert_endianness = false 
) [inline]

Load an image from a .RAW file.

Definition at line 32094 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_raw ( const char *const   filename,
const unsigned int  sizex,
const unsigned int  sizey = 1,
const unsigned int  sizez = 1,
const unsigned int  sizev = 1,
const bool  multiplexed = false,
const bool  invert_endianness = false 
) [inline]

Load an image from a .RAW file.

Definition at line 32079 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_rgb ( std::FILE *const   file,
const unsigned int  dimw,
const unsigned int  dimh = 1 
) [inline]

Load an image from a RGB file.

Definition at line 31129 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_rgb ( const char *const   filename,
const unsigned int  dimw,
const unsigned int  dimh = 1 
) [inline]

Load an image from a RGB file.

Definition at line 31120 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_rgba ( std::FILE *const   file,
const unsigned int  dimw,
const unsigned int  dimh = 1 
) [inline]

Load an image from a RGBA file.

Definition at line 31177 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_rgba ( const char *const   filename,
const unsigned int  dimw,
const unsigned int  dimh = 1 
) [inline]

Load an image from a RGBA file.

Definition at line 31168 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< 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 
) [inline]

Load an image from a TIFF file.

Definition at line 31218 of file CImg.h.

Referenced by cimg_library::CImg< charT >::load().

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_yuv ( std::FILE *const   file,
const unsigned int  sizex,
const unsigned int  sizey = 1,
const unsigned int  first_frame = 0,
const unsigned int  last_frame = ~0U,
const unsigned int  step_frame = 1,
const bool  yuv2rgb = true,
const char  axis = 'z',
const char  align = 'p' 
) [inline]

Load an image sequence from a YUV file.

Definition at line 32166 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::load_yuv ( const char *const   filename,
const unsigned int  sizex,
const unsigned int  sizey = 1,
const unsigned int  first_frame = 0,
const unsigned int  last_frame = ~0U,
const unsigned int  step_frame = 1,
const bool  yuv2rgb = true,
const char  axis = 'z',
const char  align = 'p' 
) [inline]

Load an image sequence from a YUV file.

Definition at line 32151 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::log (  )  [inline]

Compute the log of each each pixel value.

Definition at line 12227 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::log10 (  )  [inline]

Compute the log10 of each each pixel value.

Definition at line 12237 of file CImg.h.

Referenced by cimg_library::CImg< charT >::get_select_graph().

template<typename T>
Tdouble cimg_library::CImg< T >::magnitude ( const int  magnitude_type = 2  )  const [inline]

Return the norm of the current vector/matrix. ntype = norm type (0=L2, 1=L1, -1=Linf).

Definition at line 13079 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::map ( const CImg< t > &  palette  )  [inline]

Map predefined palette on the scalar (indexed) instance image.

Parameters:
palette Multi-valued palette used for mapping the indexes.
Returns:
A reference to the modified instance image.
Note:
  • Function CImg<T>::get_map() is also defined. It returns a non-shared modified copy of the instance image.
Sample code :
       const CImg<float> img("reference.jpg"),
                         palette1(3,1,1,3, 0,128,255, 0,128,255, 0,128,255),
                         palette2(3,1,1,3, 255,0,0, 0,255,0, 0,0,255),
                         res = img.get_index(palette1,false).map(palette2);
       (img,res).display();
ref_map.jpg

Definition at line 15775 of file CImg.h.

template<typename T>
static CImg<T> cimg_library::CImg< T >::matrix ( const T &  a0,
const T &  a1,
const T &  a2,
const T &  a3,
const T &  a4,
const T &  a5,
const T &  a6,
const T &  a7,
const T &  a8,
const T &  a9,
const T &  a10,
const T &  a11,
const T &  a12,
const T &  a13,
const T &  a14,
const T &  a15,
const T &  a16,
const T &  a17,
const T &  a18,
const T &  a19,
const T &  a20,
const T &  a21,
const T &  a22,
const T &  a23,
const T &  a24 
) [inline, static]

Return a 5x5 square matrix with specified coefficients.

Definition at line 14502 of file CImg.h.

template<typename T>
static CImg<T> cimg_library::CImg< T >::matrix ( const T &  a0,
const T &  a1,
const T &  a2,
const T &  a3,
const T &  a4,
const T &  a5,
const T &  a6,
const T &  a7,
const T &  a8,
const T &  a9,
const T &  a10,
const T &  a11,
const T &  a12,
const T &  a13,
const T &  a14,
const T &  a15 
) [inline, static]

Return a 4x4 square matrix with specified coefficients.

Definition at line 14489 of file CImg.h.

template<typename T>
static CImg<T> cimg_library::CImg< T >::matrix ( const T &  a0,
const T &  a1,
const T &  a2,
const T &  a3,
const T &  a4,
const T &  a5,
const T &  a6,
const T &  a7,
const T &  a8 
) [inline, static]

Return a 3x3 square matrix with specified coefficients.

Definition at line 14478 of file CImg.h.

template<typename T>
static CImg<T> cimg_library::CImg< T >::matrix ( const T &  a0,
const T &  a1,
const T &  a2,
const T &  a3 
) [inline, static]

Return a 2x2 square matrix with specified coefficients.

Definition at line 14469 of file CImg.h.

template<typename T>
static CImg<T> cimg_library::CImg< T >::matrix ( const T &  a0  )  [inline, static]

Return a 1x1 square matrix with specified coefficients.

Definition at line 14464 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::matrix (  )  [inline]

Realign pixel values of the instance image as a square matrix.

Definition at line 13239 of file CImg.h.

Referenced by cimg_library::CImg< charT >::diagonal(), cimg_library::CImg< charT >::rotation_matrix(), and cimg_library::CImg< charT >::tensor().

template<typename T>
T& cimg_library::CImg< T >::max (  )  [inline]
template<typename T>
CImg<T>& cimg_library::CImg< T >::max ( const char *const   expression  )  [inline]

Pointwise max operator between an image and a string.

Definition at line 12692 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::max ( const CImg< t > &  img  )  [inline]

Pointwise max operator between two images.

Definition at line 12678 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::max ( const T  val  )  [inline]

Pointwise max operator between an image and a value.

Definition at line 12667 of file CImg.h.

template<typename T>
template<typename t >
T& cimg_library::CImg< T >::max_min ( t &  min_val  )  [inline]
template<typename T>
Tdouble cimg_library::CImg< T >::mean (  )  const [inline]

Return the mean pixel value of the instance image.

Definition at line 12888 of file CImg.h.

template<typename T>
T cimg_library::CImg< T >::median (  )  const [inline]

Return the median value of the image.

Definition at line 12870 of file CImg.h.

template<typename T>
T& cimg_library::CImg< T >::min (  )  [inline]
template<typename T>
CImg<T>& cimg_library::CImg< T >::min ( const char *const   expression  )  [inline]

Pointwise min operator between an image and a string.

Definition at line 12640 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::min ( const CImg< t > &  img  )  [inline]

Pointwise min operator between two images.

Definition at line 12626 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::min ( const T  val  )  [inline]

Pointwise min operator between an image and a value.

Definition at line 12615 of file CImg.h.

template<typename T>
template<typename t >
T& cimg_library::CImg< T >::min_max ( t &  max_val  )  [inline]

Return a reference to the minimum pixel value and return also the maximum pixel value.

Definition at line 12766 of file CImg.h.

Referenced by cimg_library::CImg< charT >::display_graph(), cimg_library::CImg< charT >::equalize(), cimg_library::CImg< charT >::get_select_graph(), and cimg_library::CImg< charT >::noise().

template<typename T>
CImg<T>& cimg_library::CImg< T >::mirror ( const char  axis  )  [inline]

Mirror an image along the specified axis.

Definition at line 17713 of file CImg.h.

template<typename T>
template<typename t >
CImg<t>& cimg_library::CImg< T >::move_to ( CImg< t > &  img  )  [inline]
template<typename T>
template<typename t >
Tdouble cimg_library::CImg< T >::MSE ( const CImg< t > &  img  )  const [inline]

Compute the MSE (Mean-Squared Error) between two images.

Definition at line 12997 of file CImg.h.

Referenced by cimg_library::CImg< charT >::PSNR().

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::mul ( const CImg< t > &  img  )  [inline]

Pointwise multiplication between two images.

Definition at line 12401 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::mul ( const char *const   expression  )  [inline]

Pointwise multiplication between an image and an expression.

Definition at line 12381 of file CImg.h.

Referenced by cimg_library::CImg< charT >::mul().

template<typename T>
CImg<T>& cimg_library::CImg< T >::noise ( const double  sigma,
const unsigned int  noise_type = 0 
) [inline]

Add random noise to the values of the instance image.

Parameters:
sigma Amplitude of the random additive noise. If sigma<0, it stands for a percentage of the global value range.
noise_type Type of additive noise (can be 0=gaussian, 1=uniform, 2=Salt and Pepper, 3=Poisson or 4=Rician).
Returns:
A reference to the modified instance image.
Note:
  • For Poisson noise (noise_type=3), parameter sigma is ignored, as Poisson noise only depends on the image value itself.
  • Function CImg<T>::get_noise() is also defined. It returns a non-shared modified copy of the instance image.
Sample code :
       const CImg<float> img("reference.jpg"), res = img.get_noise(40);
       (img,res.normalize(0,255)).display();
ref_noise.jpg

Definition at line 15175 of file CImg.h.

Referenced by cimg_library::CImg< charT >::get_select_graph().

template<typename T>
CImg<T>& cimg_library::CImg< T >::norm ( const int  norm_type = 2  )  [inline]

Compute L2-norm of each multi-valued pixel of the instance image.

Parameters:
norm_type Type of computed vector norm (can be 0=Linf, 1=L1 or 2=L2).
Returns:
A reference to the modified instance image.
Note:
  • Function CImg<T>::get_norm() is also defined. It returns a non-shared modified copy of the instance image.
Sample code :
       const CImg<float> img("reference.jpg"), res = img.get_norm();
       (img,res.normalize(0,255)).display();
ref_norm.jpg

Definition at line 15309 of file CImg.h.

Referenced by cimg_library::CImg< charT >::rotation_matrix().

template<typename T>
CImg<T>& cimg_library::CImg< T >::normalize (  )  [inline]

Normalize multi-valued pixels of the instance image, with respect to their L2-norm.

Returns:
A reference to the modified instance image.
Note:
  • Function CImg<T>::get_normalize() is also defined. It returns a non-shared modified copy of the instance image.
Sample code :
       const CImg<float> img("reference.jpg"), res = img.get_normalize();
       (img,res.normalize(0,255)).display();
ref_normalize.jpg

Definition at line 15277 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::normalize ( const T  value_min,
const T  value_max 
) [inline]

Linearly normalize values of the instance image between value_min and value_max.

Parameters:
value_min Minimum desired value of the resulting image.
value_max Maximum desired value of the resulting image.
Returns:
A reference to the modified instance image.
Note:
  • Function CImg<T>::get_normalize() is also defined. It returns a non-shared modified copy of the instance image.
Sample code :
       const CImg<float> img("reference.jpg"), res = img.get_normalize(160,220);
       (img,res).display();
ref_normalize2.jpg

Definition at line 15251 of file CImg.h.

template<typename T>
template<typename tp , typename tc , typename to >
CImg<T>& cimg_library::CImg< T >::object3dtoCImg3d ( const CImgList< tp > &  primitives,
const CImgList< tc > &  colors,
const to &  opacities 
) [inline]

Convert a 3d object into a CImg3d.

Definition at line 23272 of file CImg.h.

template<typename T>
int cimg_library::CImg< T >::offset ( const int  x,
const int  y = 0,
const int  z = 0,
const int  c = 0 
) const [inline]

Return the offset of the pixel coordinates (x,y,z,v) with respect to the data pointer data.

Parameters:
x X-coordinate of the pixel.
y Y-coordinate of the pixel.
z Z-coordinate of the pixel.
v C-coordinate of the pixel.
  • No checking is done on the validity of the given coordinates.
Example:
       CImg<float> img(100,100,1,3,0);         // Define a 100x100 color image with float-valued black pixels.
       long off = img.offset(10,10,0,2);       // Get the offset of the blue value of the pixel located at (10,10).
       float val = img[off];                   // Get the blue value of the pixel.

Definition at line 10008 of file CImg.h.

template<typename T>
cimg_library::CImg< T >::operator const T * (  )  const [inline]

Return address of the pixel buffer.

Definition at line 9236 of file CImg.h.

template<typename T>
template<typename t >
bool cimg_library::CImg< T >::operator!= ( const CImg< t > &  img  )  const [inline]

Operator!=().

Definition at line 9859 of file CImg.h.

template<typename T>
template<typename t >
CImg<_cimg_Tt> cimg_library::CImg< T >::operator% ( const CImg< t > &  img  )  const [inline]

Operator%().

Definition at line 9612 of file CImg.h.

template<typename T>
CImg<Tfloat> cimg_library::CImg< T >::operator% ( const char *const   expression  )  const [inline]

Operator%().

Definition at line 9606 of file CImg.h.

template<typename T>
template<typename t >
CImg<_cimg_Tt> cimg_library::CImg< T >::operator% ( const t  val  )  const [inline]

Operator%().

Definition at line 9601 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::operator%= ( const CImg< t > &  img  )  [inline]

Operator=().

Definition at line 9587 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::operator%= ( const char *const   expression  )  [inline]

Operator=().

Definition at line 9567 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::operator%= ( const t  val  )  [inline]

Operator=().

Definition at line 9561 of file CImg.h.

template<typename T>
template<typename t >
CImg<T> cimg_library::CImg< T >::operator& ( const t  val  )  const [inline]

Operator&().

Definition at line 9658 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::operator&= ( const CImg< t > &  img  )  [inline]

Operator&=().

Definition at line 9644 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::operator&= ( const char *const   expression  )  [inline]

Operator&=().

Definition at line 9624 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::operator&= ( const t  val  )  [inline]

Operator&=().

Definition at line 9618 of file CImg.h.

template<typename T>
T& cimg_library::CImg< T >::operator() ( const unsigned int  x,
const unsigned int  y = 0,
const unsigned int  z = 0,
const unsigned int  c = 0 
) [inline]

Fast access to pixel value for reading or writing.

Parameters:
x X-coordinate of the pixel.
y Y-coordinate of the pixel.
z Z-coordinate of the pixel.
v C-coordinate of the pixel.
  • If one image dimension is equal to 1, it can be omitted in the coordinate list (see example below).
  • If the macro 'cimg_verbosity'>=3, boundary checking is performed and warning messages may appear (but function performances decrease).
example:
       CImg<float> img(100,100,1,3,0);                       // Define a 100x100 color image with float-valued black pixels.
       const float valR = img(10,10,0,0);                    // Read the red component at coordinates (10,10).
       const float valG = img(10,10,0,1);                    // Read the green component at coordinates (10,10)
       const float valB = img(10,10,2);                      // Read the blue component at coordinates (10,10) (Z-coordinate omitted here).
       const float avg = (valR + valG + valB)/3;             // Compute average pixel value.
       img(10,10,0) = img(10,10,1) = img(10,10,2) = avg;     // Replace the pixel (10,10) by the average grey value.

Definition at line 9226 of file CImg.h.

template<typename T>
template<typename t >
CImg<_cimg_Tt> cimg_library::CImg< T >::operator* ( const CImg< t > &  img  )  const [inline]

Operator*().

Definition at line 9494 of file CImg.h.

template<typename T>
CImg<Tfloat> cimg_library::CImg< T >::operator* ( const char *const   expression  )  const [inline]

Operator*().

Definition at line 9488 of file CImg.h.

template<typename T>
template<typename t >
CImg<_cimg_Tt> cimg_library::CImg< T >::operator* ( const t  val  )  const [inline]

Operator*().

Definition at line 9483 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::operator*= ( const CImg< t > &  img  )  [inline]

Operator*=().

Definition at line 9477 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::operator*= ( const char *const   expression  )  [inline]

Operator*=().

Definition at line 9457 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::operator*= ( const t  val  )  [inline]

Operator*=().

Definition at line 9451 of file CImg.h.

template<typename T>
template<typename t >
CImg<_cimg_Tt> cimg_library::CImg< T >::operator+ ( const CImg< t > &  img  )  const [inline]

Operator+().

Definition at line 9370 of file CImg.h.

template<typename T>
CImg<Tfloat> cimg_library::CImg< T >::operator+ ( const char *const   expression  )  const [inline]

Operator+().

Definition at line 9364 of file CImg.h.

template<typename T>
template<typename t >
CImg<_cimg_Tt> cimg_library::CImg< T >::operator+ ( const t  val  )  const [inline]

Operator+().

Definition at line 9359 of file CImg.h.

template<typename T>
CImg<T> cimg_library::CImg< T >::operator+ (  )  const [inline]

Operator+() (unary).

Remarks:
  • This operator always returns a non-shared copy of an image.

Definition at line 9353 of file CImg.h.

template<typename T>
CImg<T> cimg_library::CImg< T >::operator++ ( int   )  [inline]

Operator++() (postfix).

Definition at line 9342 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::operator++ (  )  [inline]

Operator++() (prefix).

Definition at line 9336 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::operator+= ( const CImg< t > &  img  )  [inline]

Operator+=().

Definition at line 9323 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::operator+= ( const char *const   expression  )  [inline]

Operator+=().

Definition at line 9303 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::operator+= ( const t  val  )  [inline]

Operator+=().

Definition at line 9297 of file CImg.h.

template<typename T>
template<typename t >
CImgList<_cimg_Tt> cimg_library::CImg< T >::operator, ( CImgList< t > &  list  )  const [inline]

Operator,().

Definition at line 9871 of file CImg.h.

template<typename T>
template<typename t >
CImgList<_cimg_Tt> cimg_library::CImg< T >::operator, ( const CImg< t > &  img  )  const [inline]

Operator,().

Definition at line 9865 of file CImg.h.

template<typename T>
template<typename t >
CImg<_cimg_Tt> cimg_library::CImg< T >::operator- ( const CImg< t > &  img  )  const [inline]

Operator-().

Definition at line 9445 of file CImg.h.

template<typename T>
CImg<Tfloat> cimg_library::CImg< T >::operator- ( const char *const   expression  )  const [inline]

Operator-().

Definition at line 9439 of file CImg.h.

template<typename T>
template<typename t >
CImg<_cimg_Tt> cimg_library::CImg< T >::operator- ( const t  val  )  const [inline]

Operator-().

Definition at line 9434 of file CImg.h.

template<typename T>
CImg<T> cimg_library::CImg< T >::operator- (  )  const [inline]

Operator-() (unary).

Definition at line 9428 of file CImg.h.

template<typename T>
CImg<T> cimg_library::CImg< T >::operator-- ( int   )  [inline]

Operator--() (postfix).

Definition at line 9421 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::operator-- (  )  [inline]

Operator--() (prefix).

Definition at line 9415 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::operator-= ( const CImg< t > &  img  )  [inline]

Operator-=().

Definition at line 9402 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::operator-= ( const char *const   expression  )  [inline]

Operator-=().

Definition at line 9382 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::operator-= ( const t  val  )  [inline]

Operator-=().

Definition at line 9376 of file CImg.h.

template<typename T>
template<typename t >
CImg<_cimg_Tt> cimg_library::CImg< T >::operator/ ( const CImg< t > &  img  )  const [inline]

Operator/().

Definition at line 9555 of file CImg.h.

template<typename T>
CImg<Tfloat> cimg_library::CImg< T >::operator/ ( const char *const   expression  )  const [inline]

Operator/().

Definition at line 9549 of file CImg.h.

template<typename T>
template<typename t >
CImg<_cimg_Tt> cimg_library::CImg< T >::operator/ ( const t  val  )  const [inline]

Operator/().

Definition at line 9544 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::operator/= ( const CImg< t > &  img  )  [inline]

Operator/=().

Definition at line 9538 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::operator/= ( const char *const   expression  )  [inline]

Operator/=().

Definition at line 9518 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::operator/= ( const t  val  )  [inline]

Operator/=().

Definition at line 9512 of file CImg.h.

template<typename T>
CImgList<T> cimg_library::CImg< T >::operator< ( const char  axis  )  const [inline]

Operator<().

Definition at line 9876 of file CImg.h.

template<typename T>
template<typename t >
CImg<T> cimg_library::CImg< T >::operator<< ( const t  val  )  const [inline]

Operator<<().

Definition at line 9796 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::operator<<= ( const CImg< t > &  img  )  [inline]

Operator<<=().

Definition at line 9782 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::operator<<= ( const char *const   expression  )  [inline]

Operator<<=().

Definition at line 9762 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::operator<<= ( const t  val  )  [inline]

Operator<<=().

Definition at line 9756 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::operator= ( const CImgDisplay disp  )  [inline]

Operator=().

Definition at line 9290 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::operator= ( const CImg< t > &  img  )  [inline]

Operator=().

Assignement operator. If instance image is non-shared, replace the instance image by a copy of the argument image. If instance image is shared, replace the image content by the content of the argument image.

Definition at line 9281 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::operator= ( const char *const   expression  )  [inline]

Operator=().

Assignment operator. If expression is a formula or a list of values, the image pixels are filled according to the expression and the image size is not modified. If expression is a filename, the image is replaced by the input file data (so image size is modified).

Definition at line 9261 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::operator= ( const T  val  )  [inline]

Operator=().

Assignment operator. Fill all pixels of the instance image with the same value. The image size is not modified.

Definition at line 9249 of file CImg.h.

template<typename T>
template<typename t >
bool cimg_library::CImg< T >::operator== ( const CImg< t > &  img  )  const [inline]

Operator==().

Definition at line 9848 of file CImg.h.

template<typename T>
template<typename t >
CImg<T> cimg_library::CImg< T >::operator>> ( const t  val  )  const [inline]

Operator>>().

Definition at line 9842 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::operator>>= ( const CImg< t > &  img  )  [inline]

Operator>>=().

Definition at line 9828 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::operator>>= ( const char *const   expression  )  [inline]

Operator>>=().

Definition at line 9808 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::operator>>= ( const t  val  )  [inline]

Operator>>=().

Definition at line 9802 of file CImg.h.

template<typename T>
template<typename t >
CImg<T> cimg_library::CImg< T >::operator^ ( const t  val  )  const [inline]

Operator^().

Definition at line 9750 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::operator^= ( const CImg< t > &  img  )  [inline]

Operator^=().

Definition at line 9736 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::operator^= ( const char *const   expression  )  [inline]

Operator^=().

Definition at line 9716 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::operator^= ( const t  val  )  [inline]

Operator^=().

Definition at line 9710 of file CImg.h.

template<typename T>
template<typename t >
CImg<T> cimg_library::CImg< T >::operator| ( const t  val  )  const [inline]

Operator|().

Definition at line 9704 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::operator|= ( const CImg< t > &  img  )  [inline]

Operator|=().

Definition at line 9690 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::operator|= ( const char *const   expression  )  [inline]

Operator|=().

Definition at line 9670 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::operator|= ( const t  val  )  [inline]

Operator|=().

Definition at line 9664 of file CImg.h.

template<typename T>
CImg<T> cimg_library::CImg< T >::operator~ (  )  const [inline]

Operator~().

Definition at line 9881 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::permute_axes ( const char *const   order  )  [inline]

Permute axes order.

This function permutes image axes.

Parameters:
permut = String describing the permutation (4 characters).

Definition at line 18165 of file CImg.h.

template<typename T>
static const char* cimg_library::CImg< T >::pixel_type (  )  [inline, static]

Return the type of the pixel values.

Returns:
a string describing the type of the image pixels (template parameter T).
  • The string returned may contains spaces ("unsigned char").
  • If the template parameter T does not correspond to a registered type, the string "unknown" is returned.

Definition at line 9901 of file CImg.h.

Referenced by cimg_library::CImgList< charT >::_save_cimg(), cimg_library::CImgList< charT >::display(), cimg_library::CImg< charT >::display_graph(), cimg_library::CImg< charT >::elevation3d(), cimg_library::CImg< charT >::FFT(), cimg_library::CImg< charT >::fill(), cimg_library::CImg< charT >::get_select_graph(), cimg_library::CImg< charT >::load(), cimg_library::CImg< charT >::print(), cimg_library::CImgList< charT >::print(), cimg_library::CImg< charT >::save_analyze(), and cimg_library::CImg< charT >::streamline().

template<typename T>
template<typename tf >
static CImg<floatT> cimg_library::CImg< T >::plane3d ( CImgList< tf > &  primitives,
const float  size_x = 100,
const float  size_y = 100,
const unsigned int  subdivisions_x = 10,
const unsigned int  subdivisions_y = 10 
) [inline, static]

Create and return a 3d XY-plane.

Parameters:
[out] primitives The returned list of the 3d object primitives (template type tf should be at least unsigned int).
size_x The width of the plane (dimension along the X-axis).
size_y The height of the plane (dimensions along the Y-axis).
subdivisions_x The number of planar subdivisions along the X-axis.
subdivisions_y The number of planar subdivisions along the Y-axis.
Returns:
The N vertices (xi,yi,zi) of the 3d object as a Nx3 CImg<float> image (0<=i<=N-1).
Sample code :
       CImgList<unsigned int> faces3d;
       const CImg<float> points3d = CImg<float>::plane3d(faces3d,100,50);
       CImg<unsigned char>().display_object3d(points3d,faces3d);
ref_plane3d.jpg

Definition at line 23154 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::pow ( const char *const   expression  )  [inline]

Compute the power of each pixel value.

Definition at line 12488 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::pow ( const CImg< t > &  img  )  [inline]

Compute the power of each pixel value.

Definition at line 12474 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::pow ( const double  p  )  [inline]

Compute the power by p of each pixel value.

Definition at line 12457 of file CImg.h.

Referenced by cimg_library::CImg< charT >::draw_axes(), cimg_library::CImg< charT >::LabtoXYZ(), and cimg_library::CImg< charT >::pow().

template<typename T>
const CImg<T>& cimg_library::CImg< T >::print ( const char *const   title = 0,
const bool  display_stats = true 
) const [inline]

Display informations about the image on the standard error output.

Parameters:
title Name for the considered image (optional).
display_stats Compute and display image statistics (optional).

Definition at line 32646 of file CImg.h.

Referenced by cimg_library::CImgList< charT >::display().

template<typename T>
CImg<T>& cimg_library::CImg< T >::projections2d ( const unsigned int  x0,
const unsigned int  y0,
const unsigned int  z0,
const int  dx = -100,
const int  dy = -100,
const int  dz = -100 
) [inline]

Return a 2d representation of a 3d image, with three slices.

Definition at line 18845 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::pseudoinvert (  )  [inline]

Compute the pseudo-inverse (Moore-Penrose) of the matrix.

Definition at line 13448 of file CImg.h.

template<typename T>
template<typename t >
Tdouble cimg_library::CImg< T >::PSNR ( const CImg< t > &  img,
const Tdouble  valmax = 255 
) const [inline]

Compute the PSNR between two images.

Definition at line 13015 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::quantize ( const unsigned int  nb_levels,
const bool  keep_range = true 
) [inline]

Uniformly quantize values of the instance image into nb_levels levels.

Parameters:
nb_levels Number of quantization levels.
keep_range Tells if resulting values keep the same range as the original ones.
Returns:
A reference to the modified instance image.
Note:
  • Function CImg<T>::get_quantize() is also defined. It returns a non-shared modified copy of the instance image.
Sample code :
       const CImg<float> img("reference.jpg"), res = img.get_quantize(4);
       (img,res).display();
ref_quantize.jpg

Definition at line 15389 of file CImg.h.

template<typename T>
static CImg<Tuchar> cimg_library::CImg< T >::rainbow_LUT256 (  )  [inline, static]

Return a rainbow indexed color palette with 256 (R,G,B) entries.

Returns:
An instance of a rainbow color palette with 256 (R,G,B) colors.
ref_rainbow_LUT256.jpg

Definition at line 15950 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::rand ( const T  val_min,
const T  val_max 
) [inline]

Fill the instance image with random values between specified range.

Definition at line 15136 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::resize ( const CImgDisplay disp,
const int  interpolation_type = 1,
const unsigned int  border_conditions = 0,
const float  centering_x = 0,
const float  centering_y = 0,
const float  centering_z = 0,
const float  centering_c = 0 
) [inline]

Resize an image.

Definition at line 17559 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::resize ( const CImg< t > &  src,
const int  interpolation_type = 1,
const unsigned int  border_conditions = 0,
const float  centering_x = 0,
const float  centering_y = 0,
const float  centering_z = 0,
const float  centering_c = 0 
) [inline]

Resize an image.

Definition at line 17541 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::resize ( const int  size_x,
const int  size_y = -100,
const int  size_z = -100,
const int  size_c = -100,
const int  interpolation_type = 1,
const unsigned int  border_conditions = 0,
const float  centering_x = 0,
const float  centering_y = 0,
const float  centering_z = 0,
const float  centering_c = 0 
) [inline]

Resize an image.

Parameters:
size_x Number of columns (new size along the X-axis).
size_y Number of rows (new size along the Y-axis).
size_z Number of slices (new size along the Z-axis).
size_c Number of vector-channels (new size along the C-axis).
interpolation_type Method of interpolation :

  • -1 = no interpolation : raw memory resizing.
  • 0 = no interpolation : additional space is filled according to border_condition.
  • 1 = nearest-neighbor interpolation.
  • 2 = moving average interpolation.
  • 3 = linear interpolation.
  • 4 = grid interpolation.
  • 5 = bicubic interpolation.
  • 6 = lanczos interpolation.
border_conditions Border condition type.
centering_x Set centering type (only if interpolation_type=0).
centering_y Set centering type (only if interpolation_type=0).
centering_z Set centering type (only if interpolation_type=0).
centering_c Set centering type (only if interpolation_type=0).
Note:
If pd[x,y,z,v]<0, it corresponds to a percentage of the original size (the default value is -100).

Definition at line 16860 of file CImg.h.

Referenced by cimg_library::CImg< charT >::draw_text(), cimg_library::CImg< charT >::load_tiff(), cimg_library::CImg< charT >::resize(), and cimg_library::CImg< charT >::streamline().

template<typename T>
CImg<T>& cimg_library::CImg< T >::resize_doubleXY (  )  [inline]

Upscale an image by a factor 2x.

Use anisotropic upscaling algorithm described at http://scale2x.sourceforge.net/algorithm.html

Definition at line 17601 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::resize_halfXY (  )  [inline]

Half-resize an image, using a special optimized filter.

Definition at line 17576 of file CImg.h.

template<typename T>
CImg<T> cimg_library::CImg< T >::resize_object3d (  )  const [inline]

Resize a 3d object so that its max dimension if one.

Definition at line 22294 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::resize_object3d ( const float  sx,
const float  sy = -100,
const float  sz = -100 
) [inline]

Resize a 3d object.

Definition at line 22275 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::resize_tripleXY (  )  [inline]

Upscale an image by a factor 3x.

Use anisotropic upscaling algorithm described at http://scale2x.sourceforge.net/algorithm.html

Definition at line 17654 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::RGBtoBayer (  )  [inline]

Convert a (R,G,B) image to a Bayer-coded representation.

Note:
First (upper-left) pixel if the red component of the pixel color.

Definition at line 16687 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::RGBtoCMY (  )  [inline]

Convert color pixels from (R,G,B) to (C,M,Y).

Definition at line 16342 of file CImg.h.

Referenced by cimg_library::CImg< charT >::RGBtoCMYK().

template<typename T>
CImg<T>& cimg_library::CImg< T >::RGBtoCMYK (  )  [inline]

Convert a (R,G,B) image to a (C,M,Y,K) one.

Definition at line 16666 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::RGBtoHSI (  )  [inline]

Convert color pixels from (R,G,B) to (H,S,I). Reference: "Digital Image Processing, 2nd. edition", R. Gonzalez and R. Woods. Prentice Hall, 2002.

Definition at line 16160 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::RGBtoHSL (  )  [inline]

Convert color pixels from (R,G,B) to (H,S,L).

Definition at line 16082 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::RGBtoHSV (  )  [inline]

Convert color pixels from (R,G,B) to (H,S,V).

Definition at line 15999 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::RGBtoLab (  )  [inline]

Convert a (R,G,B) image to a (L,a,b) one.

Definition at line 16630 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::RGBtoxyY (  )  [inline]

Convert a (R,G,B) image to a (x,y,Y) one.

Definition at line 16648 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::RGBtoXYZ (  )  [inline]

Convert color pixels from (R,G,B) to (X,Y,Z)_709.

Definition at line 16457 of file CImg.h.

Referenced by cimg_library::CImg< charT >::RGBtoLab(), and cimg_library::CImg< charT >::RGBtoxyY().

template<typename T>
CImg<T>& cimg_library::CImg< T >::RGBtoYCbCr (  )  [inline]

Convert color pixels from (R,G,B) to (Y,Cb,Cr).

Definition at line 16236 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::RGBtoYUV (  )  [inline]

Convert color pixels from (R,G,B) to (Y,U,V).

Definition at line 16290 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::rol ( const unsigned int  n = 1  )  [inline]

Compute the bitwise left rotation of each pixel value.

Definition at line 12515 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::ror ( const unsigned int  n = 1  )  [inline]

Compute the bitwise right rotation of each pixel value.

Definition at line 12565 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::rotate ( const float  angle,
const float  cx,
const float  cy,
const float  zoom,
const unsigned int  border_conditions = 3,
const unsigned int  interpolation = 1 
) [inline]

Rotate an image around a center point (cx,cy).

Parameters:
angle = rotation angle (in degrees).
cx = X-coordinate of the rotation center.
cy = Y-coordinate of the rotation center.
zoom = zoom.
cond = rotation type. can be :

  • 0 = zero-value at borders
  • 1 = repeat image at borders
  • 2 = zero-value at borders and linear interpolation

Definition at line 18322 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::rotate ( const float  angle,
const unsigned int  border_conditions = 0,
const unsigned int  interpolation = 1 
) [inline]

Rotate an image.

Parameters:
angle = rotation angle (in degrees).
cond = rotation type. can be :

  • 0 = zero-value at borders
  • 1 = nearest pixel.
  • 2 = cyclic.
Note:
Returned image will probably have a different size than the instance image *this.

Definition at line 18199 of file CImg.h.

template<typename T>
static CImg<T> cimg_library::CImg< T >::rotation_matrix ( const float  x,
const float  y,
const float  z,
const float  w,
const bool  quaternion_data = false 
) [inline, static]

Return a 3x3 rotation matrix along the (x,y,z)-axis with an angle w.

Definition at line 14570 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::round ( const float  x,
const int  rounding_type = 0 
) [inline]

Compute image with rounded pixel values.

Parameters:
x Rounding precision.
rounding_type Roundin type, can be 0 (nearest), 1 (forward), -1(backward).

Definition at line 15151 of file CImg.h.

Referenced by cimg_library::CImg< charT >::draw_axes().

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save ( const char *const   filename,
const int  number = -1 
) const [inline]

Save the image as a file.

The used file format is defined by the file extension in the filename filename. Parameter number can be used to add a 6-digit number to the filename before saving.

Definition at line 33578 of file CImg.h.

Referenced by cimg_library::CImg< charT >::get_select_graph(), cimg_library::CImgList< charT >::save_gzip_external(), and cimg_library::CImg< charT >::save_gzip_external().

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_analyze ( const char *const   filename,
const float *const   voxsize = 0 
) const [inline]

Save the image as an ANALYZE7.5 or NIFTI file.

Definition at line 34765 of file CImg.h.

Referenced by cimg_library::CImg< charT >::save(), and cimg_library::CImg< charT >::save_medcon_external().

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_ascii ( std::FILE *const   file  )  const [inline]

Save the image as an ASCII file (ASCII Raw + simple header).

Definition at line 33708 of file CImg.h.

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_ascii ( const char *const   filename  )  const [inline]

Save the image as an ASCII file (ASCII Raw + simple header).

Definition at line 33703 of file CImg.h.

Referenced by cimg_library::CImg< charT >::save().

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_bmp ( std::FILE *const   file  )  const [inline]

Save the image as a BMP file.

Definition at line 33900 of file CImg.h.

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_bmp ( const char *const   filename  )  const [inline]

Save the image as a BMP file.

Definition at line 33895 of file CImg.h.

Referenced by cimg_library::CImg< charT >::save().

template<typename T>
const CImg<T>& cimg_library::CImg< 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 [inline]

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

Definition at line 34858 of file CImg.h.

template<typename T>
const CImg<T>& cimg_library::CImg< 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 [inline]

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

Definition at line 34849 of file CImg.h.

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_cimg ( const char *const   filename,
const bool  compress = false 
) const [inline]

Save the image as a .cimg file.

Definition at line 34837 of file CImg.h.

Referenced by cimg_library::CImgList< charT >::save(), cimg_library::CImg< charT >::save(), and cimg_library::CImg< charT >::save_cimg().

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_cpp ( std::FILE *const   file  )  const [inline]

Save the image as a CPP source file.

Definition at line 33748 of file CImg.h.

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_cpp ( const char *const   filename  )  const [inline]

Save the image as a CPP source file.

Definition at line 33743 of file CImg.h.

Referenced by cimg_library::CImg< charT >::save().

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_dlm ( std::FILE *const   file  )  const [inline]

Save the image as a DLM file.

Definition at line 33791 of file CImg.h.

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_dlm ( const char *const   filename  )  const [inline]

Save the image as a DLM file.

Definition at line 33786 of file CImg.h.

Referenced by cimg_library::CImg< charT >::save().

template<typename T>
static void cimg_library::CImg< T >::save_empty_cimg ( std::FILE *const   file,
const unsigned int  dx,
const unsigned int  dy = 1,
const unsigned int  dz = 1,
const unsigned int  dc = 1 
) [inline, static]

Save an empty .cimg file with specified dimensions.

Definition at line 34874 of file CImg.h.

template<typename T>
static void cimg_library::CImg< T >::save_empty_cimg ( const char *const   filename,
const unsigned int  dx,
const unsigned int  dy = 1,
const unsigned int  dz = 1,
const unsigned int  dc = 1 
) [inline, static]

Save an empty .cimg file with specified dimensions.

Definition at line 34867 of file CImg.h.

Referenced by cimg_library::CImg< charT >::save_empty_cimg().

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_exr ( const char *const   filename  )  const [inline]

Save the image as a EXR file.

Definition at line 34932 of file CImg.h.

Referenced by cimg_library::CImg< charT >::save().

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_ffmpeg ( const char *const   filename,
const unsigned int  first_frame = 0,
const unsigned int  last_frame = ~0U,
const unsigned int  fps = 25 
) const [inline]

Save the image as a video sequence file, using FFMPEG library.

Definition at line 35208 of file CImg.h.

Referenced by cimg_library::CImgList< charT >::save(), and cimg_library::CImg< charT >::save().

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_ffmpeg_external ( const char *const   filename,
const unsigned int  first_frame = 0,
const unsigned int  last_frame = ~0U,
const char *const   codec = "mpeg2video" 
) const [inline]

Save the image as a video sequence file, using the external tool 'ffmpeg'.

Definition at line 35322 of file CImg.h.

Referenced by cimg_library::CImg< charT >::save_ffmpeg(), and cimg_library::CImgList< charT >::save_ffmpeg().

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_graphicsmagick_external ( const char *const   filename,
const unsigned int  quality = 100 
) const [inline]

Save the image using GraphicsMagick's gm.

Function that saves the image for other file formats that are not natively handled by CImg, using the tool 'gm' from the GraphicsMagick package.
This is the case for all compressed image formats (GIF,PNG,JPG,TIF, ...). You need to install the GraphicsMagick package in order to get this function working properly (see http://www.graphicsmagick.org ).

Definition at line 35345 of file CImg.h.

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_gzip_external ( const char *const   filename  )  const [inline]

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

Definition at line 35378 of file CImg.h.

Referenced by cimg_library::CImgList< charT >::save(), and cimg_library::CImg< charT >::save().

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_imagemagick_external ( const char *const   filename,
const unsigned int  quality = 100 
) const [inline]

Save the image using ImageMagick's convert.

Function that saves the image for other file formats that are not natively handled by CImg, using the tool 'convert' from the ImageMagick package.
This is the case for all compressed image formats (GIF,PNG,JPG,TIF, ...). You need to install the ImageMagick package in order to get this function working properly (see http://www.imagemagick.org ).

Definition at line 35426 of file CImg.h.

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_inr ( std::FILE *const   file,
const float *const   voxsize = 0 
) const [inline]

Save the image as an INRIMAGE-4 file.

Definition at line 34927 of file CImg.h.

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_inr ( const char *const   filename,
const float *const   voxsize = 0 
) const [inline]

Save the image as an INRIMAGE-4 file.

Definition at line 34922 of file CImg.h.

Referenced by cimg_library::CImg< charT >::save().

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_jpeg ( std::FILE *const   file,
const unsigned int  quality = 100 
) const [inline]

Save a file in JPEG format.

Definition at line 34013 of file CImg.h.

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_jpeg ( const char *const   filename,
const unsigned int  quality = 100 
) const [inline]

Save a file in JPEG format.

Definition at line 34008 of file CImg.h.

Referenced by cimg_library::CImg< charT >::save().

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_magick ( const char *const   filename,
const unsigned int  bytes_per_pixel = 0 
) const [inline]

Save the image using built-in ImageMagick++ library.

Definition at line 34018 of file CImg.h.

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_medcon_external ( const char *const   filename  )  const [inline]

Save an image as a Dicom file (need '(X)Medcon' : http://xmedcon.sourceforge.net ).

Definition at line 35459 of file CImg.h.

Referenced by cimg_library::CImg< charT >::save().

template<typename T>
template<typename tf , typename tc >
const CImg<T>& cimg_library::CImg< T >::save_off ( std::FILE *const   file,
const CImgList< tf > &  primitives,
const CImgList< tc > &  colors 
) const [inline]

Save OFF files.

Definition at line 35316 of file CImg.h.

template<typename T>
template<typename tf , typename tc >
const CImg<T>& cimg_library::CImg< T >::save_off ( const char *const   filename,
const CImgList< tf > &  primitives,
const CImgList< tc > &  colors 
) const [inline]

Save OFF files.

Definition at line 35309 of file CImg.h.

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_pandore ( std::FILE *const   file,
const unsigned int  colorspace = 0 
) const [inline]

Save the image as a PANDORE-5 file.

Definition at line 35168 of file CImg.h.

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_pandore ( const char *const   filename,
const unsigned int  colorspace = 0 
) const [inline]

Save the image as a PANDORE-5 file.

Definition at line 35163 of file CImg.h.

Referenced by cimg_library::CImg< charT >::save().

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_pfm ( std::FILE *const   file  )  const [inline]

Save the image as a PFM file.

Definition at line 34440 of file CImg.h.

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_pfm ( const char *const   filename  )  const [inline]

Save the image as a PFM file.

Definition at line 34435 of file CImg.h.

Referenced by cimg_library::CImg< charT >::save().

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_png ( std::FILE *const   file,
const unsigned int  bytes_per_pixel = 0 
) const [inline]

Save a file in PNG format.

Definition at line 34291 of file CImg.h.

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_png ( const char *const   filename,
const unsigned int  bytes_per_pixel = 0 
) const [inline]

Save a file in PNG format.

Definition at line 34286 of file CImg.h.

Referenced by cimg_library::CImg< charT >::save().

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_pnm ( std::FILE *const   file,
const unsigned int  bytes_per_pixel = 0 
) const [inline]

Save the image as a PNM file.

Definition at line 34301 of file CImg.h.

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_pnm ( const char *const   filename,
const unsigned int  bytes_per_pixel = 0 
) const [inline]
template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_raw ( std::FILE *const   file,
const bool  multiplexed = false 
) const [inline]

Save the image as a RAW file.

Definition at line 35203 of file CImg.h.

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_raw ( const char *const   filename,
const bool  multiplexed = false 
) const [inline]

Save the image as a RAW file.

Definition at line 35198 of file CImg.h.

Referenced by cimg_library::CImg< charT >::save().

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_rgb ( std::FILE *const   file  )  const [inline]

Save the image as a RGB file.

Definition at line 34584 of file CImg.h.

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_rgb ( const char *const   filename  )  const [inline]

Save the image as a RGB file.

Definition at line 34579 of file CImg.h.

Referenced by cimg_library::CImg< charT >::save().

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_rgba ( std::FILE *const   file  )  const [inline]

Save the image as a RGBA file.

Definition at line 34660 of file CImg.h.

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_rgba ( const char *const   filename  )  const [inline]

Save the image as a RGBA file.

Definition at line 34655 of file CImg.h.

Referenced by cimg_library::CImg< charT >::save().

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_tiff ( const char *const   filename  )  const [inline]

Save a file in TIFF format.

Definition at line 34738 of file CImg.h.

Referenced by cimg_library::CImgList< charT >::save(), and cimg_library::CImg< charT >::save().

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_yuv ( std::FILE *const   file,
const bool  rgb2yuv = true 
) const [inline]

Save the image as a YUV video sequence file.

Definition at line 35240 of file CImg.h.

template<typename T>
const CImg<T>& cimg_library::CImg< T >::save_yuv ( const char *const   filename,
const bool  rgb2yuv = true 
) const [inline]

Save the image as a YUV video sequence file.

Definition at line 35234 of file CImg.h.

Referenced by cimg_library::CImgList< charT >::save(), and cimg_library::CImg< charT >::save().

template<typename T>
CImg<T>& cimg_library::CImg< T >::select ( const char *const   title,
const int  select_type = 2,
unsigned int *const   XYZ = 0,
const unsigned char *const   color = 0 
) [inline]

Simple interface to select a shape from an image.

Definition at line 29573 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::select ( CImgDisplay disp,
const int  select_type = 2,
unsigned int *const   XYZ = 0,
const unsigned char *const   color = 0 
) [inline]

Simple interface to select a shape from an image.

Parameters:
selection Array of 6 values containing the selection result
coords_type Determine shape type to select (0=point, 1=vector, 2=rectangle, 3=circle)
disp Display window used to make the selection
XYZ Initial XYZ position (for volumetric images only)
color Color of the shape selector.

Definition at line 29566 of file CImg.h.

template<typename T>
static CImg<T> cimg_library::CImg< T >::sequence ( const unsigned int  N,
const T  a0,
const T  a1 
) [inline, static]

Return a N-numbered sequence vector from a0 to a1.

Definition at line 14564 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::sequence ( const T  a0,
const T  a1 
) [inline]

Return a N-numbered sequence vector from a0 to a1.

Definition at line 13324 of file CImg.h.

Referenced by cimg_library::CImg< charT >::draw_grid(), cimg_library::CImg< charT >::get_select_graph(), and cimg_library::CImg< charT >::sequence().

template<typename T>
CImg<T>& cimg_library::CImg< T >::set_linear_atXY ( const T &  val,
const float  fx,
const float  fy = 0,
const int  z = 0,
const int  c = 0,
const bool  add = false 
) [inline]

Set a pixel value, with 2d float coordinates, using linear interpolation.

Definition at line 10820 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::set_linear_atXYZ ( const T &  val,
const float  fx,
const float  fy = 0,
const float  fz = 0,
const int  c = 0,
const bool  add = false 
) [inline]

Set a pixel value, with 3d float coordinates, using linear interpolation.

Definition at line 10760 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::set_matrix_at ( const CImg< t > &  mat,
const unsigned int  x = 0,
const unsigned int  y = 0,
const unsigned int  z = 0 
) [inline]

Set the image vec as the square matrix-valued pixel located at (x,y,z) of the current vector-valued image.

Definition at line 13204 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::set_tensor_at ( const CImg< t > &  ten,
const unsigned int  x = 0,
const unsigned int  y = 0,
const unsigned int  z = 0 
) [inline]

Set the image vec as the tensor valued pixel located at (x,y,z) of the current vector-valued image.

Definition at line 13210 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::set_vector_at ( const CImg< t > &  vec,
const unsigned int  x,
const unsigned int  y = 0,
const unsigned int  z = 0 
) [inline]

Set the image vec as the vector valued pixel located at (x,y,z) of the current vector-valued image.

Definition at line 13192 of file CImg.h.

Referenced by cimg_library::CImg< charT >::set_matrix_at().

template<typename T>
CImg<T>& cimg_library::CImg< T >::sharpen ( const float  amplitude,
const bool  sharpen_type = false,
const float  edge = 1,
const float  alpha = 0,
const float  sigma = 0 
) [inline]

Sharpen image using anisotropic shock filters or inverse diffusion.

Definition at line 20955 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::shift ( const int  deltax,
const int  deltay = 0,
const int  deltaz = 0,
const int  deltac = 0,
const int  border_condition = 0 
) [inline]

Shift the image.

Parameters:
deltax Amount of displacement along the X-axis.
deltay Amount of displacement along the Y-axis.
deltaz Amount of displacement along the Z-axis.
deltac Amount of displacement along the C-axis.
border_condition Border condition.
  • border_condition can be :
    • 0 : Zero border condition (Dirichlet).
    • 1 : Nearest neighbors (Neumann).
    • 2 : Repeat Pattern (Fourier style).

Definition at line 17792 of file CImg.h.

Referenced by cimg_library::CImg< charT >::draw_fill().

template<typename T>
CImg<T>& cimg_library::CImg< T >::shift_object3d (  )  [inline]

Shift a 3d object so that it becomes centered.

Definition at line 22258 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::shift_object3d ( const float  tx,
const float  ty = 0,
const float  tz = 0 
) [inline]

Shift a 3d object.

Definition at line 22243 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::sign (  )  [inline]

Compute the sign of each pixel value.

Definition at line 12257 of file CImg.h.

Referenced by cimg_library::CImg< charT >::sign().

template<typename T>
CImg<T>& cimg_library::CImg< T >::sin (  )  [inline]

Compute the sinus of each pixel value.

Definition at line 12277 of file CImg.h.

Referenced by cimg_library::CImg< charT >::torus3d().

template<typename T>
CImg<T>& cimg_library::CImg< T >::sinc (  )  [inline]

Compute the sinus cardinal of each pixel value.

Definition at line 12287 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::sinh (  )  [inline]

Compute the hyperbolic sine of each pixel value.

Definition at line 12317 of file CImg.h.

template<typename T>
unsigned int cimg_library::CImg< T >::size (  )  const [inline]

Return the number of image buffer elements.

example:
       CImg<> img(100,100,1,3);
       if (img.size()==100*100*3) std::fprintf(stderr,"This statement is true");

Definition at line 9935 of file CImg.h.

Referenced by cimg_library::CImgList< charT >::_save_cimg(), cimg_library::CImg< charT >::append_object3d(), cimg_library::CImg< charT >::assign(), cimg_library::CImg< charT >::at(), cimg_library::CImg< charT >::atan2(), cimg_library::CImg< charT >::back(), cimg_library::CImg< charT >::CImg(), cimg_library::CImg< charT >::contains(), cimg_library::CImg< charT >::div(), cimg_library::CImg< charT >::dot(), cimg_library::CImg< charT >::draw_axes(), cimg_library::CImg< charT >::draw_axis(), cimg_library::CImg< charT >::draw_graph(), cimg_library::CImg< charT >::draw_mandelbrot(), cimg_library::CImg< charT >::eigen(), cimg_library::CImg< charT >::end(), cimg_library::CImg< charT >::equalize(), cimg_library::CImg< charT >::fill(), cimg_library::CImg< charT >::invert_endianness(), cimg_library::CImg< charT >::is_object3d(), cimg_library::CImg< charT >::is_overlapped(), cimg_library::CImg< charT >::kth_smallest(), cimg_library::CImg< charT >::matrix(), cimg_library::CImg< charT >::max(), cimg_library::CImg< charT >::mean(), cimg_library::CImg< charT >::median(), cimg_library::CImg< charT >::min(), cimg_library::CImgList< charT >::move_to(), cimg_library::CImg< charT >::MSE(), cimg_library::CImg< charT >::mul(), cimg_library::CImg< charT >::operator%=(), cimg_library::CImg< charT >::operator&=(), cimg_library::CImg< charT >::operator+=(), cimg_library::CImg< charT >::operator-=(), cimg_library::CImg< charT >::operator<<=(), cimg_library::CImg< charT >::operator==(), cimg_library::CImg< charT >::operator>>=(), cimg_library::CImg< charT >::operator^=(), cimg_library::CImg< charT >::operator|=(), cimg_library::CImg< charT >::pow(), cimg_library::CImg< charT >::print(), cimg_library::CImg< charT >::resize(), cimg_library::CImgList< charT >::reverse_object3d(), cimg_library::CImg< charT >::save_analyze(), cimg_library::CImg< charT >::sequence(), cimg_library::CImg< charT >::set_vector_at(), cimg_library::CImg< charT >::solve_tridiagonal(), cimg_library::CImg< charT >::sort(), cimg_library::CImg< charT >::SVD(), cimg_library::CImg< charT >::unroll(), cimg_library::CImg< charT >::value_string(), cimg_library::CImg< charT >::variance_mean(), and cimg_library::CImg< charT >::variance_noise().

template<typename T>
CImg<T>& cimg_library::CImg< T >::slice ( const unsigned int  z0  )  [inline]

Get a slice.

Definition at line 19129 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::slices ( const unsigned int  z0,
const unsigned int  z1 
) [inline]

Get a set of slices.

Definition at line 19138 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::solve ( const CImg< t > &  A  )  [inline]

Solve a linear system AX=B where B=*this.

Definition at line 13464 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::solve_tridiagonal ( const CImg< t > &  a,
const CImg< t > &  b,
const CImg< t > &  c 
) [inline]

Solve a linear system AX=B where B=*this and A is a tridiagonal matrix A = [ b0,c0,0,...; a1,b1,c1,0,... ; ... ; ...,0,aN,bN ].

Definition at line 13540 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::sort ( const bool  increasing = true  )  [inline]

Sort image values.

Definition at line 13711 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::sort ( CImg< t > &  permutations,
const bool  increasing = true 
) [inline]
template<typename T>
int cimg_library::CImg< T >::spectrum (  )  const [inline]
template<typename T>
template<typename tf >
static CImg<floatT> cimg_library::CImg< T >::sphere3d ( CImgList< tf > &  primitives,
const float  radius = 50,
const unsigned int  subdivisions = 3 
) [inline, static]

Create and return a 3d sphere.

Parameters:
[out] primitives The returned list of the 3d object primitives (template type tf should be at least unsigned int).
radius The radius of the sphere (dimension along the X-axis).
subdivisions The number of recursive subdivisions from an initial icosahedron.
Returns:
The N vertices (xi,yi,zi) of the 3d object as a Nx3 CImg<float> image (0<=i<=N-1).
Sample code :
       CImgList<unsigned int> faces3d;
       const CImg<float> points3d = CImg<float>::sphere3d(faces3d,100,4);
       CImg<unsigned char>().display_object3d(points3d,faces3d);
ref_sphere3d.jpg

Definition at line 23187 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::sqr (  )  [inline]

Compute the square value of each pixel.

Definition at line 12197 of file CImg.h.

Referenced by cimg_library::CImg< charT >::normalize(), and cimg_library::CImg< charT >::sphere3d().

template<typename T>
CImg<T>& cimg_library::CImg< T >::sqrt (  )  [inline]
template<typename T>
CImg<T>& cimg_library::CImg< T >::stats ( const unsigned int  variance_method = 1  )  [inline]

Compute a statistics vector (min,max,mean,variance,xmin,ymin,zmin,cmin,xmax,ymax,zmax,cmax).

Definition at line 13036 of file CImg.h.

template<typename T>
static CImg<floatT> cimg_library::CImg< T >::streamline ( const char *const   expression,
const float  x,
const float  y,
const float  z,
const float  L = 256,
const float  dl = 0.1f,
const unsigned int  interpolation_type = 2,
const bool  is_backward_tracking = true,
const bool  is_oriented_only = false,
const float  x0 = 0,
const float  y0 = 0,
const float  z0 = 0,
const float  x1 = 0,
const float  y1 = 0,
const float  z1 = 0 
) [inline, static]

Return stream line of a vector field.

Definition at line 14203 of file CImg.h.

template<typename T>
template<typename tfunc >
static CImg<floatT> cimg_library::CImg< T >::streamline ( const tfunc &  func,
const float  x,
const float  y,
const float  z,
const float  L = 256,
const float  dl = 0.1f,
const unsigned int  interpolation_type = 2,
const bool  is_backward_tracking = false,
const bool  is_oriented_only = false,
const float  x0 = 0,
const float  y0 = 0,
const float  z0 = 0,
const float  x1 = 0,
const float  y1 = 0,
const float  z1 = 0 
) [inline, static]

Return stream line of a 3d vector field.

Parameters:
interpolation_type Type of interpolation (can be 0=nearest int, 1=linear, 2=2nd-order RK, 3=4th-order RK.

Definition at line 14093 of file CImg.h.

Referenced by cimg_library::CImg< charT >::get_streamline(), and cimg_library::CImg< charT >::streamline().

template<typename T>
CImg<T>& cimg_library::CImg< T >::structure_tensors ( const unsigned int  scheme = 1  )  [inline]

Compute the structure tensor field of an image.

Definition at line 21271 of file CImg.h.

template<typename T>
Tdouble cimg_library::CImg< T >::sum (  )  const [inline]

Return the sum of all the pixel values in an image.

Definition at line 12877 of file CImg.h.

template<typename T>
template<typename t >
const CImg<T>& cimg_library::CImg< T >::SVD ( CImg< t > &  U,
CImg< t > &  S,
CImg< t > &  V,
const bool  sorting = true,
const unsigned int  max_iteration = 40,
const float  lambda = 0 
) const [inline]

Compute the SVD of a general matrix.

Definition at line 13770 of file CImg.h.

Referenced by cimg_library::CImg< charT >::invert(), and cimg_library::CImg< charT >::symmetric_eigen().

template<typename T>
CImg<T>& cimg_library::CImg< T >::swap ( CImg< T > &  img  )  [inline]
template<typename T>
template<typename t >
const CImg<T>& cimg_library::CImg< T >::symmetric_eigen ( CImg< t > &  val,
CImg< t > &  vec 
) const [inline]

Compute the eigenvalues and eigenvectors of a symmetric matrix.

Definition at line 13625 of file CImg.h.

Referenced by cimg_library::CImg< charT >::ellipsoid3d().

template<typename T>
CImg<T>& cimg_library::CImg< T >::tan (  )  [inline]

Compute the tangent of each pixel.

Definition at line 12297 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::tanh (  )  [inline]

Compute the hyperbolic tangent of each pixel value.

Definition at line 12327 of file CImg.h.

template<typename T>
static CImg<T> cimg_library::CImg< T >::tensor ( const T &  a1,
const T &  a2,
const T &  a3,
const T &  a4,
const T &  a5,
const T &  a6 
) [inline, static]

Return a 3x3 symmetric matrix with specified coefficients.

Definition at line 14527 of file CImg.h.

template<typename T>
static CImg<T> cimg_library::CImg< T >::tensor ( const T &  a1,
const T &  a2,
const T &  a3 
) [inline, static]

Return a 2x2 symmetric matrix tensor with specified coefficients.

Definition at line 14522 of file CImg.h.

template<typename T>
static CImg<T> cimg_library::CImg< T >::tensor ( const T &  a1  )  [inline, static]

Return a 1x1 symmetric matrix with specified coefficients.

Definition at line 14517 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::tensor (  )  [inline]

Realign pixel values of the instance image as a symmetric tensor.

Definition at line 13270 of file CImg.h.

Referenced by cimg_library::CImg< charT >::draw_gaussian(), and cimg_library::CImg< charT >::get_tensor_at().

template<typename T>
CImg<T>& cimg_library::CImg< T >::threshold ( const T  value,
const bool  soft_threshold = false,
const bool  strict_threshold = false 
) [inline]

Threshold values of the instance image.

Parameters:
value Threshold value
soft_threshold Tells if soft thresholding must be applied (instead of hard one).
strict_threshold Tells if threshold value is strict.
Returns:
A reference to the modified instance image. Resulting pixel values are either equal to 0 or 1.
Note:
  • Function CImg<T>::get_threshold() is also defined. It returns a non-shared modified copy of the instance image.
Sample code :
       const CImg<float> img("reference.jpg"), res = img.get_threshold(128);
       (img,res.normalize(0,255)).display();
ref_threshold.jpg

Definition at line 15428 of file CImg.h.

template<typename T>
template<typename tf >
static CImg<floatT> cimg_library::CImg< T >::torus3d ( CImgList< tf > &  primitives,
const float  radius1 = 100,
const float  radius2 = 30,
const unsigned int  subdivisions1 = 24,
const unsigned int  subdivisions2 = 12 
) [inline, static]

Create and return a 3d torus.

Parameters:
[out] primitives The returned list of the 3d object primitives (template type tf should be at least unsigned int).
radius1 The large radius.
radius2 The small radius.
subdivisions1 The number of angular subdivisions for the large radius.
subdivisions2 The number of angular subdivisions for the small radius.
Returns:
The N vertices (xi,yi,zi) of the 3d object as a Nx3 CImg<float> image (0<=i<=N-1).
Sample code :
       CImgList<unsigned int> faces3d;
       const CImg<float> points3d = CImg<float>::torus3d(faces3d,20,4);
       CImg<unsigned char>().display_object3d(points3d,faces3d);
ref_torus3d.jpg

Definition at line 23105 of file CImg.h.

template<typename T>
Tdouble cimg_library::CImg< T >::trace (  )  const [inline]

Return the trace of the image, viewed as a matrix.

Definition at line 13101 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::transpose (  )  [inline]

Transpose the current matrix.

Definition at line 13340 of file CImg.h.

Referenced by cimg_library::CImg< charT >::ellipsoid3d().

template<typename T>
CImg<T>& cimg_library::CImg< T >::unroll ( const char  axis  )  [inline]

Unroll all images values into specified axis.

Definition at line 18175 of file CImg.h.

Referenced by cimg_library::CImg< charT >::vector().

template<typename T>
CImg<charT> cimg_library::CImg< T >::value_string ( const char  separator = ',',
const unsigned int  max_size = 0 
) const [inline]

Return a C-string containing the values of the instance image.

Definition at line 10854 of file CImg.h.

Referenced by cimg_library::CImgList< charT >::value_string().

template<typename T>
Tdouble cimg_library::CImg< T >::variance ( const unsigned int  variance_method = 1  )  const [inline]

Return the variance of the image.

Parameters:
variance_method Determines how to calculate the variance

0 Second moment: $ v = 1/N \sum\limits_{k=1}^{N} (x_k - \bar x)^2 = 1/N \left( \sum\limits_{k=1}^N x_k^2 - \left( \sum\limits_{k=1}^N x_k \right)^2 / N \right) $ with $ \bar x = 1/N \sum\limits_{k=1}^N x_k $
1 Best unbiased estimator: $ v = \frac{1}{N-1} \sum\limits_{k=1}^{N} (x_k - \bar x)^2 $
2 Least median of squares
3 Least trimmed of squares

Definition at line 12915 of file CImg.h.

Referenced by cimg_library::CImg< charT >::variance_mean(), and cimg_library::CImg< charT >::variance_noise().

template<typename T>
template<typename t >
Tdouble cimg_library::CImg< T >::variance_mean ( const unsigned int  variance_method,
t &  mean 
) const [inline]

Return the variance and the mean of the image.

Definition at line 12922 of file CImg.h.

Referenced by cimg_library::CImg< charT >::variance().

template<typename T>
Tdouble cimg_library::CImg< T >::variance_noise ( const unsigned int  variance_method = 1  )  const [inline]

Estimate noise variance of the instance image.

Definition at line 12970 of file CImg.h.

template<typename T>
static CImg<T> cimg_library::CImg< T >::vector ( const T &  a0,
const T &  a1,
const T &  a2,
const T &  a3,
const T &  a4,
const T &  a5,
const T &  a6,
const T &  a7,
const T &  a8,
const T &  a9,
const T &  a10,
const T &  a11,
const T &  a12,
const T &  a13,
const T &  a14,
const T &  a15 
) [inline, static]

Return a vector with specified coefficients.

Definition at line 14451 of file CImg.h.

template<typename T>
static CImg<T> cimg_library::CImg< T >::vector ( const T &  a0,
const T &  a1,
const T &  a2,
const T &  a3,
const T &  a4,
const T &  a5,
const T &  a6,
const T &  a7,
const T &  a8,
const T &  a9,
const T &  a10,
const T &  a11,
const T &  a12,
const T &  a13,
const T &  a14 
) [inline, static]

Return a vector with specified coefficients.

Definition at line 14438 of file CImg.h.

template<typename T>
static CImg<T> cimg_library::CImg< T >::vector ( const T &  a0,
const T &  a1,
const T &  a2,
const T &  a3,
const T &  a4,
const T &  a5,
const T &  a6,
const T &  a7,
const T &  a8,
const T &  a9,
const T &  a10,
const T &  a11,
const T &  a12,
const T &  a13 
) [inline, static]

Return a vector with specified coefficients.

Definition at line 14425 of file CImg.h.

template<typename T>
static CImg<T> cimg_library::CImg< T >::vector ( const T &  a0,
const T &  a1,
const T &  a2,
const T &  a3,
const T &  a4,
const T &  a5,
const T &  a6,
const T &  a7,
const T &  a8,
const T &  a9,
const T &  a10,
const T &  a11,
const T &  a12 
) [inline, static]

Return a vector with specified coefficients.

Definition at line 14412 of file CImg.h.

template<typename T>
static CImg<T> cimg_library::CImg< T >::vector ( const T &  a0,
const T &  a1,
const T &  a2,
const T &  a3,
const T &  a4,
const T &  a5,
const T &  a6,
const T &  a7,
const T &  a8,
const T &  a9,
const T &  a10,
const T &  a11 
) [inline, static]

Return a vector with specified coefficients.

Definition at line 14401 of file CImg.h.

template<typename T>
static CImg<T> cimg_library::CImg< T >::vector ( const T &  a0,
const T &  a1,
const T &  a2,
const T &  a3,
const T &  a4,
const T &  a5,
const T &  a6,
const T &  a7,
const T &  a8,
const T &  a9,
const T &  a10 
) [inline, static]

Return a vector with specified coefficients.

Definition at line 14390 of file CImg.h.

template<typename T>
static CImg<T> cimg_library::CImg< T >::vector ( const T &  a0,
const T &  a1,
const T &  a2,
const T &  a3,
const T &  a4,
const T &  a5,
const T &  a6,
const T &  a7,
const T &  a8,
const T &  a9 
) [inline, static]

Return a vector with specified coefficients.

Definition at line 14379 of file CImg.h.

template<typename T>
static CImg<T> cimg_library::CImg< T >::vector ( const T &  a0,
const T &  a1,
const T &  a2,
const T &  a3,
const T &  a4,
const T &  a5,
const T &  a6,
const T &  a7,
const T &  a8 
) [inline, static]

Return a vector with specified coefficients.

Definition at line 14368 of file CImg.h.

template<typename T>
static CImg<T> cimg_library::CImg< T >::vector ( const T &  a0,
const T &  a1,
const T &  a2,
const T &  a3,
const T &  a4,
const T &  a5,
const T &  a6,
const T &  a7 
) [inline, static]

Return a vector with specified coefficients.

Definition at line 14359 of file CImg.h.

template<typename T>
static CImg<T> cimg_library::CImg< T >::vector ( const T &  a0,
const T &  a1,
const T &  a2,
const T &  a3,
const T &  a4,
const T &  a5,
const T &  a6 
) [inline, static]

Return a vector with specified coefficients.

Definition at line 14350 of file CImg.h.

template<typename T>
static CImg<T> cimg_library::CImg< T >::vector ( const T &  a0,
const T &  a1,
const T &  a2,
const T &  a3,
const T &  a4,
const T &  a5 
) [inline, static]

Return a vector with specified coefficients.

Definition at line 14343 of file CImg.h.

template<typename T>
static CImg<T> cimg_library::CImg< T >::vector ( const T &  a0,
const T &  a1,
const T &  a2,
const T &  a3,
const T &  a4 
) [inline, static]

Return a vector with specified coefficients.

Definition at line 14336 of file CImg.h.

template<typename T>
static CImg<T> cimg_library::CImg< T >::vector ( const T &  a0,
const T &  a1,
const T &  a2,
const T &  a3 
) [inline, static]

Return a vector with specified coefficients.

Definition at line 14329 of file CImg.h.

template<typename T>
static CImg<T> cimg_library::CImg< T >::vector ( const T &  a0,
const T &  a1,
const T &  a2 
) [inline, static]

Return a vector with specified coefficients.

Definition at line 14322 of file CImg.h.

template<typename T>
static CImg<T> cimg_library::CImg< T >::vector ( const T &  a0,
const T &  a1 
) [inline, static]

Return a vector with specified coefficients.

Definition at line 14315 of file CImg.h.

template<typename T>
static CImg<T> cimg_library::CImg< T >::vector ( const T &  a0  )  [inline, static]

Return a vector with specified coefficients.

Definition at line 14309 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::vector (  )  [inline]
template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::warp ( const CImg< t > &  warp,
const bool  relative = false,
const bool  interpolation = true,
const unsigned int  border_conditions = 0 
) [inline]

Warp an image.

Definition at line 18415 of file CImg.h.

template<typename T>
template<typename t >
CImg<T>& cimg_library::CImg< T >::watershed ( const CImg< t > &  priority,
const bool  fill_lines = true 
) [inline]

Compute the watershed transform, from an instance image of non-zero labels.

Definition at line 20006 of file CImg.h.

template<typename T>
int cimg_library::CImg< T >::width (  )  const [inline]
template<typename T>
CImg<T>& cimg_library::CImg< T >::xyYtoRGB (  )  [inline]

Convert a (x,y,Y) image to a (R,G,B) one.

Definition at line 16657 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::xyYtoXYZ (  )  [inline]

Convert (x,y,Y) pixels of a color image into the (X,Y,Z)_709 color space.

Definition at line 16605 of file CImg.h.

Referenced by cimg_library::CImg< charT >::xyYtoRGB().

template<typename T>
CImg<T>& cimg_library::CImg< T >::XYZtoLab (  )  [inline]

Convert (X,Y,Z)_709 pixels of a color image into the (L*,a*,b*) color space.

Definition at line 16508 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::XYZtoRGB (  )  [inline]

Convert (X,Y,Z)_709 pixels of a color image into the (R,G,B) color space.

Definition at line 16481 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::XYZtoxyY (  )  [inline]

Convert (X,Y,Z)_709 pixels of a color image into the (x,y,Y) color space.

Definition at line 16579 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::YCbCrtoRGB (  )  [inline]

Convert color pixels from (R,G,B) to (Y,Cb,Cr).

Definition at line 16263 of file CImg.h.

template<typename T>
CImg<T>& cimg_library::CImg< T >::YUVtoRGB (  )  [inline]

Convert color pixels from (Y,U,V) to (R,G,B).

Definition at line 16315 of file CImg.h.


Member Data Documentation

template<typename T>
T* cimg_library::CImg< T >::_data

Pointer to the first pixel of the pixel buffer.

Definition at line 8449 of file CImg.h.

Referenced by cimg_library::CImgList< charT >::_save_cimg(), cimg_library::CImg< charT >::append_object3d(), cimg_library::CImg< charT >::assign(), cimg_library::CImg< charT >::atan2(), cimg_library::CImg< charT >::back(), cimg_library::CImg< charT >::begin(), cimg_library::CImg< charT >::CImg(), cimg_library::CImg< charT >::contains(), cimg_library::CImg< charT >::cross(), cimg_library::CImg< charT >::data(), cimg_library::CImg< charT >::det(), cimg_library::cimg::dialog(), cimg_library::CImg< charT >::div(), cimg_library::CImg< charT >::dot(), cimg_library::CImg< charT >::draw_axes(), cimg_library::CImg< charT >::draw_gaussian(), cimg_library::CImg< charT >::draw_graph(), cimg_library::CImg< charT >::draw_image(), cimg_library::CImg< charT >::draw_line(), cimg_library::CImg< charT >::draw_mandelbrot(), cimg_library::CImg< charT >::draw_quiver(), cimg_library::CImg< charT >::draw_spline(), cimg_library::CImg< charT >::draw_triangle(), cimg_library::CImg< charT >::end(), cimg_library::CImg< charT >::FFT(), cimg_library::CImg< charT >::fill(), cimg_library::CImg< charT >::front(), cimg_library::CImg< charT >::get_elevation3d(), cimg_library::CImg< charT >::get_matrix_at(), cimg_library::CImg< charT >::get_shared(), cimg_library::CImg< charT >::get_vector_at(), cimg_library::CImg< charT >::invert(), cimg_library::CImg< charT >::invert_endianness(), cimg_library::CImg< charT >::is_CImg3d(), cimg_library::CImg< charT >::is_empty(), cimg_library::CImg< charT >::is_overlapped(), cimg_library::CImg< charT >::matrix(), cimg_library::CImg< charT >::max(), cimg_library::CImg< charT >::max_min(), cimg_library::CImg< charT >::min(), cimg_library::CImg< charT >::min_max(), cimg_library::CImg< charT >::mirror(), cimg_library::CImg< charT >::MSE(), cimg_library::CImg< charT >::mul(), cimg_library::CImg< charT >::normalize(), cimg_library::CImg< uintT >::operator const uintT *(), cimg_library::CImg< charT >::operator%=(), cimg_library::CImg< charT >::operator&=(), cimg_library::CImg< charT >::operator()(), cimg_library::CImg< charT >::operator*(), cimg_library::CImg< charT >::operator*=(), cimg_library::CImg< charT >::operator+=(), cimg_library::CImg< charT >::operator-=(), cimg_library::CImg< charT >::operator/=(), cimg_library::CImg< charT >::operator<<=(), cimg_library::CImg< charT >::operator==(), cimg_library::CImg< charT >::operator>>=(), cimg_library::CImg< charT >::operator^=(), cimg_library::CImg< charT >::operator|=(), cimg_library::CImg< charT >::pow(), cimg_library::CImg< charT >::sequence(), cimg_library::CImg< charT >::set_vector_at(), cimg_library::CImg< charT >::shift(), cimg_library::CImg< charT >::solve_tridiagonal(), cimg_library::CImg< charT >::SVD(), cimg_library::CImg< charT >::swap(), cimg_library::CImg< charT >::symmetric_eigen(), cimg_library::CImg< charT >::value_string(), cimg_library::CImg< charT >::variance_mean(), cimg_library::CImg< charT >::variance_noise(), cimg_library::CImg< charT >::vector(), and cimg_library::CImg< charT >::~CImg().

template<typename T>
unsigned int cimg_library::CImg< T >::_depth

Variable representing the depth of the instance image (i.e. dimensions along the Z-axis).

Remarks:
  • Prefer using the function CImg<T>::depth() to get information about the depth of an image.
  • Use function CImg<T>::resize() to set a new depth for an image. Setting directly the variable depth would probably result in a library crash.
  • Classical 2d images have depth defined to 1.
  • Empty images have depth defined to 0.

Definition at line 8432 of file CImg.h.

Referenced by cimg_library::CImg< charT >::_cubic_atXYZ(), cimg_library::CImgList< charT >::_save_cimg(), cimg_library::CImg< charT >::append_object3d(), cimg_library::CImg< charT >::assign(), cimg_library::CImg< charT >::CImg(), cimg_library::CImg< charT >::contains(), cimg_library::CImg< charT >::cross(), cimg_library::CImg< charT >::data(), cimg_library::CImg< charT >::depth(), cimg_library::CImg< charT >::det(), cimg_library::CImg< charT >::div(), cimg_library::CImg< charT >::draw_gaussian(), cimg_library::CImg< charT >::draw_image(), cimg_library::CImg< charT >::draw_line(), cimg_library::CImg< charT >::draw_mandelbrot(), cimg_library::CImg< charT >::draw_quiver(), cimg_library::CImg< charT >::draw_spline(), cimg_library::CImg< charT >::draw_triangle(), cimg_library::CImg< charT >::eigen(), cimg_library::CImg< charT >::FFT(), cimg_library::CImg< charT >::get_elevation3d(), cimg_library::CImg< charT >::get_matrix_at(), cimg_library::CImg< charT >::get_shared(), cimg_library::CImg< charT >::get_streamline(), cimg_library::CImg< charT >::get_tensor_at(), cimg_library::CImg< charT >::get_vector_at(), cimg_library::CImg< charT >::invert(), cimg_library::CImg< charT >::is_CImg3d(), cimg_library::CImg< charT >::is_empty(), cimg_library::CImg< charT >::is_object3d(), cimg_library::CImg< charT >::is_sameZ(), cimg_library::CImg< charT >::max(), cimg_library::CImg< charT >::min(), cimg_library::CImg< charT >::MSE(), cimg_library::CImg< charT >::mul(), cimg_library::CImg< charT >::offset(), cimg_library::CImg< charT >::operator%=(), cimg_library::CImg< charT >::operator&=(), cimg_library::CImg< charT >::operator()(), cimg_library::CImg< charT >::operator*(), cimg_library::CImg< charT >::operator*=(), cimg_library::CImg< charT >::operator+=(), cimg_library::CImg< charT >::operator-(), cimg_library::CImg< charT >::operator-=(), cimg_library::CImg< charT >::operator/=(), cimg_library::CImg< charT >::operator<<=(), cimg_library::CImg< charT >::operator>>=(), cimg_library::CImg< charT >::operator^=(), cimg_library::CImg< charT >::operator|=(), cimg_library::CImg< charT >::operator~(), cimg_library::CImg< charT >::pow(), cimg_library::CImg< charT >::resize(), cimg_library::CImg< charT >::set_tensor_at(), cimg_library::CImg< charT >::set_vector_at(), cimg_library::CImg< charT >::size(), cimg_library::CImg< charT >::solve(), cimg_library::CImg< charT >::solve_tridiagonal(), cimg_library::CImg< charT >::swap(), cimg_library::CImg< charT >::symmetric_eigen(), and cimg_library::CImg< charT >::variance_noise().

template<typename T>
unsigned int cimg_library::CImg< T >::_height

Variable representing the height of the instance image (i.e. dimensions along the Y-axis).

Remarks:
  • Prefer using the function CImg<T>::height() to get information about the height of an image.
  • Use function CImg<T>::resize() to set a new height for an image. Setting directly the variable height would probably result in a library crash.
  • 1d signals have height defined to 1.
  • Empty images have height defined to 0.

Definition at line 8421 of file CImg.h.

Referenced by cimg_library::CImg< charT >::_cubic_atXY(), cimg_library::CImg< charT >::_cubic_atXYZ(), cimg_library::CImgList< charT >::_save_cimg(), cimg_library::CImg< charT >::append_object3d(), cimg_library::CImg< charT >::assign(), cimg_library::CImgDisplay::assign(), cimg_library::CImg< charT >::CImg(), cimg_library::CImg< charT >::contains(), cimg_library::CImg< charT >::cross(), cimg_library::CImg< charT >::data(), cimg_library::CImg< charT >::det(), cimg_library::cimg::dialog(), cimg_library::CImg< charT >::div(), cimg_library::CImg< charT >::draw_gaussian(), cimg_library::CImg< charT >::draw_image(), cimg_library::CImg< charT >::draw_line(), cimg_library::CImg< charT >::draw_mandelbrot(), cimg_library::CImg< charT >::draw_polygon(), cimg_library::CImg< charT >::draw_quiver(), cimg_library::CImg< charT >::draw_spline(), cimg_library::CImg< charT >::draw_text(), cimg_library::CImg< charT >::draw_triangle(), cimg_library::CImg< charT >::eigen(), cimg_library::CImg< charT >::FFT(), cimg_library::CImg< charT >::get_elevation3d(), cimg_library::CImg< charT >::get_matrix_at(), cimg_library::CImg< charT >::get_shared(), cimg_library::CImg< charT >::get_streamline(), cimg_library::CImg< charT >::get_tensor_at(), cimg_library::CImg< charT >::get_vector_at(), cimg_library::CImg< charT >::height(), cimg_library::CImg< charT >::identity_matrix(), cimg_library::CImg< charT >::invert(), cimg_library::CImg< charT >::is_CImg3d(), cimg_library::CImg< charT >::is_empty(), cimg_library::CImg< charT >::is_object3d(), cimg_library::CImg< charT >::is_sameY(), cimg_library::CImg< charT >::load_tiff(), cimg_library::CImg< charT >::matrix(), cimg_library::CImg< charT >::max(), cimg_library::CImg< charT >::min(), cimg_library::CImg< charT >::MSE(), cimg_library::CImg< charT >::mul(), cimg_library::CImg< charT >::offset(), cimg_library::CImg< charT >::operator%=(), cimg_library::CImg< charT >::operator&=(), cimg_library::CImg< charT >::operator()(), cimg_library::CImg< charT >::operator*(), cimg_library::CImg< charT >::operator*=(), cimg_library::CImg< charT >::operator+=(), cimg_library::CImg< charT >::operator-(), cimg_library::CImg< charT >::operator-=(), cimg_library::CImg< charT >::operator/=(), cimg_library::CImg< charT >::operator<<=(), cimg_library::CImg< charT >::operator>>=(), cimg_library::CImg< charT >::operator^=(), cimg_library::CImg< charT >::operator|=(), cimg_library::CImg< charT >::operator~(), cimg_library::CImg< charT >::pow(), cimg_library::CImg< charT >::resize(), cimg_library::CImgDisplay::resize(), cimg_library::CImg< charT >::set_tensor_at(), cimg_library::CImg< charT >::set_vector_at(), cimg_library::CImg< charT >::size(), cimg_library::CImg< charT >::solve(), cimg_library::CImg< charT >::solve_tridiagonal(), cimg_library::CImg< charT >::SVD(), cimg_library::CImg< charT >::swap(), cimg_library::CImg< charT >::symmetric_eigen(), and cimg_library::CImg< charT >::transpose().

template<typename T>
bool cimg_library::CImg< T >::_is_shared

Variable telling if pixel buffer of the instance image is shared with another one.

Definition at line 8446 of file CImg.h.

Referenced by cimg_library::CImg< charT >::assign(), cimg_library::CImg< charT >::is_shared(), cimg_library::CImg< charT >::print(), cimg_library::CImg< charT >::swap(), and cimg_library::CImg< charT >::~CImg().

template<typename T>
unsigned int cimg_library::CImg< T >::_spectrum

Variable representing the number of channels of the instance image (i.e. dimensions along the C-axis).

Remarks:
  • Prefer using the function CImg<T>::spectrum() to get information about the depth of an image.
  • Use function CImg<T>::resize() to set a new vector dimension for an image. Setting directly the variable spectrum would probably result in a library crash.
  • Scalar-valued images (one value per pixel) have spectrum defined to 1.
  • Empty images have depth defined to 0.

Definition at line 8443 of file CImg.h.

Referenced by cimg_library::CImgList< charT >::_save_cimg(), cimg_library::CImg< charT >::append_object3d(), cimg_library::CImg< charT >::assign(), cimg_library::CImg< charT >::CImg(), cimg_library::CImg< charT >::contains(), cimg_library::CImg< charT >::cross(), cimg_library::CImg< charT >::det(), cimg_library::CImg< charT >::div(), cimg_library::CImg< charT >::draw_gaussian(), cimg_library::CImg< charT >::draw_image(), cimg_library::CImg< charT >::draw_line(), cimg_library::CImg< charT >::draw_mandelbrot(), cimg_library::CImg< charT >::draw_quiver(), cimg_library::CImg< charT >::draw_spline(), cimg_library::CImg< charT >::draw_triangle(), cimg_library::CImg< charT >::eigen(), cimg_library::CImg< charT >::FFT(), cimg_library::CImg< charT >::fillC(), cimg_library::CImg< charT >::fillX(), cimg_library::CImg< charT >::fillY(), cimg_library::CImg< charT >::fillZ(), cimg_library::CImg< charT >::get_elevation3d(), cimg_library::CImg< charT >::get_matrix_at(), cimg_library::CImg< charT >::get_shared(), cimg_library::CImg< charT >::get_streamline(), cimg_library::CImg< charT >::get_tensor_at(), cimg_library::CImg< charT >::get_vector_at(), cimg_library::CImg< charT >::invert(), cimg_library::CImg< charT >::is_CImg3d(), cimg_library::CImg< charT >::is_empty(), cimg_library::CImg< charT >::is_object3d(), cimg_library::CImg< charT >::is_sameC(), cimg_library::CImg< charT >::load_tiff(), cimg_library::CImg< charT >::max(), cimg_library::CImg< charT >::min(), cimg_library::CImg< charT >::MSE(), cimg_library::CImg< charT >::mul(), cimg_library::CImg< charT >::norm(), cimg_library::CImg< charT >::operator%=(), cimg_library::CImg< charT >::operator&=(), cimg_library::CImg< charT >::operator*(), cimg_library::CImg< charT >::operator*=(), cimg_library::CImg< charT >::operator+=(), cimg_library::CImg< charT >::operator-(), cimg_library::CImg< charT >::operator-=(), cimg_library::CImg< charT >::operator/=(), cimg_library::CImg< charT >::operator<<=(), cimg_library::CImg< charT >::operator>>=(), cimg_library::CImg< charT >::operator^=(), cimg_library::CImg< charT >::operator|=(), cimg_library::CImg< charT >::operator~(), cimg_library::CImg< charT >::pow(), cimg_library::CImg< charT >::resize(), cimg_library::CImg< charT >::set_vector_at(), cimg_library::CImg< charT >::size(), cimg_library::CImg< charT >::solve(), cimg_library::CImg< charT >::solve_tridiagonal(), cimg_library::CImg< charT >::spectrum(), cimg_library::CImg< charT >::swap(), and cimg_library::CImg< charT >::symmetric_eigen().

template<typename T>
unsigned int cimg_library::CImg< T >::_width

Variable representing the width of the instance image (i.e. dimensions along the X-axis).

Remarks:
  • Prefer using the function CImg<T>::width() to get information about the width of an image.
  • Use function CImg<T>::resize() to set a new width for an image. Setting directly the variable width would probably result in a library crash.
  • Empty images have width defined to 0.

Definition at line 8410 of file CImg.h.

Referenced by cimg_library::CImg< charT >::_cubic_atX(), cimg_library::CImg< charT >::_cubic_atXY(), cimg_library::CImg< charT >::_cubic_atXYZ(), cimg_library::CImgList< charT >::_save_cimg(), cimg_library::CImg< charT >::append_object3d(), cimg_library::CImg< charT >::assign(), cimg_library::CImgDisplay::assign(), cimg_library::CImg< charT >::CImg(), cimg_library::CImg< charT >::cone3d(), cimg_library::CImg< charT >::contains(), cimg_library::CImg< charT >::cross(), cimg_library::CImg< charT >::cylinder3d(), cimg_library::CImg< charT >::data(), cimg_library::CImg< charT >::det(), cimg_library::cimg::dialog(), cimg_library::CImg< charT >::div(), cimg_library::CImg< charT >::draw_gaussian(), cimg_library::CImg< charT >::draw_graph(), cimg_library::CImg< charT >::draw_image(), cimg_library::CImg< charT >::draw_line(), cimg_library::CImg< charT >::draw_mandelbrot(), cimg_library::CImg< charT >::draw_polygon(), cimg_library::CImg< charT >::draw_quiver(), cimg_library::CImg< charT >::draw_spline(), cimg_library::CImg< charT >::draw_text(), cimg_library::CImg< charT >::draw_triangle(), cimg_library::CImg< charT >::eigen(), cimg_library::CImg< charT >::FFT(), cimg_library::CImg< charT >::get_elevation3d(), cimg_library::CImg< charT >::get_matrix_at(), cimg_library::CImg< charT >::get_shared(), cimg_library::CImg< charT >::get_streamline(), cimg_library::CImg< charT >::get_tensor_at(), cimg_library::CImg< charT >::get_vector_at(), cimg_library::CImg< charT >::identity_matrix(), cimg_library::CImg< charT >::invert(), cimg_library::CImg< charT >::is_CImg3d(), cimg_library::CImg< charT >::is_empty(), cimg_library::CImg< charT >::is_object3d(), cimg_library::CImg< charT >::is_sameX(), cimg_library::CImg< charT >::load_tiff(), cimg_library::CImg< charT >::matrix(), cimg_library::CImg< charT >::max(), cimg_library::CImg< charT >::min(), cimg_library::CImg< charT >::MSE(), cimg_library::CImg< charT >::mul(), cimg_library::CImg< charT >::offset(), cimg_library::CImg< charT >::operator%=(), cimg_library::CImg< charT >::operator&=(), cimg_library::CImg< charT >::operator()(), cimg_library::CImg< charT >::operator*(), cimg_library::CImg< charT >::operator*=(), cimg_library::CImg< charT >::operator+=(), cimg_library::CImg< charT >::operator-(), cimg_library::CImg< charT >::operator-=(), cimg_library::CImg< charT >::operator/=(), cimg_library::CImg< charT >::operator<<=(), cimg_library::CImg< charT >::operator>>=(), cimg_library::CImg< charT >::operator^=(), cimg_library::CImg< charT >::operator|=(), cimg_library::CImg< charT >::operator~(), cimg_library::CImg< charT >::pow(), cimg_library::CImg< charT >::resize(), cimg_library::CImgDisplay::resize(), cimg_library::CImg< charT >::set_tensor_at(), cimg_library::CImg< charT >::set_vector_at(), cimg_library::CImg< charT >::size(), cimg_library::CImg< charT >::solve(), cimg_library::CImg< charT >::solve_tridiagonal(), cimg_library::CImg< charT >::SVD(), cimg_library::CImg< charT >::swap(), cimg_library::CImg< charT >::symmetric_eigen(), cimg_library::CImg< charT >::transpose(), and cimg_library::CImg< charT >::width().


The documentation for this struct was generated from the following file:
Generated on Sun May 8 08:44:25 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3