#include "ellipse.h"Go to the source code of this file.
Defines | |
| #define | PRMAT_STATUS_UNINITIALIZED 0 |
| Structure status uninitialized. Value 0. | |
| #define | PRMAT_STATUS_INITIALIZED 1 |
| Stucture status initialized. Value 1. | |
| #define | PRMAT_STATUS_BS_OCCUPIED 2 |
| Base set of projection matrix status initialized and set. Value 2. | |
| #define | PRMAT_STATUS_LU_OCCUPIED 3 |
| Look up table status initialized and set. Value 3. | |
| #define | PRMAT_STATUS_PR_OCCUPIED 4 |
| The whole projection matrix status initialized and set. Value 4. | |
| #define | PRMAT_STATUS_ERROR 5 |
| Stucture status error. Value 5. | |
| #define | PRMAT_TYPE_ECAT931 0 |
| Projection matrix is based on scanner dimensions 192*256 (ECAT). Value 0. | |
| #define | PRMAT_TYPE_GE 1 |
| Projection matrix is based on scanner dimensions 281*336 (GE). Value 1. | |
| #define | PRMAT_TYPE_NA 2 |
| Projection matrix is based on unknown scanner geometrics. Value 2. | |
| #define | PRMAT_DMODE_01 0 |
| Discretization model in discrete Radon transform is "0/1". Value 0. | |
| #define | PRMAT_DMODE_LOI 1 |
| Discretization model in discrete Radon transform is "length of intersection". Value 1. | |
| #define | PRMAT_DMODE_EA 2 |
| Discretization model in discrete Radon transform is "exact area". Value 2. | |
| #define | PRMAT_DMODE_LI 3 |
| Discretization model in discrete Radon transform is "linear interpolation". Value 3. | |
| #define | PRMAT_DMODE_NN 4 |
| Discretization model in discrete Radon transform is "nearest neighbour". Value 4. | |
Functions | |
| void | prmatInit (PRMAT *mat) |
| void | prmatEmpty (PRMAT *mat) |
| int | prmatAllocate (PRMAT *mat, int set, int rows, int *coords) |
| int | prmatGetNV (PRMAT *mat) |
| int | prmatGetNB (PRMAT *mat) |
| int | prmatGetID (PRMAT *mat) |
| int | prmatGetPIX (PRMAT *mat) |
| int | prmatGetPixCoord (PRMAT *mat, int row) |
| int | prmatGetRays (PRMAT *mat, int row) |
| int | prmatGetBinView (PRMAT *mat, int row, int ind) |
| int | prmatGetRows (PRMAT *mat) |
| int | prmatGetPixels (PRMAT *mat, int row) |
| int | prmatGetCoord (PRMAT *mat, int row, int pix) |
| int | prmatGetXCoord (PRMAT *mat, int row, int pix) |
| 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 | prmatReadMatrix (char *fname, PRMAT *mat) |
| int | prmatSaveMatrix (PRMAT *mat) |
Variables | |
| int | PRMAT_TEST |
| If not 0 drive in test mode. | |
| int | PRMAT_VERBOSE |
| If not 0 drive in verbose mode. | |
|
|
Discretization model in discrete Radon transform is "0/1". Value 0.
|
|
|
Discretization model in discrete Radon transform is "exact area". Value 2.
|
|
|
Discretization model in discrete Radon transform is "linear interpolation". Value 3.
|
|
|
Discretization model in discrete Radon transform is "length of intersection". Value 1.
|
|
|
Discretization model in discrete Radon transform is "nearest neighbour". Value 4.
|
|
|
Base set of projection matrix status initialized and set. Value 2.
|
|
|
Stucture status error. Value 5.
|
|
|
Stucture status initialized. Value 1.
|
|
|
Look up table status initialized and set. Value 3.
|
|
|
The whole projection matrix status initialized and set. Value 4.
|
|
|
Structure status uninitialized. Value 0.
|
|
|
Projection matrix is based on scanner dimensions 192*256 (ECAT). Value 0.
|
|
|
Projection matrix is based on scanner dimensions 281*336 (GE). Value 1.
|
|
|
Projection matrix is based on unknown scanner geometrics. Value 2.
|
|
||||||||||||||||||||
|
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 is initialized && rows is positive && *coords list contains as many positive integers as there are rows. memory is allocated for PRMAT structure mat.
|
|
|
Frees the memory allocated for mat. All data is cleared.
|
|
||||||||||||||||
|
Returns coordinates of a line of response in place (row,ind) in the look-up table. 0<=row<=prmatGetPIX(*mat) && 0<=ind<=prmatGetRays(*mat,row) && mat is initialized. .
|
|
||||||||||||||||
|
Returns coordinate of a pixel in place (row,pix) in the given projection matrix. 0<=row<=prmatGetLORS(*mat) && 0<=pix<=prmatGetPixels(row,*mat) && mat is initialized. .
|
|
||||||||||||||||
|
Returns factor (weighting coefficient) for a pixel in place (row,pix) in given projection matrix. 0<=row<=prmatGetLORS(*mat) && 0<=pix<=prmatGetPixels(row,*mat) && mat is initialized. .
|
|
||||||||||||
|
Returns square sum of all factors in given projection matrix in given row. mat is initialized && 0<=row<=prmatGetLORS(*mat). .
|
|
|
Returns sum of all factors in given projection matrix. For initializing image matrix. mat is initialized. .
|
|
|
Returns the image dimension in the geometrics. mat is initialized. .
|
|
|
Returns major semiaxe of the FOV in given projection matrix. mat is initialized. .
|
|
|
Returns greatest value in given projection matrix. mat is initialized. .
|
|
|
Returns minimal value in given projection matrix. mat is initialized. .
|
|
|
Returns minor semiaxe of the FOV in given projection matrix. mat is initialized. .
|
|
|
Returns the number of bins (distances) in the geometrics. mat is initialized. .
|
|
|
Returns the number of views (angles) in the geometrics. mat is initialized. .
|
|
|
Returns number of rows (pixels) in the look-up table. mat is initialized. .
|
|
||||||||||||
|
Returns coordinates of a pixel in place 'row' in the look-up table. 0<=row<=prmatGetPIX(*mat) && mat is initialized. END .
|
|
||||||||||||
|
Returns number of pixels intersected by the given line of response. 0<=row<=prmatGetLORS(*mat) && mat is initialized. END .
|
|
||||||||||||
|
Returns the number of lines of response (rays) intersecting the pixel in place 'row'. 0<=row<=prmatGetPIX(*mat) && mat is initialized. END .
|
|
|
Returns number of rows (lines of response) in the given projection matrix. mat is initialized. .
|
|
||||||||||||||||
|
Returns the x-coordinate of a pixel in place (row,pix) in the given projection matrix. 0<=row<=prmatGetLORS(*mat) && 0<=pix<=prmatGetPixels(row,*mat) && mat is initialized. .
|
|
||||||||||||||||
|
Returns the y-coordinate of a pixel in place (row,pix) in the given projection matrix. 0<=row<=prmatGetLORS(*mat) && 0<=pix<=prmatGetPixels(row,*mat) && mat is initialized. .
|
|
|
Initializes PRMAT datatype for use. To be utilised before any use of PRMAT type variables.
|
|
||||||||||||
|
Reads one projection matrix from the given file to the given PRMAT structure mat. mat is initialized. a projection matrix is read from the file fname.
|
|
|
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 is initialized (contains a projection matrix). mat is saved in the file prTDXXYY.prm.
|
|
|
If not 0 drive in test mode.
|
|
|
If not 0 drive in verbose mode.
|
1.4.1