Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

radon.h File Reference

#include "ellipse.h"
#include "prmat.h"

Go to the source code of this file.

Defines

#define RADON_STATUS_UNINITIALIZED   0
 Status uninitialized.
#define RADON_STATUS_INITIALIZED   1
 Status initialized.
#define RADON_STATUS_OCCUPIED   2
 Status occupied.
#define RADON_STATUS_ERROR   3
 Status error.

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 *imgdata, float *scndata)
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.


Define Documentation

#define RADON_STATUS_ERROR   3
 

Status error.

#define RADON_STATUS_INITIALIZED   1
 

Status initialized.

#define RADON_STATUS_OCCUPIED   2
 

Status occupied.

#define RADON_STATUS_UNINITIALIZED   0
 

Status uninitialized.


Function Documentation

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. INITIAL: scndata contains the projections in v x b lines of response. END: scndata is mapped into the cartesian space.

Parameters:
RADON *radtra contains an initialized radon transform object.
int set tells which set is to be utilized; 0 < set < setNr-1
int setNr number of subsets
float *scndata v x b vector contains the projections.
float *imgdata n x n vector for storing the back-projection.
Returns:
int 0 if ok

int radonBackTransformEA RADON radtra,
int  set,
int  setNr,
float *  scndata,
float *  imgdata
 

Same as 'radonBackTransform()' but discretisation model in this function is 'exact area'.

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. INITIAL: scndata contains the projections with v x b lines of response. END: scndata is mapped into the cartesian space.

Parameters:
RADON *radtra contains an initialized radon transform object.
int set tells which set is to be utilized; 0 < set < setNr-1
int setNr number of subsets
float *scndata v x b vector contains the projections.
float *imgdata n x n vector for storing the back-projection.
Returns:
int 0 if ok

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. NOTE: first written by Sakari Alenius 1998.

void radonEmpty RADON radtra  ) 
 

Frees the memory allocated for radon transform. All data is cleared. INITIAL: . END: radon transform is emptied.

Parameters:
RADON *radtra pointer to transform data to be emptied

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. INITIAL: imgdata contains pixel values for every pixel in dim*dim image grid END: imgdata is mapped into the projection space.

Parameters:
RADON *radtra contains an initialized radon transform object.
int set tells which set is to be utilized; 0 < set < setNr-1
int setNr number of subsets
float *imgdata contains pixel values for every pixel in dim*dim image grid
float *scndata viewNr*binNr vector for storing the projection
Returns:
int 0 if ok

int radonFwdTransformEA RADON radtra,
int  set,
int  setNr,
float *  imgdata,
float *  scndata
 

Same as 'radonFwdTransform()' but discretisation model in this function is 'exact area'.

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. INITIAL: imgdata contains pixel values for every pixel in n x n image grid END: imgdata is mapped into the projection space.

Parameters:
PRMAT *mat contains an initialised projection matrix
int set tells which set is to be utilized; 0 < set < setNr-1
int setNr number of subsets (spacing between indices)
float *imgdata contains pixel values for every pixel in dim*dim image grid
float *scndata viewNr*binNr vector for storing the projection
Returns:
int 0 if ok

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. NOTE: first written by Sakari Alenius 1998.

int radonGetCB RADON radtra  ) 
 

Returns the center bin in this radon transform.

Parameters:
RADON *radtra radon transform for which the center bin is to be returned
Returns:
int index of the center bin

int radonGetHI RADON radtra  ) 
 

Returns the half index of the bins in this radon transform.

Parameters:
RADON *radtra radon transform for which the half index is to be returned
Returns:
int half index of the bins

int radonGetID RADON radtra  ) 
 

Returns the image dimension in this radon transform.

Parameters:
RADON *radtra radon transform for which the image dimension is to be returned
Returns:
int image dimension

int radonGetMO RADON radtra  ) 
 

Returns the discretization model of this radon transform.

Parameters:
RADON *radtra radon transform for which the mode is to be returned.
Returns:
int mode

int radonGetNB RADON radtra  ) 
 

Returns the number of bins in this radon transform.

Parameters:
RADON *radtra radon transform for which the number of bins is to be returned
Returns:
int number of bins

int radonGetNV RADON radtra  ) 
 

Returns the number of views in this radon transform

Parameters:
RADON *radtra radon transform for which the number of views is to be returned
Returns:
int number of views

float radonGetSD RADON radtra  ) 
 

Returns the sample distance in this radon transform.

Parameters:
RADON *radtra radon transform for which the sample distance is to be returned
Returns:
float sample distance

float radonGetSin RADON radtra,
int  nr
 

Returns the sine for given angle (index).

Parameters:
RADON *radtra radon transform for which the sine is to be returned
int nr index of the angle to be returned (angle=nr*pi/radonGetNB(RADON))
Returns:
float sin(nr*pi/binNr)

int radonSet RADON radtra,
int  mode,
int  imgDim,
int  viewNr,
int  binNr
 

Sets the data for the 2-D Radon transform. INITIAL: dim > 0 END: Parameters for the radon transform are set

Parameters:
RADON *radtra radon transform for which the paramaters are to be set
int mode discretisation mode
int imgDim image dimension
int viewNr Number of views (angles)
int binNr Number of bins (distances)
Returns:
0 if ok

int radonSetBases RADON radtra,
ELLIPSE elli,
PRMAT mat
 

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]. INITIAL: radtra is a radon transform operator && elli defines a field of view && mat is initialized. END: coordinates and factors for pixels contributing to coincidence lines in the base set.

Parameters:
RADON *radtra special Radon transform operator.
ELLIPSE *elli field of view.
PRMAT *mat pointer to the datastructure where coordinates and values are to be stored.
Returns:
0 if ok.

int radonSetBasesEA RADON radtra,
ELLIPSE elli,
PRMAT mat
 

Same as 'radonSetBases()' but discretisation model in this function is 'exact area'.

int radonSetLORS RADON radtra,
ELLIPSE elli,
PRMAT mat
 

Sets the coordinates and factors for intersected pixels according to given special Radon transform operator for EVERY line of response. INITIAL: radtra is a radon transform operator && elli defines a field of view && mat is initialized. END: coordinates and factors for pixels contributing to all lines of response are set.

Parameters:
RADON *radtra special Radon transform operator.
ELLIPSE *elli field of view.
PRMAT *mat pointer to the datastructure where coordinates and values are stored for the base lines.
Returns:
0 if ok.

int radonSetLUT RADON radtra,
ELLIPSE elli,
PRMAT mat
 

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. INITIAL: radtra is a radon transform operator && elli defines a field of view && projections are set in structure mat. END: coordinates of lines response intersecting a pixel are set in a table.

Parameters:
RADON *radtra special Radon transform operator.
ELLIPSE *elli field of view.
PRMAT *mat pointer to the datastructure where coordinates and values are to be stored.
Returns:
0 if ok.


Variable Documentation

int RADON_TEST
 

Drive in test mode if not 0.

int RADON_VERBOSE
 

Drive in verbose mode if not 0.


Generated on Tue Nov 29 15:16:10 2005 by  doxygen 1.4.1