|
TPCCLIB
|
Data handling for projection matrix. More...
#include "libtpcrec.h"Go to the source code of this file.
Functions | |
| void | prmatInit (PRMAT *mat) |
| void | prmatEmpty (PRMAT *mat) |
| int | prmatAllocate (PRMAT *mat, int set, unsigned int rows, unsigned int *coords) |
| unsigned int | prmatGetNV (PRMAT *mat) |
| unsigned int | prmatGetNB (PRMAT *mat) |
| unsigned int | prmatGetID (PRMAT *mat) |
| unsigned int | prmatGetPIX (PRMAT *mat) |
| unsigned int | prmatGetPixCoord (PRMAT *mat, int row) |
| unsigned int | prmatGetRays (PRMAT *mat, int row) |
| unsigned int | prmatGetBinView (PRMAT *mat, int row, int ind) |
| unsigned int | prmatGetRows (PRMAT *mat) |
| unsigned int | prmatGetPixels (PRMAT *mat, int row) |
| unsigned int | prmatGetCoord (PRMAT *mat, int row, int pix) |
| unsigned int | prmatGetXCoord (PRMAT *mat, int row, int pix) |
| unsigned int | prmatGetYCoord (PRMAT *mat, int row, int pix) |
| float | prmatGetFactor (PRMAT *mat, int row, int pix) |
| float | prmatGetMajor (PRMAT *mat) |
| float | prmatGetMinor (PRMAT *mat) |
| float | prmatGetMin (PRMAT *mat) |
| float | prmatGetMax (PRMAT *mat) |
| float | prmatGetFactorSum (PRMAT *mat) |
| float | prmatGetFactorSqrSum (PRMAT *mat, int row) |
| int | prmatSaveMatrix (PRMAT *mat) |
| int | prmatReadMatrix (char *fname, PRMAT *mat) |
Variables | |
| int | PRMAT_TEST |
| If not 0 drive in test mode. | |
| int | PRMAT_VERBOSE |
| If not 0 drive in verbose mode. | |
| int prmatAllocate | ( | PRMAT * | mat, |
| int | set, | ||
| unsigned int | rows, | ||
| unsigned int * | coords ) |
Allocates memory for PRMAT data. Normally used only in SET-functions.
Allocates memory for look-up table if set = 0 and for projection matrix otherwise.
| mat | pointer to projection matrix for which the allocation is done. |
| set | tells for which part of the structure allocation is to be done. |
| rows | number of rows in a matrix. |
| coords | list of number of entries in each row. |
Definition at line 105 of file prmat.c.
Referenced by prmatReadMatrix(), radonSetLORS(), and radonSetLUT().
| void prmatEmpty | ( | PRMAT * | mat | ) |
Frees the memory allocated for mat. All data is cleared.
| mat | pointer to projection matrix to be emptied. |
Definition at line 56 of file prmat.c.
Referenced by prmatReadMatrix(), and radonSetLORS().
| unsigned int prmatGetBinView | ( | PRMAT * | mat, |
| int | row, | ||
| int | ind ) |
Returns coordinates of a line of response in place (row,ind) in the look-up table.
| mat | pointer to a projection matrix. |
| row | the row index. |
| ind | the (non-zero) lor index. |
Definition at line 253 of file prmat.c.
Referenced by prmatSaveMatrix().
| unsigned int prmatGetCoord | ( | PRMAT * | mat, |
| int | row, | ||
| int | pix ) |
Returns coordinate of a pixel in place (row,pix) in the given projection matrix.
| mat | pointer to a projection matrix. |
| row | the row index. |
| pix | the (non-zero) pixel index. |
Definition at line 297 of file prmat.c.
| float prmatGetFactor | ( | PRMAT * | mat, |
| int | row, | ||
| int | pix ) |
Returns factor (weighting coefficient) for a pixel in place (row,pix) in given projection matrix.
| mat | pointer to a projection matrix. |
| row | the row index. |
| pix | the (non-zero) pixel index. |
Definition at line 342 of file prmat.c.
Referenced by radonBackTransformPRM(), and radonFwdTransformPRM().
| float prmatGetFactorSqrSum | ( | PRMAT * | mat, |
| int | row ) |
Returns square sum of all factors in given projection matrix in given row.
| mat | pointer to a projection matrix. |
| row | row index for accessing factors. |
Definition at line 409 of file prmat.c.
Referenced by prmatSaveMatrix(), and radonSetLORS().
| float prmatGetFactorSum | ( | PRMAT * | mat | ) |
Returns sum of all factors in given projection matrix. For initializing image matrix.
| mat | pointer to a projection matrix. |
Definition at line 397 of file prmat.c.
| unsigned int prmatGetID | ( | PRMAT * | mat | ) |
Returns the image dimension in the geometrics.
| mat | pointer to a projection matrix. |
Definition at line 197 of file prmat.c.
Referenced by radonBackTransformPRM(), and radonFwdTransformPRM().
| float prmatGetMajor | ( | PRMAT * | mat | ) |
Returns major semiaxe of the FOV in given projection matrix.
| mat | pointer to a projection matrix. |
| float prmatGetMax | ( | PRMAT * | mat | ) |
| float prmatGetMin | ( | PRMAT * | mat | ) |
| float prmatGetMinor | ( | PRMAT * | mat | ) |
| unsigned int prmatGetNB | ( | PRMAT * | mat | ) |
Returns the number of bins (distances) in the geometrics.
| mat | pointer to a projection matrix. |
Definition at line 186 of file prmat.c.
Referenced by radonBackTransformPRM(), and radonFwdTransformPRM().
| unsigned int prmatGetNV | ( | PRMAT * | mat | ) |
Returns the number of views (angles) in the geometrics.
| mat | pointer to a projection matrix. |
Definition at line 175 of file prmat.c.
Referenced by radonBackTransformPRM(), and radonFwdTransformPRM().
| unsigned int prmatGetPIX | ( | PRMAT * | mat | ) |
Returns number of rows (pixels) in the look-up table.
| mat | pointer to a projection matrix. |
Definition at line 210 of file prmat.c.
Referenced by prmatReadMatrix(), and prmatSaveMatrix().
| unsigned int prmatGetPixCoord | ( | PRMAT * | mat, |
| int | row ) |
Returns coordinates of a pixel in place 'row' in the look-up table.
| mat | pointer to a projection matrix. |
| row | index of the pixel whose coordinates are to be returned. |
Definition at line 223 of file prmat.c.
Referenced by prmatSaveMatrix().
| unsigned int prmatGetPixels | ( | PRMAT * | mat, |
| int | row ) |
Returns number of pixels intersected by the given line of response.
| mat | pointer to the projection matrix. |
| row | index of the line of response for which the number of pixels is returned. |
Definition at line 282 of file prmat.c.
Referenced by prmatReadMatrix(), prmatSaveMatrix(), radonBackTransformPRM(), radonFwdTransformPRM(), radonSetLORS(), and radonSetLUT().
| unsigned int prmatGetRays | ( | PRMAT * | mat, |
| int | row ) |
Returns the number of lines of response (rays) intersecting the pixel in place 'row'.
| mat | pointer to a projection matrix. |
| row | index of the pixel for which the number of lors is returned. |
Definition at line 237 of file prmat.c.
Referenced by prmatReadMatrix(), and prmatSaveMatrix().
| unsigned int prmatGetRows | ( | PRMAT * | mat | ) |
Returns number of rows (lines of response) in the given projection matrix.
| mat | pointer to the projection matrix. |
Definition at line 267 of file prmat.c.
Referenced by prmatSaveMatrix(), and radonSetLORS().
| unsigned int prmatGetXCoord | ( | PRMAT * | mat, |
| int | row, | ||
| int | pix ) |
Returns the x-coordinate of a pixel in place (row,pix) in the given projection matrix.
| mat | pointer to a projection matrix. |
| row | the row index. |
| pix | the (non-zero) pixel index. |
Definition at line 312 of file prmat.c.
Referenced by prmatSaveMatrix(), radonBackTransformPRM(), radonFwdTransformPRM(), radonSetLORS(), and radonSetLUT().
| unsigned int prmatGetYCoord | ( | PRMAT * | mat, |
| int | row, | ||
| int | pix ) |
Returns the y-coordinate of a pixel in place (row,pix) in the given projection matrix.
| mat | pointer to a projection matrix. |
| row | the row index. |
| pix | the (non-zero) pixel index. |
Definition at line 327 of file prmat.c.
Referenced by prmatSaveMatrix(), radonBackTransformPRM(), radonFwdTransformPRM(), radonSetLORS(), and radonSetLUT().
| void prmatInit | ( | PRMAT * | mat | ) |
Initializes PRMAT datatype for use. To be utilised before any use of PRMAT type variables.
| mat | pointer to projection matrix to be initialized. |
Definition at line 22 of file prmat.c.
Referenced by radonSetLORS().
| int prmatReadMatrix | ( | char * | fname, |
| PRMAT * | mat ) |
Reads one projection matrix from the given file to the given PRMAT structure mat.
| fname | file name to read. |
| mat | pointer to the projection matrix datatype. |
Definition at line 550 of file prmat.c.
| int prmatSaveMatrix | ( | PRMAT * | mat | ) |
Adds the given projection matrix to the file called prTDXXYY.prm. Where T is the type of the scanner (E=ECAT931 and G=GE Advance), D is the type of discretisation (0='0/1', 1='length of intersection' and 2='exact area'), XX is the major semiaxe of the FOV, and YY the minor semiaxe. If file already exists it is NOT created or rewritten.
| mat | pointer to the projection matrix to be saved. |
Definition at line 428 of file prmat.c.
| int PRMAT_VERBOSE |
If not 0 drive in verbose mode.
Definition at line 9 of file prmat.c.
Referenced by prmatAllocate(), prmatEmpty(), prmatInit(), prmatReadMatrix(), and prmatSaveMatrix().