STIR 6.4.0
stir::ProjMatrixByDensel Class Referenceabstract

This is the (abstract) base class for all projection matrices which are organised by 'Densel'. More...

#include "stir_experimental/recon_buildblock/ProjMatrixByDensel.h"

Inheritance diagram for stir::ProjMatrixByDensel:

Public Member Functions

virtual void set_up (const shared_ptr< const ProjDataInfo > &proj_data_info_ptr, const shared_ptr< const DiscretisedDensity< 3, float > > &density_info_ptr)=0
 To be called before any calculation is performed.
 
virtual const DataSymmetriesForDenselsget_symmetries_ptr () const =0
 get a pointer to an object encoding all symmetries that are used by this ProjMatrixByDensel
 
void get_proj_matrix_elems_for_one_densel (ProjMatrixElemsForOneDensel &, const Densel &) const
 The main method for getting a column of the matrix.
 
void enable_cache (bool v)
 
- 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 &)
 
ParsingObjectoperator= (const ParsingObject &)
 
bool parse (std::istream &f)
 
bool parse (const char *const filename)
 
void ask_parameters ()
 
virtual std::string parameter_info ()
 

Protected Member Functions

 ProjMatrixByDensel ()
 default ctor (enables caching)
 
virtual void calculate_proj_matrix_elems_for_one_densel (ProjMatrixElemsForOneDensel &) const =0
 This method needs to be implemented in the derived class.
 
Succeeded get_cached_proj_matrix_elems_for_one_densel (ProjMatrixElemsForOneDensel &) const
 The method that tries to get data from the cache.
 
void cache_proj_matrix_elems_for_one_densel (const ProjMatrixElemsForOneDensel &) const
 The method to store data in the cache.
 
virtual void set_defaults ()
 Set defaults before parsing.
 
virtual void initialise_keymap ()
 Initialise all keywords.
 
virtual bool post_processing ()
 This will be called at the end of the parsing.
 
virtual void set_key_values ()
 This will be called before parsing or parameter_info is called.
 

Protected Attributes

bool cache_disabled
 
KeyParser parser
 

Additional Inherited Members

- Static Public Member Functions inherited from stir::RegisteredObject< ProjMatrixByDensel >
static ProjMatrixByDenselread_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 ProjMatrixByDenselask_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< ProjMatrixByDensel >
typedef ProjMatrixByDensel *(* 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_lessRegistryType
 The type of the registry.
 
- Static Protected Member Functions inherited from stir::RegisteredObject< ProjMatrixByDensel >
static RegistryTyperegistry ()
 Static function returning the registry.
 

Detailed Description

This is the (abstract) base class for all projection matrices which are organised by 'Densel'.

This class provides essentially only 2 public members: a method to get a 'row' of the matrix, and a method to get information on the symmetries.

Currently, the class provides for some (basic) caching. This functionality will probably be moved to a new class ProjMatrixByDenselWithCache. (TODO)

Member Function Documentation

◆ set_up()

virtual void stir::ProjMatrixByDensel::set_up ( const shared_ptr< const ProjDataInfo > & proj_data_info_ptr,
const shared_ptr< const DiscretisedDensity< 3, float > > & density_info_ptr )
pure virtual

To be called before any calculation is performed.

Note that get_proj_matrix_elems_for_one_Densel() will expect objects of compatible sizes and other info.

Implemented in stir::ProjMatrixByDenselOnCartesianGridUsingElement, and stir::ProjMatrixByDenselUsingRayTracing.

◆ get_symmetries_ptr()

virtual const DataSymmetriesForDensels * stir::ProjMatrixByDensel::get_symmetries_ptr ( ) const
pure virtual

get a pointer to an object encoding all symmetries that are used by this ProjMatrixByDensel

Implemented in stir::ProjMatrixByDenselUsingRayTracing.

References get_proj_matrix_elems_for_one_densel().

Referenced by get_cached_proj_matrix_elems_for_one_densel(), and get_proj_matrix_elems_for_one_densel().

◆ get_proj_matrix_elems_for_one_densel()

void stir::ProjMatrixByDensel::get_proj_matrix_elems_for_one_densel ( ProjMatrixElemsForOneDensel & probabilities,
const Densel & densel ) const
inline

The main method for getting a column of the matrix.

The ProjMatrixElemsForOneDensel argument will be overwritten (i.e. data is NOT appended).

The implementation is inline as it just gets it in terms of the cached__proj_matrix_elems_for_one_densel or calculate_proj_matrix_elems_for_one_densel.

References cache_proj_matrix_elems_for_one_densel(), calculate_proj_matrix_elems_for_one_densel(), stir::ProjMatrixElemsForOneDensel::check_state(), stir::ProjMatrixElemsForOneDensel::erase(), get_cached_proj_matrix_elems_for_one_densel(), get_proj_matrix_elems_for_one_densel(), get_symmetries_ptr(), and stir::ProjMatrixElemsForOneDensel::set_densel().

Referenced by get_proj_matrix_elems_for_one_densel(), and get_symmetries_ptr().

◆ calculate_proj_matrix_elems_for_one_densel()

virtual void stir::ProjMatrixByDensel::calculate_proj_matrix_elems_for_one_densel ( ProjMatrixElemsForOneDensel & ) const
protectedpure virtual

This method needs to be implemented in the derived class.

Densel-coordinates are obtained via the ProjMatrixElemsForOneDensel::get_Densel() method.

Note that 'calculate' could just as well mean 'get from file'

Implemented in stir::ProjMatrixByDenselOnCartesianGridUsingElement.

References cache_proj_matrix_elems_for_one_densel(), and get_cached_proj_matrix_elems_for_one_densel().

Referenced by get_proj_matrix_elems_for_one_densel().

◆ get_cached_proj_matrix_elems_for_one_densel()

Succeeded stir::ProjMatrixByDensel::get_cached_proj_matrix_elems_for_one_densel ( ProjMatrixElemsForOneDensel & probabilities) const
protected

The method that tries to get data from the cache.

If it succeeds, it overwrites the ProjMatrixElemsForOneDensel parameter and returns Succeeded::yes, otherwise it does not touch the ProjMatrixElemsForOneDensel and returns Succeeded::false.

References get_cached_proj_matrix_elems_for_one_densel(), stir::ProjMatrixElemsForOneDensel::get_densel(), and get_symmetries_ptr().

Referenced by calculate_proj_matrix_elems_for_one_densel(), get_cached_proj_matrix_elems_for_one_densel(), and get_proj_matrix_elems_for_one_densel().

◆ cache_proj_matrix_elems_for_one_densel()

void stir::ProjMatrixByDensel::cache_proj_matrix_elems_for_one_densel ( const ProjMatrixElemsForOneDensel & probabilities) const
inlineprotected

The method to store data in the cache.

insert matrix elements for one densel into the cache collection

References cache_proj_matrix_elems_for_one_densel(), and stir::ProjMatrixElemsForOneDensel::get_densel().

Referenced by cache_proj_matrix_elems_for_one_densel(), calculate_proj_matrix_elems_for_one_densel(), and get_proj_matrix_elems_for_one_densel().


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