⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cimg.3h

📁 image processing for transmission micrscopy. Using ray casting and visual effect for dectecttion and
💻 3H
📖 第 1 页 / 共 5 页
字号:
              I##cp=I##np, I##cc=I##nc, I##cn=I##nn,                    \              _p##x=x++,_n##x++ )#define cimg_map4x4(img,x,y,z,v,I) cimg_4mapY(img,y)                    \       for (int _a##x=2, _n##x=1, x=((int)(I##cp=I##pp=(img)(0,_p##y,z,v), \                                           I##cc=I##pc=(img)(0,    y,z,v), \                                           I##cn=I##pn=(img)(0,_n##y,z,v), \                                           I##ca=I##pa=(img)(0,_a##y,z,v), \                                           I##np=(img)(_n##x,_p##y,z,v), \                                           I##nc=(img)(_n##x,    y,z,v), \                                           I##nn=(img)(_n##x,_n##y,z,v), \                                           I##na=(img)(_n##x,_a##y,z,v)),0), \              _p##x=0;                                                  \            (_a##x<(int)((img).width) && (                              \                                          I##ap=(img)(_a##x,_p##y,z,v), \                                          I##ac=(img)(_a##x,    y,z,v), \                                          I##an=(img)(_a##x,_n##y,z,v), \                                          I##aa=(img)(_a##x,_a##y,z,v), \                                          1)) || _n##x==--_a##x || x==(_a##x=--_n##x); \            I##pp=I##cp, I##pc=I##cc, I##pn=I##cn, I##pa=I##ca,         \              I##cp=I##np, I##cc=I##nc, I##cn=I##nn, I##ca=I##na,       \              I##np=I##ap, I##nc=I##ac, I##nn=I##an, I##na=I##aa,       \              _p##x=x++, _n##x++, _a##x++ )#define cimg_map5x5(img,x,y,z,v,I) cimg_5mapY(img,y)                    \       for (int _a##x=2, _n##x=1, _b##x=(int)(I##cb=I##pb=I##bb=(img)(0,_b##y,z,v), \                                              I##cp=I##pp=I##bp=(img)(0,_p##y,z,v), \                                              I##cc=I##pc=I##bc=(img)(0,    y,z,v), \                                              I##cn=I##pn=I##bn=(img)(0,_n##y,z,v), \                                              I##ca=I##pa=I##ba=(img)(0,_a##y,z,v), \                                              I##nb=(img)(_n##x,_b##y,z,v), \                                              I##np=(img)(_n##x,_p##y,z,v), \                                              I##nc=(img)(_n##x,   y,z,v), \                                              I##nn=(img)(_n##x,_n##y,z,v), \                                              I##na=(img)(_n##x,_a##y,z,v)), \              x=0, _p##x=_b##x=0;                                       \            (_a##x<(int)((img).width) && (                              \                                          I##ab=(img)(_a##x,_b##y,z,v), \                                          I##ap=(img)(_a##x,_p##y,z,v), \                                          I##ac=(img)(_a##x,    y,z,v), \                                          I##an=(img)(_a##x,_n##y,z,v), \                                          I##aa=(img)(_a##x,_a##y,z,v), \                                          1)) || _n##x==--_a##x || x==(_a##x=--_n##x); \            I##bb=I##pb, I##bp=I##pp, I##bc=I##pc, I##bn=I##pn, I##ba=I##pa, \              I##pb=I##cb, I##pp=I##cp, I##pc=I##cc, I##pn=I##cn, I##pa=I##ca, \              I##cb=I##nb, I##cp=I##np, I##cc=I##nc, I##cn=I##nn, I##ca=I##na, \              I##nb=I##ab, I##np=I##ap, I##nc=I##ac, I##nn=I##an, I##na=I##aa, \              _b##x=_p##x, _p##x=x++, _n##x++, _a##x++ )#define cimg_map2x2x2(img,x,y,z,v,I) cimg_2mapYZ(img,y,z)               \       for (int _n##x=1, x=((int)(I##ccc=(img)(0,    y,    z,v),        \                                  I##cnc=(img)(0,_n##y,    z,v),        \                                  I##ccn=(img)(0,    y,_n##z,v),        \                                  I##cnn=(img)(0,_n##y,_n##z,v)),0);    \            (_n##x<(int)((img).width) && (                              \                                          I##ncc=(img)(_n##x,    y,    z,v), \                                          I##nnc=(img)(_n##x,_n##y,    z,v), \                                          I##ncn=(img)(_n##x,    y,_n##z,v), \                                          I##nnn=(img)(_n##x,_n##y,_n##z,v), \                                          1)) || x==--_n##x;            \            I##ccc=I##ncc, I##cnc=I##nnc,                               \              I##ccn=I##ncn, I##cnn=I##nnn,                             \              x++, _n##x++ )#define cimg_map3x3x3(img,x,y,z,v,I) cimg_3mapYZ(img,y,z)               \       for (int _n##x=1, _p##x=(int)(I##cpp=I##ppp=(img)(0,_p##y,_p##z,v), \                                     I##ccp=I##pcp=(img)(0,    y,_p##z,v), \                                     I##cnp=I##pnp=(img)(0,_n##y,_p##z,v), \                                     I##cpc=I##ppc=(img)(0,_p##y,    z,v), \                                     I##ccc=I##pcc=(img)(0,    y,    z,v), \                                     I##cnc=I##pnc=(img)(0,_n##y,    z,v), \                                     I##cpn=I##ppn=(img)(0,_p##y,_n##z,v), \                                     I##ccn=I##pcn=(img)(0,    y,_n##z,v), \                                     I##cnn=I##pnn=(img)(0,_n##y,_n##z,v)),\              x=_p##x=0;                                                \            (_n##x<(int)((img).width) && (                              \                                          I##npp=(img)(_n##x,_p##y,_p##z,v), \                                          I##ncp=(img)(_n##x,    y,_p##z,v), \                                          I##nnp=(img)(_n##x,_n##y,_p##z,v), \                                          I##npc=(img)(_n##x,_p##y,    z,v), \                                          I##ncc=(img)(_n##x,    y,    z,v), \                                          I##nnc=(img)(_n##x,_n##y,    z,v), \                                          I##npn=(img)(_n##x,_p##y,_n##z,v), \                                          I##ncn=(img)(_n##x,    y,_n##z,v), \                                          I##nnn=(img)(_n##x,_n##y,_n##z,v), \                                          1)) || x==--_n##x;            \            I##ppp=I##cpp, I##pcp=I##ccp, I##pnp=I##cnp,                \              I##cpp=I##npp, I##ccp=I##ncp, I##cnp=I##nnp,              \              I##ppc=I##cpc, I##pcc=I##ccc, I##pnc=I##cnc,              \              I##cpc=I##npc, I##ccc=I##ncc, I##cnc=I##nnc,              \              I##ppn=I##cpn, I##pcn=I##ccn, I##pnn=I##cnn,              \              I##cpn=I##npn, I##ccn=I##ncn, I##cnn=I##nnn,              \              _p##x=x++, _n##x++ )/*-------------------------------------------------  -------------------------------------------------    Definition of the cimg_library:: namespace  -------------------------------------------------  -------------------------------------------------*///! The <tt>\ref cimg_library::</tt> namespace encompasses all classes and functions of the CImg library./**   This namespace is defined to avoid class names collisions that could happen   with the include of other C++ header files. Anyway, it shouldn't happen   very often and you may start most of your programs with   \code   #include "CImg.h"   using namespace cimg_library;   \endcode   to simplify the declaration of CImg class variables afterward.**/namespace cimg_library {  struct CImgStats;  struct CImgDisplay;  struct CImgException;  template<typename T=float> struct CImg;  template<typename T=float> struct CImgl;  template<typename T=float> struct CImgROI;     /*----------------------------------------------------          Definition of the CImgException structures        -------------------------------------------------*/  #if cimg_debug>=1#if cimg_display_type!=2#define cimg_exception_print(str) std::fprintf(stderr,"<CImg Error> %s",str);#else#define cimg_exception_print(str) MessageBox(NULL,(LPCTSTR)str,"<CImg Error>",MB_OK);#endif#else#define cimg_exception_print(str)#endif#define cimg_exception_err(etype)                                 \  char tmp[1024];                                                 \  va_list ap;                                                     \  va_start(ap,format);                                            \  std::vsprintf(message,format,ap);                               \  va_end(ap);                                                     \  std::sprintf(tmp,"==> %s \n\nGeneral : %s\n\n", message,etype); \  cimg_exception_print(tmp)    //! The \ref CImgException class is used to throw general exceptions when an error occurs in a library call.  /**       The \ref CImgException class is the base class of all CImg exceptions.      Exceptions are thrown by the CImg Library when an error occurs during the execution of a CImg function.      The CImgException is seldom thrown itself, children classes (that specify the type of error)      are generally used instead.      It may be thrown anyway for non-specialized exception types.      \see CImgInstanceException, CImgArgumentException, CImgIOException and CImgDisplayException.      By default, when an error occurs, the CImg Library displays an error message on the standart error output \e stderr      (on Unix), or opens a pop-up window displaying the error message (on Windows).      Then, it throws an instance of an exception class, generally leading the program to stop (this is the      default behavior of the C++ exception mechanism).      You can always bypass this behavior by handling the exceptions by yourself (using a code block <tt>try { ... } catch() { ... }</tt>).      Then, if you don't want the CImg Library to display error messages, you can define the environment variable      <tt>cimg_debug</tt> to 0 before including the header file <tt>CImg.h</tt> (see \ref cimg_environment).            The <tt>CImgException</tt> class owns a member variable <tt>char* message</tt> that contains the exception message      describing precisely the error that occured.      The example above shows how to manually handle CImg Library errors properly :      \code      #define cimg_debug 0    // Disable error message display by CImg.      #define "CImg.h"      int main() {          try {          ...; // Here, do what you want.        }        catch (CImgException &e) {          std::fprintf(stderr,"CImg Library Error : %s",e.message);  // Display error message          ...                                                        // Do what you want to save the ship !        }      }      \endcode        **/  struct CImgException {    char message[1024]; //!< Error message    CImgException() { message[0]='\0'; }    CImgException(const char *format,...) {      cimg_exception_err("This error has been generated by a 'CImgException' throw,"			 "corresponding to a general exception problem.");     }  };  //! The \ref CImgInstanceException class is used to throw an exception related  //! to a non suitable instance encountered in a library function call.    /**     This class will be thrown when trying to call a class function from an     instance which is \e empty, or \e badly \e defined.     Typically, this exception occurs when using empty images :     \code     CImg<float> img; // define an empty image     img.blur(10);    // trying to blur an empty image will generate a CImgInstanceException.     \endcode          \see CImgException, CImgArgumentException, CImgIOException and CImgDisplayException.  **/  struct CImgInstanceException : CImgException { 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -