|
TPCCLIB
|
Functions for simple simulation of image of heart. More...
#include "libtpcidi.h"Go to the source code of this file.
Functions | |
| int | imgSimulateRing (IMG *img, int fi, int zi, double cx, double cy, double r1, double r2, double vr, double vi, double vo, int verbose) |
| int | simMyocDiameterCurve (DFT *dft, double t1, double t2, double hbr, double maxdiam, double mindiam) |
| int | imgSimulateSphere (IMG *img, int fi, double cx, double cy, double cz, double r1, double r2, double vr, double vi, double vo, int verbose) |
Functions for simple simulation of image of heart.
Definition in file heart.c.
| int imgSimulateRing | ( | IMG * | img, |
| int | fi, | ||
| int | zi, | ||
| double | cx, | ||
| double | cy, | ||
| double | r1, | ||
| double | r2, | ||
| double | vr, | ||
| double | vi, | ||
| double | vo, | ||
| int | verbose ) |
Simulate an image of ring with specified inner and outer radius and activity in the ring and inside and outside of it. The applied method is only approximate at pixel borders (pixel is divided into 5x5 subpixels). PET resolution effects are not simulated.
| img | Pointer to allocated static or dynamic image; image must contain pixel sizes and dimensions; values are added to any existing pixel values, thus you may need to set pixel values to zero before calling this function. |
| fi | Frame index [0..dimt-1]. |
| 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). |
| vr | Ring value; this value is added to each pixel value that fits inside the radius's; the pixels that are partially inside the ring will get fraction of the value. |
| vi | Inside value; this value is added to each pixel value that fits inside the inner radius; the pixels that are partially inside the radius will get fraction of the value. |
| vo | Outside value; this value is added to each pixel value that fits outside the outer radius; the pixels that are partially outside the radius will get fraction of the value. |
| verbose | Verbose level; set to <=0 to prevent all prints to stdout. |
Definition at line 17 of file heart.c.
| int imgSimulateSphere | ( | IMG * | img, |
| int | fi, | ||
| double | cx, | ||
| double | cy, | ||
| double | cz, | ||
| double | r1, | ||
| double | r2, | ||
| double | vr, | ||
| double | vi, | ||
| double | vo, | ||
| int | verbose ) |
Simulate a 3D image of circle with specified inner and outer radius and activity in the circle and inside and outside of it.
The applied method is only approximate at pixel borders (pixel is divided into 5x5 subpixels). PET resolution effects are not simulated.
| img | Pointer to allocated static or dynamic image; image must contain pixel sizes and dimensions; values are added to any existing pixel values, thus you may need to set pixel values to zero before calling this function. |
| fi | Frame index [0..dimt-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. |
| cz | Z 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). |
| vr | Sphere wall value; this value is added to each pixel value that fits inside the radius's; the pixels that are partially inside the wall will get fraction of the value. |
| vi | Inside value; this value is added to each pixel value that fits inside the inner radius; the pixels that are partially inside the radius will get fraction of the value. |
| vo | Outside value; this value is added to each pixel value that fits outside the outer radius; the pixels that are partially outside the radius will get fraction of the value. |
| verbose | Verbose level; set to <=0 to prevent all prints to stdout. |
Definition at line 154 of file heart.c.
| int simMyocDiameterCurve | ( | DFT * | dft, |
| double | t1, | ||
| double | t2, | ||
| double | hbr, | ||
| double | maxdiam, | ||
| double | mindiam ) |
Calculate the inner LV cavity diameter as a function of time for simulations.
10 samples per heart beat will be calculated. Fractional increase/decrease rate is fixed and coded in here.
| dft | Pointer to initiated DFT struct where diameter curve will be written. |
| t1 | Start time (s). |
| t2 | Stop time (s). |
| hbr | Heart rate (beats/min). |
| maxdiam | Maximum inner diameter (mm). |
| mindiam | Minimum inner diameter (mm). |
Definition at line 96 of file heart.c.