|
TPCCLIB
|
Functions for simulating circular image region. More...
#include "libtpcidi.h"Go to the source code of this file.
Functions | |
| int | imgCircleMask (IMG *img, int zi, double cx, double cy, double r, double mv, double *smv, int verbose) |
| int | imgRingMask (IMG *img, int zi, double cx, double cy, double r1, double r2, double mv, double *smv, int verbose) |
Functions for simulating circular image region.
Definition in file circle.c.
| int imgCircleMask | ( | IMG * | img, |
| int | zi, | ||
| double | cx, | ||
| double | cy, | ||
| double | r, | ||
| double | mv, | ||
| double * | smv, | ||
| int | verbose ) |
Simulate a mask image of circle with specified radius.
The applied method is only approximate at pixel borders (pixel is divided into 5x5 subpixels).
| img | Pointer to allocated static or dynamic image; image must contain pixel sizes and dimensions; mask values are added to pixel values, thus you may need to set pixel values to zero before calling this function. |
| zi | Plane index [0..dimz-1]. |
| cx | X distance of circle centre (mm) from the upper left corner of the image. |
| cy | Y distance of circle centre (mm) from the upper left corner of the image. |
| r | Radius of circle (mm). |
| mv | Mask value; this value is added to each pixel value that fits inside the radius; the pixels that are partially inside the radius will get fraction of mask value. |
| smv | Pointer to value where the sum of added mask pixel values is written; enter NULL if not needed. Use this to validate the results. |
| verbose | Verbose level; set to <=0 to prevent all prints to stdout. |
Definition at line 16 of file circle.c.
Referenced by imgRingMask().
| int imgRingMask | ( | IMG * | img, |
| int | zi, | ||
| double | cx, | ||
| double | cy, | ||
| double | r1, | ||
| double | r2, | ||
| double | mv, | ||
| double * | smv, | ||
| int | verbose ) |
Simulate a mask image of ring with specified inner and outer radius.
The applied method is only approximate at pixel borders (pixel is divided into 5x5 subpixels).
| img | Pointer to allocated static or dynamic image; image must contain pixel sizes and dimensions; mask values are added to pixel values, thus you may need to set pixel values to zero before calling this function. |
| zi | Plane index [0..dimz-1]. |
| cx | X distance of circle centre (mm) from the upper left corner of the image. |
| cy | Y distance of circle centre (mm) from the upper left corner of the image. |
| r1 | Inner radius of circle (mm). |
| r2 | Outer radius of circle (mm). |
| mv | Mask value; this value is added to each pixel value that fits inside the radius; the pixels that are partially inside the radius will get fraction of mask value. |
| smv | Pointer to value where the sum of added mask pixel values is written; enter NULL if not needed. Use this to validate the results. |
| verbose | Verbose level; set to <=0 to prevent all prints to stdout. |
Definition at line 77 of file circle.c.