STIR 6.5.0
stir::AnalyticReconstruction Class Referenceabstract

base class for all analytic reconstruction algorithmsThis class provides extra functinoality (compared to Reconstruction) as it assumes that the TargetT is really a VoxelsOnCartesianGrid. More...

#include "stir/recon_buildblock/AnalyticReconstruction.h"

Inheritance diagram for stir::AnalyticReconstruction:

Public Types

typedef DiscretisedDensity< 3, float > TargetT

Public Member Functions

virtual DiscretisedDensity< 3, float > * construct_target_image_ptr () const
 construct an image from parameters set (e.g. during parsing)
Succeeded reconstruct () override
 reconstruct and write to file
Succeeded reconstruct (shared_ptr< TargetT > const &target_image_sptr) override
 executes the reconstruction storing result in target_image_sptr
void set_input_data (const shared_ptr< ExamData > &) override
 set input data
const ProjData & get_input_data () const override
 get input data
Public Member Functions inherited from stir::Reconstruction< DiscretisedDensity< 3, float > >
 Reconstruction ()
 default constructor (calls set_defaults())
 ~Reconstruction () override
 virtual destructor
virtual std::string method_info () const=0
 gives method information
virtual Succeeded set_up (shared_ptr< DiscretisedDensity< 3, float > > const &target_data_sptr)
 operations prior to the reconstruction
void set_output_filename_prefix (const std::string &)
 file name for output reconstructed images
void set_output_file_format_ptr (const shared_ptr< OutputFileFormat< DiscretisedDensity< 3, float > > > &)
 defines the format of the output files
void set_post_processor_sptr (const shared_ptr< DataProcessor< DiscretisedDensity< 3, float > > > &)
 post-filter
void set_disable_output (bool _val)
 set_disable_output
shared_ptr< DiscretisedDensity< 3, float > > get_target_image ()
 get_reconstructed_image
Public Member Functions inherited from stir::RegisteredObjectBase
virtual std::string get_registered_name () const =0
 Returns the name of the type of the object.
Public Member Functions inherited from stir::ParsingObject
 ParsingObject (const ParsingObject &)
ParsingObject & operator= (const ParsingObject &)
bool parse (std::istream &f)
bool parse (const char *const filename)
void ask_parameters ()
virtual std::string parameter_info ()
Public Member Functions inherited from stir::TimedObject
void reset_timers ()
 reset all timers kept by this object
void stop_timers () const
 stop all timers kept by this object
void start_timers (bool do_reset=false) const
 start all timers kept by this object
double get_CPU_timer_value () const
 get current value of the CPU timer (since first use or last reset)
double get_wall_clock_timer_value () const
 get current value of the wall-clock timer (since first use or last reset)

forwarding functions for ParseDiscretisedDensityParameters

std::string input_filename
 the input projection data file name
int max_segment_num_to_process
 the maximum absolute ring difference number to use in the reconstruction
shared_ptr< ProjData > proj_data_ptr
 points to the object for the total input projection data
ParseAndCreateFrom< TargetT, ProjData > target_parameter_parser
int get_output_image_size_xy () const
void set_output_image_size_xy (int)
int get_output_image_size_z () const
void set_output_image_size_z (int)
float get_zoom_xy () const
void set_zoom_xy (float)
float get_zoom_z () const
void set_zoom_z (float)
const CartesianCoordinate3D< float > & get_offset () const
void set_offset (const CartesianCoordinate3D< float > &)
virtual Succeeded actual_reconstruct (shared_ptr< TargetT > const &target_image_sptr)=0
 executes the reconstruction storing result in target_image_sptr
bool post_processing () override
 used to check acceptable parameter ranges, etc...
void set_defaults () override
 Set defaults before parsing.
void initialise_keymap () override
 Initialise all keywords.

Additional Inherited Members

Static Public Member Functions inherited from stir::RegisteredObject< Reconstruction< DiscretisedDensity< 3, float > > >
static Reconstruction< DiscretisedDensity< 3, float > > * read_registered_object (std::istream *in, const std::string &registered_name)
 Construct a new object (of a type derived from Root, its actual type determined by the registered_name parameter) by parsing the istream.
static Reconstruction< DiscretisedDensity< 3, float > > * ask_type_and_parameters ()
 ask the user for the type, and then calls read_registered_object(0, type)
static void list_registered_names (std::ostream &stream)
 List all possible registered names to the stream.
Protected Types inherited from stir::RegisteredObject< Reconstruction< DiscretisedDensity< 3, float > > >
typedef Reconstruction< DiscretisedDensity< 3, float > > *(*) RootFactory(std::istream *)
 The type of a root factory is a function, taking an istream* as argument, and returning a Root*.
typedef FactoryRegistry< std::string, RootFactory, interfile_less > RegistryType
 The type of the registry.
virtual void check (DiscretisedDensity< 3, float > const &target_data) const
 do consistency checks
