"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/sip_common.h" between
sip-0.5.6.tar.gz and sip-0.12.1.tar.gz

About: SIP (Scilab Image Processing) toolbox to do imaging tasks such as filtering, blurring, edge detection, thresholding, histogram manipulation, segmentation, mathematical morphology, color image processing, etc.

sip_common.h  (sip-0.5.6):sip_common.h  (sip-0.12.1)
skipping to change at line 43 skipping to change at line 43
# if defined(SIP_DLL) # if defined(SIP_DLL)
# define SipExport __declspec(dllexport) # define SipExport __declspec(dllexport)
# else # else
# define SipExport # define SipExport
# endif # endif
#else #else
# define SipExport # define SipExport
#endif #endif
#ifndef SIP_HAVE_GetLocaleExceptionMessage #ifndef SIP_HAVE_GetLocaleExceptionMessage
# define GetLocaleExceptionMessage(severity,description) description # define SipGetLocaleExceptionMessage(severity,description) description
#else
# define SipGetLocaleExceptionMessage(severity,description) GetLocaleExceptionM
essage(severity,description)
#endif #endif
#ifndef SIP_HAVE_QueryColorDatabase_3args #ifndef SIP_HAVE_QueryColorDatabase_3args
# define SIP_QueryColorDatabase(arg1,arg2,exception) QueryColorDatabase(arg1,ar g2) # define SIP_QueryColorDatabase(arg1,arg2,exception) QueryColorDatabase(arg1,ar g2)
#else #else
# define SIP_QueryColorDatabase(arg1,arg2,exception) QueryColorDatabase(arg1,ar g2,exception) # define SIP_QueryColorDatabase(arg1,arg2,exception) QueryColorDatabase(arg1,ar g2,exception)
#endif #endif
#include <stack-c.h> #include <stack-c.h>
#include <api_scilab.h>
#include <Scierror.h>
#include <stdio.h> #include <stdio.h>
#include <time.h> #include <time.h>
#include <sys/types.h> #include <sys/types.h>
#include <magick/api.h> #include <magick/api.h>
#ifdef SIP_HAVE_LIBLEPT
#include <allheaders.h>
#endif
#ifdef SIP_HAVE_MagickWand #ifdef SIP_HAVE_MagickWand
#include <wand/MagickWand.h> #include <wand/MagickWand.h>
#endif #endif
#include <animal/img.h> #include <animal/img.h>
#include <animal/util.h> #include <animal/util.h>
#ifdef SIP_HAVE_OPENCV
#include <opencv2/imgproc/imgproc_c.h>
#define SIVP_FLOAT 32
#define SIVP_DOUBLE 64
#endif
// sip for scilab types // sip for scilab types
#define USUALMATRIX 1 #define USUALMATRIX 1
#define STRING 10 #define STRING 10
#define HYPERMATRIX 17 #define HYPERMATRIX 17
#define ARG_2D 2 #define ARG_2D 2
#define ARG_3D 3 #define ARG_3D 3
#define ARG_INDEX_MAP 4 #define ARG_INDEX_MAP 4
#define IndexImgByRow(M, i, j) M[(j) + (i)*(image->columns)] #define IndexImgByRow(M, i, j) M[(j) + (i)*(image->columns)]
#define IndexImgByRowInPix(M, i, j) M[(j) + (i)*(pixcolumn)]
#define IndexImgByCol(M, i, j) M[(i) + (j)*(image->rows)] #define IndexImgByCol(M, i, j) M[(i) + (j)*(image->rows)]
#define IndexImgByColInPix(M, i, j) M[(i) + (j)*(pixrow)]
#define IndexImg3d(M, i, j, k) M[(i) + (j)*(image->rows) + \ #define IndexImg3d(M, i, j, k) M[(i) + (j)*(image->rows) + \
(k) * (image->rows)*(image->columns)] (k) * (image->rows)*(image->columns)]
#define IndexImg3dInPix(M, i, j, k) M[(i) + (j)*(pixrow) + \
(k) * (pixrow)*(pixcolumn)]
/* (Row, Col) indexing of 1D arrays in Pix*/
#define RCbyRInPix(a,i,j,pixcolumn) a[(j) + (i)*pixcolumn]
#define RCbyCInPix(a,i,j,pixrow) a[(i) + (j)*pixrow]
#define RC3DbyCInPix(a,i,j,k,pixrow,pixcolumn) a[(i) + (j)*(pixrow) + \
(k) * (pixrow)*(pixcolumn)]
// SIP error utility macros // SIP error utility macros
// - It is useful to print the fname so the source of error is // - It is useful to print the fname so the source of error is
// easier identifyed inside a big script // easier identifyed inside a big script
// - Scierror does not exit the function!! // - Scierror does not exit the function!!
#define sip_error(str) {Scierror(999,"%s: %s.\n\r",fname, (str)); fprintf(stderr ,"%s: %s.\n",fname, (str)); return false;} #define sip_error(str) {Scierror(999,"%s: %s.\n\r",fname, (str)); fprintf(stderr ,"%s: %s.\n",fname, (str)); return false;}
#define sip_warning(str) sciprint("%s (warning): %s.\n\r",fname, (str)); #define sip_warning(str) sciprint("%s (warning): %s.\n\r",fname, (str));
/* It would be best if an error handler would be set and then /* It would be best if an error handler would be set and then
skipping to change at line 181 skipping to change at line 203
/* Scilab <--> C hypermatrix I/O */ /* Scilab <--> C hypermatrix I/O */
sip_get_rhs_hmat(int pos, HyperMat *H), sip_get_rhs_hmat(int pos, HyperMat *H),
sip_get_rhs_tru_img(int pos, HyperMat *h, char *fname), sip_get_rhs_tru_img(int pos, HyperMat *h, char *fname),
sip_cre_hmat(int pos, HyperMat *H), sip_cre_hmat(int pos, HyperMat *H),
/* Scilab <--> Animal I/O */ /* Scilab <--> Animal I/O */
animal_grayscale_image_to_double_array(char *fname, Img *img, double **ptr), animal_grayscale_image_to_double_array(char *fname, Img *img, double **ptr),
animal_grayscale_imgpuint32_to_double_array(char *fname, ImgPUInt32 *img, dou ble **ptr); animal_grayscale_imgpuint32_to_double_array(char *fname, ImgPUInt32 *img, dou ble **ptr);
/* PIX <--> Scilab */
#ifdef SIP_HAVE_LIBLEPT
bool
pix_truecolor_image_to_double_hypermat(char *fname, PIX *pixme, HyperMat **H,
int rows, int cols),
pix_binary_image_to_double_array(char *fname, PIX *pixme, double **dbl_array,
int rows, int cols),
pix_index_map_to_sci_dbl(char *fname, PIX *pixme, int nv),
pix_gray_image_to_double_array(char *fname, PIX *pixme, double **dbl_array, i
nt rows, int cols);
PIX
/* Scilab <--> PIX */
*sci_2D_double_matrix_to_pix(char *fname, int p, int r, int c),
*sci_3D_double_hypermat_to_pix(char *fname, int nv),
*sci_index_map_to_pix(char *fname, int nv),
*sci_2D_gray_double_matrix_to_pix(char *fname, int p, int r, int c);
#endif
#define sci_2D_double_matrix_to_animal(ptr,r,c,img,pixtype,maxval) { \ #define sci_2D_double_matrix_to_animal(ptr,r,c,img,pixtype,maxval) { \
for (i=0; i<(r)*(c); ++i) \ for (i=0; i<(r)*(c); ++i) \
DATA(img)[i] = PROUND(pixtype,*stk(ptr+i) * maxval); \ DATA(img)[i] = PROUND(pixtype,*stk(ptr+i) * maxval); \
} }
/* Scilab <--> OpenCV I/O */
#ifdef SIP_HAVE_OPENCV
IplImage * Mat2IplImg(int nPos);
int IplImg2Mat(IplImage * pImage, int nPos);
int Create2DIntMat(int nPos, int nRow, int nCol, void * pData, int nType);
int Create2DFloatMat(int nPos, int nRow, int nCol, float * pData);
int Create2DDoubleMat(int nPos, int nRow, int nCol, double * pData);
int Create3DIntMat(int nPos, int nRow, int nCol, int nCh, void * pData, int nT
ype);
int Create3DFloatMat(int nPos, int nRow, int nCol, int nCh, float* pData);
int Create3DDoubleMat(int nPos, int nRow, int nCol, int nCh, double* pData);
IplImage * CreateIplImgFromHm(int nPos);
int MatData2ImgData(IplImage * pImage, void * pMatData);
int IplType2SciType(int IplType);
int SciType2IplType(int SciType);
int MatData2ImgData(IplImage * pImage, void * pMatData);
int ImgData2MatData(IplImage * pImage, void * pMatData);
#endif
#endif #endif
 End of changes. 9 change blocks. 
3 lines changed or deleted 69 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS