#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <math.h>#include <string.h>#include "include/prmat.h"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 | prmatSaveMatrix (PRMAT *mat) |
| int | prmatReadMatrix (char *fname, PRMAT *mat) |
|
||||||||||||||||||||
|
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.
|
1.4.1