|
TPCCLIB
|
Radon transform. More...
#include "libtpcrec.h"Go to the source code of this file.
Functions | |
| void | radonEmpty (RADON *radtra) |
| int | radonSet (RADON *radtra, int mode, int imgDim, int viewNr, int binNr) |
| int | radonGetMO (RADON *radtra) |
| int | radonGetID (RADON *radtra) |
| int | radonGetNV (RADON *radtra) |
| int | radonGetNB (RADON *radtra) |
| float | radonGetSD (RADON *radtra) |
| int | radonGetHI (RADON *radtra) |
| int | radonGetCB (RADON *radtra) |
| float | radonGetSin (RADON *radtra, int nr) |
| int | radonFwdTransform (RADON *radtra, int set, int setNr, float *imgdata, float *scndata) |
| int | radonFwdTransformEA (RADON *radtra, int set, int setNr, float *imgdata, float *scndata) |
| int | radonFwdTransformSA (RADON *radtra, int set, int setNr, float *imgdata, float *scndata) |
| int | radonFwdTransformPRM (PRMAT *mat, int set, int setNr, float *imgdata, float *scndata) |
| int | radonBackTransform (RADON *radtra, int set, int setNr, float *scndata, float *imgdata) |
| int | radonBackTransformEA (RADON *radtra, int set, int setNr, float *scndata, float *imgdata) |
| int | radonBackTransformSA (RADON *radtra, int set, int setNr, float *scndata, float *imgdata) |
| int | radonBackTransformPRM (PRMAT *mat, int set, int setNr, float *scndata, float *imgdata) |
| int | radonSetBases (RADON *radtra, ELLIPSE *elli, PRMAT *mat) |
| int | radonSetBasesEA (RADON *radtra, ELLIPSE *elli, PRMAT *mat) |
| int | radonSetLUT (RADON *radtra, ELLIPSE *elli, PRMAT *mat) |
| int | radonSetLORS (RADON *radtra, ELLIPSE *elli, PRMAT *mat) |
Variables | |
| int | RADON_TEST |
| Drive in test mode if not 0. | |
| int | RADON_VERBOSE |
| Drive in verbose mode if not 0. | |
Radon transform.
Radon data structure contains the parameters defining a Radon transform. Transformations to and from the Radon domain are implemented in this file. Discretisation of a continuos Radon transform has five (5) different implementations in this file.
Definition in file radon.c.
| int radonBackTransform | ( | RADON * | radtra, |
| int | set, | ||
| int | setNr, | ||
| float * | scndata, | ||
| float * | imgdata ) |
Transforms the given sinogram in Radon domain to spatial domain. Parameters of the discrete Radon transform are stored in the RADON object. Transform is calculated only in those angles belonging into given subset. Subset contains angles starting from the index 'set' with spacing 'setNr'. Discretisation model utilised in this function is '0/1' or 'length of intersection' according to the given RADON object.
| radtra | contains an initialized radon transform object. |
| set | tells which set is to be utilized; 0 < set < setNr-1 |
| setNr | number of subsets |
| scndata | v x b vector contains the projections. |
| imgdata | n x n vector for storing the back-projection. |
Definition at line 1429 of file radon.c.
| int radonBackTransformEA | ( | RADON * | radtra, |
| int | set, | ||
| int | setNr, | ||
| float * | scndata, | ||
| float * | imgdata ) |
Same as 'radonBackTransform()' but discretisation model in this function is 'exact area'.
| radtra | contains an initialized radon transform object. |
| set | tells which set is to be utilized; 0 < set < setNr-1 |
| setNr | number of subsets |
| scndata | v x b vector contains the projections. |
| imgdata | n x n vector for storing the back-projection. |
Definition at line 1696 of file radon.c.
| int radonBackTransformPRM | ( | PRMAT * | mat, |
| int | set, | ||
| int | setNr, | ||
| float * | scndata, | ||
| float * | imgdata ) |
Transforms the given sinogram in Radon domain to spatial domain. Transform is calculated by multiplying with the transpose of the given projection matrix from the right. Transform is calculated only in those angles belonging into given subset. Subset contains angles starting from the index 'set' with spacing 'setNr'. Discretisation model utilised in this function is '0/1', 'length of intersection' or 'exact area' according to the given projection matrix.
| mat | pointer to structure where coordinates and values are stored. |
| set | tells which set is to be utilized; 0 < set < setNr-1 |
| setNr | number of subsets |
| scndata | v x b vector contains the projections. |
| imgdata | n x n vector for storing the back-projection. |
Definition at line 2503 of file radon.c.
| int radonBackTransformSA | ( | RADON * | radtra, |
| int | set, | ||
| int | setNr, | ||
| float * | scndata, | ||
| float * | imgdata ) |
Same as 'radonBackTransform()' but discretisation model in this function is 'linear interpolation' or 'nearest neighbour interpolation' according to the given Radon transform object.
| radtra | contains an initialized radon transform object. |
| set | tells which set is to be utilized; 0 < set < setNr-1 |
| setNr | number of subsets |
| scndata | v x b vector contains the projections. |
| imgdata | n x n vector for storing the back-projection. |
Definition at line 2415 of file radon.c.
| void radonEmpty | ( | RADON * | radtra | ) |
Frees the memory allocated for radon transform. All data is cleared.
| radtra | pointer to transform data to be emptied |
Definition at line 27 of file radon.c.
| int radonFwdTransform | ( | RADON * | radtra, |
| int | set, | ||
| int | setNr, | ||
| float * | imgdata, | ||
| float * | scndata ) |
Performs the perpendicular model of the radon transform for the given vector in spatial domain. The discretisation mode is chosen according to transform object, discretisation mode is 0 or 1. Transform is performed in those angles belonging in the given subset. The set of coincidence lines is divided into subsets in the following way: let i be the number of subsets, then every ith angle in the base set and the ones symmetrical with it belong to the same subset.
| radtra | contains an initialized radon transform object. |
| set | tells which set is to be utilized; 0 < set < setNr-1 |
| setNr | number of subsets |
| imgdata | contains pixel values for every pixel in dim*dim image grid. |
| scndata | viewNr*binNr vector for storing the projection |
Definition at line 216 of file radon.c.
| int radonFwdTransformEA | ( | RADON * | radtra, |
| int | set, | ||
| int | setNr, | ||
| float * | imgdata, | ||
| float * | scndata ) |
Same as 'radonFwdTransform()' but discretisation model in this function is 'exact area'.
| radtra | contains an initialized radon transform object. |
| set | tells which set is to be utilized; 0 < set < setNr-1 |
| setNr | number of subsets |
| imgdata | contains pixel values for every pixel in dim*dim image grid. |
| scndata | viewNr*binNr vector for storing the projection |
Definition at line 550 of file radon.c.
| int radonFwdTransformPRM | ( | PRMAT * | mat, |
| int | set, | ||
| int | setNr, | ||
| float * | imgdata, | ||
| float * | scndata ) |
Transforms the given intensity image in spatial domain to Radon domain. Transform is calculated by multiplying with the given projection matrix from the left. Transform is calculated only in those angles belonging into given subset. Subset contains angles starting from the index 'set' with spacing 'setNr'. Discretisation model utilised in this function is '0/1', 'length of intersection' or 'exact area' according to the given projection matrix.
| mat | contains an initialised projection matrix |
| set | tells which set is to be utilized; 0 < set < setNr-1 |
| setNr | number of subsets (spacing between indices) |
| imgdata | contains pixel values for every pixel in dim*dim image grid. |
| scndata | viewNr*binNr vector for storing the projection |
Definition at line 1328 of file radon.c.
| int radonFwdTransformSA | ( | RADON * | radtra, |
| int | set, | ||
| int | setNr, | ||
| float * | imgdata, | ||
| float * | scndata ) |
Same as 'radonFwdTransform()' but discretisation model in this function is 'linear interpolation' or 'nearest neighbour interpolation' according to the given Radon transform object.
| radtra | contains an initialized radon transform object. |
| set | tells which set is to be utilized; 0 < set < setNr-1 |
| setNr | number of subsets |
| imgdata | contains pixel values for every pixel in dim*dim image grid. |
| scndata | viewNr*binNr vector for storing the projection |
Definition at line 1238 of file radon.c.
| int radonGetCB | ( | RADON * | radtra | ) |
Returns the center bin in this radon transform.
| radtra | radon transform for which the center bin is to be returned. |
Definition at line 180 of file radon.c.
Referenced by radonBackTransform(), radonBackTransformEA(), radonFwdTransform(), radonFwdTransformEA(), and radonSetLUT().
| int radonGetHI | ( | RADON * | radtra | ) |
Returns the half index of the bins in this radon transform.
| radtra | radon transform for which the half index is to be returned. |
Definition at line 169 of file radon.c.
Referenced by radonBackTransform(), radonBackTransformEA(), radonFwdTransform(), radonFwdTransformEA(), radonSetBases(), radonSetBasesEA(), and radonSetLUT().
| int radonGetID | ( | RADON * | radtra | ) |
Returns the image dimension in this radon transform.
| radtra | radon transform for which the image dimension is to be returned. |
Definition at line 128 of file radon.c.
Referenced by radonBackTransform(), radonBackTransformEA(), radonBackTransformSA(), radonFwdTransform(), radonFwdTransformEA(), radonFwdTransformSA(), radonSetBases(), radonSetBasesEA(), radonSetLORS(), and radonSetLUT().
| int radonGetMO | ( | RADON * | radtra | ) |
Returns the discretization model of this radon transform.
| radtra | radon transform for which the mode is to be returned. |
Definition at line 119 of file radon.c.
Referenced by radonBackTransform(), radonBackTransformSA(), radonFwdTransform(), radonFwdTransformSA(), radonSetBases(), and radonSetBasesEA().
| int radonGetNB | ( | RADON * | radtra | ) |
Returns the number of bins in this radon transform.
| radtra | radon transform for which the number of bins is to be returned. |
Definition at line 148 of file radon.c.
Referenced by radonBackTransform(), radonBackTransformEA(), radonBackTransformSA(), radonFwdTransform(), radonFwdTransformEA(), radonFwdTransformSA(), radonSetBases(), radonSetBasesEA(), radonSetLORS(), and radonSetLUT().
| int radonGetNV | ( | RADON * | radtra | ) |
Returns the number of views in this radon transform.
| radtra | radon transform for which the number of views is to be returned. |
Definition at line 138 of file radon.c.
Referenced by radonBackTransform(), radonBackTransformEA(), radonBackTransformSA(), radonFwdTransform(), radonFwdTransformEA(), radonFwdTransformSA(), radonSetBases(), radonSetBasesEA(), radonSetLORS(), and radonSetLUT().
| float radonGetSD | ( | RADON * | radtra | ) |
Returns the sample distance in this radon transform.
| radtra | radon transform for which the sample distance is to be returned. |
Definition at line 159 of file radon.c.
Referenced by radonBackTransform(), radonBackTransformEA(), radonFwdTransform(), radonFwdTransformEA(), radonSetBases(), radonSetBasesEA(), and radonSetLUT().
| float radonGetSin | ( | RADON * | radtra, |
| int | nr ) |
Returns the sine for given angle (index).
| radtra | radon transform for which the sine is to be returned. |
| nr | index of the angle to be returned (angle=nr*pi/radonGetNB(RADON)). |
Definition at line 192 of file radon.c.
Referenced by radonBackTransform(), radonBackTransformEA(), radonBackTransformSA(), radonFwdTransform(), radonFwdTransformEA(), radonFwdTransformSA(), radonSetBases(), and radonSetBasesEA().
| int radonSet | ( | RADON * | radtra, |
| int | mode, | ||
| int | imgDim, | ||
| int | viewNr, | ||
| int | binNr ) |
Sets the data for the 2-D Radon transform.
| radtra | radon transform for which the paramaters are to be set |
| mode | discretisation mode |
| imgDim | image dimension |
| viewNr | Number of views (angles) |
| binNr | Number of bins (distances) |
Definition at line 62 of file radon.c.
Sets the coordinates and factors for intersected pixels according to given special Radon transform operator for every coincidence line in the BASE set. Base set includes coincidence lines in range [0,pi/4].
| radtra | special Radon transform operator. |
| elli | field of view. |
| mat | pointer to the datastructure where coordinates and values are to be stored. |
Definition at line 2602 of file radon.c.
Same as 'radonSetBases()' but discretisation model in this function is 'exact area'.
| radtra | special Radon transform operator. |
| elli | field of view. |
| mat | pointer to the datastructure where coordinates and values are to be stored. |
Definition at line 2984 of file radon.c.
Sets the coordinates and factors for intersected pixels according to given special Radon transform operator for EVERY line of response.
| radtra | special Radon transform operator. |
| elli | field of view. |
| mat | pointer to the datastructure where coordinates and values are stored for the base lines. |
Definition at line 3925 of file radon.c.
Sets a look-up table containing coordinates of lines of response intersecting pixels inside a field of view. Lines of response contributing to a pixel are searched from already set projection matrix.
| radtra | special Radon transform operator. |
| elli | field of view. |
| mat | pointer to the datastructure where coordinates and values are to be stored. |
Definition at line 3719 of file radon.c.
| int RADON_VERBOSE |
Drive in verbose mode if not 0.
Definition at line 13 of file radon.c.
Referenced by radonBackTransformEA(), radonEmpty(), radonFwdTransform(), radonFwdTransformEA(), and radonSet().