|
TPCCLIB
|
Image reprojection. More...
#include "libtpcrec.h"Go to the source code of this file.
Functions | |
| int | imgReprojection (IMG *img, IMG *scn, int verbose) |
| int | reprojection (float *image, int dim, int rays, int views, float bpzoom, float *sinogram, int verbose) |
| void | viewReprojection (float *idata, float *sdata, int view, int dim, int viewNr, int rayNr, float *sinB, float *sinBrot, float offsX, float offsY, float bpZoom) |
| void | reprojectionAvg3 (float *data, int n) |
| void | reprojectionAvg5 (float *data, int n) |
| void | reprojectionMed3 (float *data, int n) |
| void | viewBackprojection (float *prj, float *idata, int dim, int view, int viewNr, int rayNr, float *sinB, float *sinBrot, float offsX, float offsY, float bpZoom) |
Image reprojection.
Based on the codes written by Sakari Alenius for Sun UNIX workstations.
Definition in file reprojection.c.
Image reprojection to 2D sinogram.
| img | Pointer to IMG struct containing the input image data. img->sizez is used to determine the scanner specific parameters including sinogram dimensions. |
| scn | Pointer to initiated IMG struct in which the sinogram will be written. |
| verbose | Verbose level; if zero, then nothing is printed to stderr or stdout |
Definition at line 16 of file reprojection.c.
| int reprojection | ( | float * | image, |
| int | dim, | ||
| int | rays, | ||
| int | views, | ||
| float | bpzoom, | ||
| float * | sinogram, | ||
| int | verbose ) |
Reprojection of one 2D image matrix to sinogram when data is provided as arrays of floats.
| image | Pointer to float array containing dim*dim image pixel values. |
| dim | Image x and y dimensions; must be an even number. |
| rays | Nr of rays (bins or columns) in sinogram data. |
| views | Nr of views (rows) in sinogram data; usually larger or equal to the image dimensions. |
| bpzoom | Backprojection zoom factor; imagezoom*dim/rays |
| sinogram | Pointer to pre-allocated sinogram data; size must be at least rays*views. |
| verbose | Verbose level; if zero, then nothing is printed to stderr or stdout |
Definition at line 154 of file reprojection.c.
Referenced by atnMake().
| void reprojectionAvg3 | ( | float * | data, |
| int | n ) |
Average over three samples for image reprojection (1D 3-point mean).
| data | Pointer to data array |
| n | Array length |
Definition at line 293 of file reprojection.c.
Referenced by imgReprojection(), and reprojection().
| void reprojectionAvg5 | ( | float * | data, |
| int | n ) |
Average over five samples for image reprojection (1D 5-point mean).
| data | Pointer to data array |
| n | Array length |
Definition at line 314 of file reprojection.c.
Referenced by imgReprojection(), and reprojection().
| void reprojectionMed3 | ( | float * | data, |
| int | n ) |
Median over three samples for image reprojection (1D 3-point median).
| data | Pointer to data array |
| n | Array length |
Definition at line 336 of file reprojection.c.
| void viewBackprojection | ( | float * | prj, |
| float * | idata, | ||
| int | dim, | ||
| int | view, | ||
| int | viewNr, | ||
| int | rayNr, | ||
| float * | sinB, | ||
| float * | sinBrot, | ||
| float | offsX, | ||
| float | offsY, | ||
| float | bpZoom ) |
Back-projection of one angle (view)
| prj | Pointer to source projection data. |
| idata | Pointer to output image data of size dim*dim (upper left corner). |
| dim | Image dimension; must be an even number |
| view | Projection view (in order to get correct sine from tables) |
| viewNr | Number of projection views (sinogram rows) (to get correct sine from tables) |
| rayNr | Number of rays (bins, columns) |
| sinB | Pre-computed sine table for reprojection. |
| sinBrot | Pre-computed sine table for reprojection with rotation. |
| offsX | x offset in pixels; shift_x/pixsize. |
| offsY | y offset in pixels; shift_x/pixsize. |
| bpZoom | Zoom |
Definition at line 359 of file reprojection.c.
| void viewReprojection | ( | float * | idata, |
| float * | sdata, | ||
| int | view, | ||
| int | dim, | ||
| int | viewNr, | ||
| int | rayNr, | ||
| float * | sinB, | ||
| float * | sinBrot, | ||
| float | offsX, | ||
| float | offsY, | ||
| float | bpZoom ) |
Reprojection of one angle (view)
| idata | Pointer to source input image data of size dim*dim |
| sdata | Pointer to preallocated output sinogram projection view (angle, row) |
| view | Projection view (in order to get correct sine from tables) |
| dim | Image dimension; must be an even number |
| viewNr | Number of projection views (sinogram rows) (to get correct sine from tables) |
| rayNr | Number of rays (bins, columns) |
| sinB | Pre-computed sine table for reprojection. |
| sinBrot | Pre-computed sine table for reprojection with rotation. |
| offsX | x offset in pixels; shift_x/pixsize. |
| offsY | y offset in pixels; shift_x/pixsize. |
| bpZoom | Zoom |
Definition at line 216 of file reprojection.c.
Referenced by imgReprojection(), mrp(), reprojection(), and trmrp().