void initialise (const std::string &parameter_filename)
 This function initialises all parameters, either via parsing, or by calling ask_parameters() (when parameter_filename is the empty string).
void set_defaults () override
 Set defaults before parsing.
void initialise_keymap () override
 Initialise all keywords.
bool post_processing () override
 used to check acceptable parameters after parsing
virtual void set_key_values ()
 This will be called before parsing or parameter_info is called.
Static Protected Member Functions inherited from stir::RegisteredObject< Reconstruction< DiscretisedDensity< 3, float > > >
static RegistryType & registry ()
 Static function returning the registry.
std::string output_filename_prefix
 file name for output reconstructed images
shared_ptr< OutputFileFormat< DiscretisedDensity< 3, float > > > output_file_format_ptr
 defines the format of the output files
shared_ptr< DataProcessor< DiscretisedDensity< 3, float > > > post_filter_sptr
 post-filter
bool _already_set_up
shared_ptr< DiscretisedDensity< 3, float > > target_data_sptr
 target_data_sptr
bool _disable_output
 _disable_output
int _verbosity
 Verbosity level.
KeyParser parser

Detailed Description

base class for all analytic reconstruction algorithms

This class provides extra functinoality (compared to Reconstruction) as it assumes that the TargetT is really a VoxelsOnCartesianGrid.

Todo
Currently the template argument uses DiscretisedDensity because of conversion problems with stir::shared_ptr. Maybe it will be possible to correct this once we use boost:shared_ptr.

Member Function Documentation

◆ construct_target_image_ptr()

DiscretisedDensity< 3, float > * stir::AnalyticReconstruction::construct_target_image_ptr ( ) const
virtual

construct an image from parameters set (e.g. during parsing)

References construct_target_image_ptr(), and get_input_data().

Referenced by construct_target_image_ptr(), and reconstruct().

◆ reconstruct() [1/2]

◆ reconstruct() [2/2]

Succeeded stir::AnalyticReconstruction::reconstruct ( shared_ptr< TargetT > const & target_image_sptr)
override

executes the reconstruction storing result in target_image_sptr

Calls actual_reconstruct()

Returns
Succeeded::yes if everything was alright.
Developer\'s note

Because of C++ rules, overloading one of the reconstruct() functions in a derived class, hides the other. So, we need an implementation for this function. This is the reason to use the actual_reconstruct function.

References actual_reconstruct(), stir::Reconstruction< DiscretisedDensity< 3, float > >::check(), stir::error(), stir::info(), stir::Reconstruction< DiscretisedDensity< 3, float > >::post_filter_sptr, reconstruct(), stir::Reconstruction< DiscretisedDensity< 3, float > >::set_up(), stir::TimedObject::start_timers(), stir::TimedObject::stop_timers(), and stir::Reconstruction< DiscretisedDensity< 3, float > >::target_data_sptr.

◆ set_input_data()

void stir::AnalyticReconstruction::set_input_data ( const shared_ptr< ExamData > & arg)
overridevirtual

◆ get_input_data()

const ProjData & stir::AnalyticReconstruction::get_input_data ( ) const
overridevirtual

get input data

Will throw an exception if it wasn't set first

Implements stir::Reconstruction< DiscretisedDensity< 3, float > >.

References stir::error(), get_input_data(), and proj_data_ptr.

Referenced by construct_target_image_ptr(), and get_input_data().

◆ actual_reconstruct()

virtual Succeeded stir::AnalyticReconstruction::actual_reconstruct ( shared_ptr< TargetT > const & target_image_sptr)
protectedpure virtual

executes the reconstruction storing result in target_image_sptr

Returns
Succeeded::yes if everything was alright.

Implemented in stir::FBP3DRPReconstruction.

References initialise_keymap(), post_processing(), and set_defaults().

Referenced by reconstruct().

◆ post_processing()

bool stir::AnalyticReconstruction::post_processing ( )
overrideprotectedvirtual

◆ set_defaults()

void stir::AnalyticReconstruction::set_defaults ( )
overrideprotectedvirtual

◆ initialise_keymap()

void stir::AnalyticReconstruction::initialise_keymap ( )
overrideprotectedvirtual

Member Data Documentation

◆ input_filename

std::string stir::AnalyticReconstruction::input_filename
protected

the input projection data file name

Referenced by initialise_keymap(), post_processing(), and set_defaults().

◆ max_segment_num_to_process

int stir::AnalyticReconstruction::max_segment_num_to_process
protected

the maximum absolute ring difference number to use in the reconstruction

convention: if -1, use get_max_segment_num()

Referenced by stir::FBP3DRPReconstruction::actual_reconstruct(), stir::FBP3DRPReconstruction::do_3D_Reconstruction(), stir::FBP3DRPReconstruction::do_colsher_filter_view(), initialise_keymap(), and set_defaults().

◆ proj_data_ptr

shared_ptr<ProjData> stir::AnalyticReconstruction::proj_data_ptr
protected

The documentation for this class was generated from the following files: