Mir 1.0
Mir application programming interface
Image processing

Data Structures

struct  mirkl_image_t_
 

Macros

#define MIRKL_IMG_TIFF   1
 

Typedefs

typedef struct mirkl_image_t_ mirkl_image_t
 

Functions

mirkl_error_tmirkl_img_read (const char *name, mirkl_image_t *img)
 
mirkl_error_tmirkl_img_read_tiff_info (const char *name, mirkl_image_t *img)
 
mirkl_error_tmirkl_img_read_tiff (const char *name, mirkl_image_t *img)
 
mirkl_error_tmirkl_img_write_tiff (const char *name, mirkl_image_t *img)
 
mirkl_error_tmirkl_img_darr_to_tiff (const char *name, double **data, int length, int width)
 
void mirkl_img_free (mirkl_image_t *img)
 
mirkl_error_tmirkl_img_calc_density (mirkl_image_t *img, double **data, double ovexp)
 
mirkl_error_tmirkl_img_calc_fujiri (mirkl_image_t *img, double **data, double psize, double sens, double drange)
 
mirkl_error_tmirkl_img_data_dmask (mirkl_image_t *img, double **mask)
 
mirkl_error_tmirkl_img_get_resmm (mirkl_image_t *img, double *xRes, double *yRes)
 
mirkl_error_tmirkl_img_entropy (mirkl_image_t *img, double *ret)
 
mirkl_error_tmirkl_img_histogram (mirkl_image_t *img, mirkl_uint64_t *nbins, mirkl_uint64_t **hist)
 
double mirkl_img_thres_IJ (mirkl_uint64_t nbins, mirkl_uint64_t *data)
 Image thresholding. Default method of ImageJ. More...
 
mirkl_error_tmirkl_img_circle (int x0, int y0, int r, mirkl_error_t *(*pproc)(int, int, double, void *), void *args)
 Process pixels of a circle using fast Bresenham's Midpoint circle algorithm. see http://members.chello.at/~easyfilter/bresenham.html. More...
 
mirkl_error_tmirkl_img_circle_aa (int xm, int ym, int r, mirkl_error_t *(*pproc)(int, int, double, void *), void *args)
 
mirkl_error_tmirkl_img_circle_waa (int xm, int ym, int r, double th, mirkl_error_t *(*pproc)(int, int, double, void *), void *args)
 
mirkl_error_tmirkl_img_ellipse (int xm, int ym, int a, int b, mirkl_error_t *(*pproc)(int, int, double, void *), void *args)
 Process pixels of an ellipse. The ellipse is defined by coordinates of the center and by axes lengths. More...
 
mirkl_error_tmirkl_img_ellipser (int x0, int y0, int x1, int y1, mirkl_error_t *(*pproc)(int, int, double, void *), void *args)
 Process pixels of an ellipse. The ellipse is defined by a rectangle. More...
 
mirkl_error_tmirkl_img_ellipser_aa (int x0, int y0, int x1, int y1, mirkl_error_t *(*pproc)(int, int, double, void *), void *args)
 Process pixels of an ellipse plus anti-aliasing. The ellipse is defined by a rectangle.
 
mirkl_error_tmirkl_img_ellipse_aa (int xm, int ym, int a, int b, mirkl_error_t *(*pproc)(int, int, double, void *), void *args)
 
mirkl_error_tmirkl_img_ellipser_waa (int x0, int y0, int x1, int y1, double th, mirkl_error_t *(*pproc)(int, int, double, void *), void *args)
 Process pixels of an ellipse using fast Bresenham's algorithm. Anti-aliasing is used and ellipse thickness can be defined. see http://members.chello.at/~easyfilter/bresenham.html The ellipse is defined by a rectangle. More...
 
mirkl_error_tmirkl_img_ellipse_waa (int xm, int ym, int a, int b, double th, mirkl_error_t *(*pproc)(int, int, double, void *), void *args)
 

Detailed Description

Macro Definition Documentation

◆ MIRKL_IMG_TIFF

#define MIRKL_IMG_TIFF   1

TIFF image.

Typedef Documentation

◆ mirkl_image_t

typedef struct mirkl_image_t_ mirkl_image_t

Image structure.

Function Documentation

◆ mirkl_img_circle()

mirkl_error_t * mirkl_img_circle ( int  x0,
int  y0,
int  r,
mirkl_error_t *(*)(int, int, double, void *)  pproc,
void *  args 
)

Process pixels of a circle using fast Bresenham's Midpoint circle algorithm. see http://members.chello.at/~easyfilter/bresenham.html.

Parameters
x0,y0Coordinates (in pixels) of the center of the circle.
rCircle radius (in pixels).
pprocUser-defined callback function, arguments of this function are coordinates of the currently processed pixel, its weight and pointer to user data. In this function weights are always 1.0.
argsUser-defined data.

◆ mirkl_img_circle_aa()

mirkl_error_t * mirkl_img_circle_aa ( int  xm,
int  ym,
int  r,
mirkl_error_t *(*)(int, int, double, void *)  pproc,
void *  args 
)

Similar to mirkl_img_circle function, but processes pixels with anti-aliasing method sending appropriate weights to callback function. see http://members.chello.at/~easyfilter/bresenham.html

◆ mirkl_img_circle_waa()

mirkl_error_t * mirkl_img_circle_waa ( int  xm,
int  ym,
int  r,
double  th,
mirkl_error_t *(*)(int, int, double, void *)  pproc,
void *  args 
)

Similar to mirkl_img_circle_aa function, plus a possibility to defined circle thickness.

Parameters
thCircle thickness in pixels.

◆ mirkl_img_ellipse()

mirkl_error_t * mirkl_img_ellipse ( int  xm,
int  ym,
int  a,
int  b,
mirkl_error_t *(*)(int, int, double, void *)  pproc,
void *  args 
)

Process pixels of an ellipse. The ellipse is defined by coordinates of the center and by axes lengths.

Parameters
xm,ymCoordinates (in pixels) of the center.
a,bAxes lengths (in pixels), a is along x-axis (width), b is along y-axis (length).
pprocUser-defined callback function, arguments of this function are coordinates of the currently processed pixel, its weight and pointer to user data. In this function weights are always 1.0.
argsUser-defined data.

◆ mirkl_img_ellipse_aa()

mirkl_error_t * mirkl_img_ellipse_aa ( int  xm,
int  ym,
int  a,
int  b,
mirkl_error_t *(*)(int, int, double, void *)  pproc,
void *  args 
)

Same as mirkl_img_ellipser_aa, but the ellipse is defined by coordinates of the center and axes length.

◆ mirkl_img_ellipse_waa()

mirkl_error_t * mirkl_img_ellipse_waa ( int  xm,
int  ym,
int  a,
int  b,
double  th,
mirkl_error_t *(*)(int, int, double, void *)  pproc,
void *  args 
)

Same as mirkl_img_ellipser_waa, but the ellipse is defined by coordinates of the center and axes length.

◆ mirkl_img_ellipser()

mirkl_error_t * mirkl_img_ellipser ( int  x0,
int  y0,
int  x1,
int  y1,
mirkl_error_t *(*)(int, int, double, void *)  pproc,
void *  args 
)

Process pixels of an ellipse. The ellipse is defined by a rectangle.

Parameters
x0,y0Coordinates (in pixels) of the upper-left vertex of the rectangle.
x1,y1Coordinates (in pixels) of the lower-right vertex of the rectangle.
pprocUser-defined callback function, arguments of this function are coordinates of the currently processed pixel, its weight and pointer to user data. In this function weights are always 1.0.
argsUser-defined data.

◆ mirkl_img_ellipser_waa()

mirkl_error_t * mirkl_img_ellipser_waa ( int  x0,
int  y0,
int  x1,
int  y1,
double  th,
mirkl_error_t *(*)(int, int, double, void *)  pproc,
void *  args 
)

Process pixels of an ellipse using fast Bresenham's algorithm. Anti-aliasing is used and ellipse thickness can be defined. see http://members.chello.at/~easyfilter/bresenham.html The ellipse is defined by a rectangle.

Parameters
x0,y0Coordinates (in pixels) of the upper-left vertex of the rectangle.
x1,y1Coordinates (in pixels) of the lower-right vertex of the rectangle.
thEllipse thickness (in pixels, fractions of pixels).
pprocUser-defined callback function, arguments of this function are coordinates of the currently processed pixel, its weight and pointer to user data. In this function weights are always 1.0.
argsUser-defined data.

◆ mirkl_img_thres_IJ()

double mirkl_img_thres_IJ ( mirkl_uint64_t  nbins,
mirkl_uint64_t *  data 
)

Image thresholding. Default method of ImageJ.

Parameters
dataHistogram of image.
nbinsNumber of intensity levels in image (number of elements in array data).