Menu

astra_mex_algorithm

Willem Jan Palenstijn

astra_mex_algorithm is used to manage and run algorithm objects. It is a wrapper around the MEX file astra_mex_algorithm_c.

astra_mex_algorithm contains the following commands.

create

~~~~:::matlab
id = astra_mex_algorithm('create', cfg);

This creates an algorithm object from a configuration struct.
The config struct is created with

~~~~:::matlab
 cfg = astra_struct('NAME');

where NAME is the name of the algorithm. See the pages on [2D CPU Algorithms], [2D GPU Algorithms], [3D GPU Algorithms] for available algorithms, and the pages for the individual algorithms for the options they support.

run / iterate

~~~~:::matlab
astra_mex_algorithm('run', id)
astra_mex_algorithm('iterate', id, iterations)

This runs the algorithm object specified by id. For iterative
algorithms, the iterations argument specifies the number of iterations
to run. The number of iterations defaults to 0. For non-iterative algorithms,
the number of iterations is ignored entirely.

Note: run and iterate are actually synonyms in astra_mex_algorithms and may
be used interchangeably.

## get_res_norm
~~~~:::matlab
 x = astra_mex_algorithm('get_res_norm', id);

This not supported by all algorithms. Support is listed on the individual algorithm pages in this reference guide.

If available, return the norm of the difference between the projection data and the forward projection of the (current) reconstruction.

If not available, get_res_norm gives an error message.

delete

~~~~:::matlab
astra_mex_algorithm('delete', id)

Free a single algorithm and any temporary memory it has allocated.
For GPU/CUDA algorithms, this also frees the GPU memory allocated for
this algorithm object.

## clear
~~~~:::matlab
 astra_mex_algorithm('clear')

Free all algorithms.

info

~~~~:::matlab
astra_mex_algorithm('info')
~~~~

Print basic information about all allocated algorithm objects.


Related

Documentation: 2D CPU Algorithms
Documentation: 2D GPU Algorithms
Documentation: 3D GPU Algorithms
Documentation: Introduction

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.