STIR 6.4.0
demo4_obj_fun.cxx File Reference

An example of a method to compute the objective function value of an image and then perform basic iterative gradient ascent. All parameters are parsed from a parameter file. More...

Namespaces

namespace  stir
 Namespace for the STIR library (and some/most of its applications)
 

Functions

int main (int argc, char **argv)
 

Detailed Description

An example of a method to compute the objective function value of an image and then perform basic iterative gradient ascent. All parameters are parsed from a parameter file.

It illustrates

  • basic class derivation principles
  • how to use stir::ParsingObject to have automatic capabilities of parsing parameters files (and interactive questions to the user)
  • how to initialise and setup a objective function object
  • how to compute the objective function (log-likelihood) gradient
  • how a basic iterative optimisation works (or may not, if parameters are altered)

Note that the same functionality could be provided without deriving a new class from stir::ParsingObject. One could have a stir::KeyParser object in main() and fill it in directly.

See README.txt in the directory where this file is located.

Author
Kris Thielemans and Robert Twyman