STIR 6.5.0
stir::ForwardProjectorByBinNiftyPET Class Reference

Class for NiftyPET's GPU forward projector. More...

#include "stir/recon_buildblock/NiftyPET_projector/ForwardProjectorByBinNiftyPET.h"

Inheritance diagram for stir::ForwardProjectorByBinNiftyPET:

Public Member Functions

 ForwardProjectorByBinNiftyPET ()
 Default constructor calls reset_timers().
virtual ~ForwardProjectorByBinNiftyPET ()
 Constructor.
virtual void initialise_keymap ()
 Keymap.
virtual void set_up (const shared_ptr< const ProjDataInfo > &proj_data_info_ptr, const shared_ptr< const DiscretisedDensity< 3, float > > &density_info_sptr)
 Stores all necessary geometric info.
virtual const DataSymmetriesForViewSegmentNumbers * get_symmetries_used () const
 Symmetries not used, so returns TrivialDataSymmetriesForBins.
virtual void set_input (const DiscretisedDensity< 3, float > &)
 Set input.
void set_verbosity (const bool verbosity)
 Set verbosity.
void set_use_truncation (const bool use_truncation)
 Set use truncation - truncate before forward projection and after back projection.
Public Member Functions inherited from stir::RegisteredParsingObject< ForwardProjectorByBinNiftyPET, ForwardProjectorByBin >
std::string get_registered_name () const override
 Returns Derived::registered_name.
std::string parameter_info () override
 Returns a string with all parameters and their values, in a form suitable for parsing again.
Public Member Functions inherited from stir::ForwardProjectorByBin
 ForwardProjectorByBin ()
 Default constructor calls reset_timers().
void forward_project (ProjData &, const DiscretisedDensity< 3, float > &, int subset_num=0, int num_subsets=1, bool zero=true)
 project the volume into the whole or a subset of proj_data, optionally zeroing the rest
virtual void forward_project (ProjData &, int subset_num=0, int num_subsets=1, bool zero=true)
 project the volume into the whole proj_data
void forward_project (RelatedViewgrams< float > &)
 project the volume into the viewgrams
void forward_project (RelatedViewgrams< float > &, const int min_axial_pos_num, const int max_axial_pos_num)
void forward_project (RelatedViewgrams< float > &, const int min_axial_pos_num, const int max_axial_pos_num, const int min_tangential_pos_num, const int max_tangential_pos_num)
void set_pre_data_processor (shared_ptr< DataProcessor< DiscretisedDensity< 3, float > > > pre_data_processor_sptr)
 Set data processor to use before forward projection. MUST BE CALLED BEFORE SET_INPUT.
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)
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 ()

Static Public Attributes

static const char *const registered_name = "NiftyPET"
 Name which will be used when parsing a ForwardProjectorByBin object.

Protected Member Functions

virtual void actual_forward_project (RelatedViewgrams< float > &, const DiscretisedDensity< 3, float > &, const int min_axial_pos_num, const int max_axial_pos_num, const int min_tangential_pos_num, const int max_tangential_pos_num)
 This virtual function has to be implemented by the derived class.
virtual void actual_forward_project (RelatedViewgrams< float > &viewgrams, const int min_axial_pos_num, const int max_axial_pos_num, const int min_tangential_pos_num, const int max_tangential_pos_num)
Protected Member Functions inherited from stir::ForwardProjectorByBin
virtual void check (const ProjDataInfo &proj_data_info) const
 check if the argument is the same as what was used for set_up()
virtual void check (const ProjDataInfo &proj_data_info, const DiscretisedDensity< 3, float > &density_info) const
 check if the arguments are the same as what was used for set_up()
void set_defaults () override
 Set defaults before parsing.
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.

Additional Inherited Members

Static Public Member Functions inherited from stir::RegisteredParsingObject< ForwardProjectorByBinNiftyPET, ForwardProjectorByBin >
static ForwardProjectorByBin * read_from_stream (std::istream *)
 Construct a new object (of type Derived) by parsing the istream.
Static Public Member Functions inherited from stir::RegisteredObject< ForwardProjectorByBin >
static ForwardProjectorByBin * 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 ForwardProjectorByBin * 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< ForwardProjectorByBin >
typedef ForwardProjectorByBin *(*) 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.
Static Protected Member Functions inherited from stir::RegisteredObject< ForwardProjectorByBin >
static RegistryType & registry ()
 Static function returning the registry.
Protected Attributes inherited from stir::ForwardProjectorByBin
bool _already_set_up
shared_ptr< DiscretisedDensity< 3, float > > _density_sptr
 The density ptr set with set_up().
shared_ptr< DataProcessor< DiscretisedDensity< 3, float > > > _pre_data_processor_sptr
shared_ptr< const ProjDataInfo > _proj_data_info_sptr
 ProjDataInfo set by set_up().
KeyParser parser

Detailed Description

Class for NiftyPET's GPU forward projector.

Only applicable for mMR data. Current limitations:

  • Projects all of the data in one go
  • Only debugged for span 11.

Constructor & Destructor Documentation

◆ ForwardProjectorByBinNiftyPET()

stir::ForwardProjectorByBinNiftyPET::ForwardProjectorByBinNiftyPET ( )

Default constructor calls reset_timers().

References ForwardProjectorByBinNiftyPET().

Referenced by ForwardProjectorByBinNiftyPET().

Member Function Documentation

◆ initialise_keymap()

void stir::ForwardProjectorByBinNiftyPET::initialise_keymap ( )
virtual

Keymap.

Reimplemented from stir::ForwardProjectorByBin.

◆ set_up()

void stir::ForwardProjectorByBinNiftyPET::set_up ( const shared_ptr< const ProjDataInfo > & proj_data_info_ptr,
const shared_ptr< const DiscretisedDensity< 3, float > > & density_info_sptr )
virtual

Stores all necessary geometric info.

If necessary, set_up() can be called more than once.

Derived classes can assume that forward_project() will be called with input corresponding to the arguments of the last call to set_up().

Warning
there is currently no check on this.
Derived classes have to call set_up from the base class.

Implements stir::ForwardProjectorByBin.

References stir::ForwardProjectorByBin::_density_sptr, stir::ForwardProjectorByBin::check(), stir::error(), stir::ProjDataInMemory::ProjDataInMemory(), and stir::ForwardProjectorByBin::set_up().

◆ get_symmetries_used()

const DataSymmetriesForViewSegmentNumbers * stir::ForwardProjectorByBinNiftyPET::get_symmetries_used ( ) const
virtual

Symmetries not used, so returns TrivialDataSymmetriesForBins.

Implements stir::ForwardProjectorByBin.

References stir::error().

◆ set_input()

void stir::ForwardProjectorByBinNiftyPET::set_input ( const DiscretisedDensity< 3, float > & density)
virtual

◆ actual_forward_project() [1/2]

void stir::ForwardProjectorByBinNiftyPET::actual_forward_project ( RelatedViewgrams< float > & ,
const DiscretisedDensity< 3, float > & ,
const int min_axial_pos_num,
const int max_axial_pos_num,
const int min_tangential_pos_num,
const int max_tangential_pos_num )
protectedvirtual

This virtual function has to be implemented by the derived class.

Reimplemented from stir::ForwardProjectorByBin.

◆ actual_forward_project() [2/2]

void stir::ForwardProjectorByBinNiftyPET::actual_forward_project ( RelatedViewgrams< float > & viewgrams,
const int min_axial_pos_num,
const int max_axial_pos_num,
const int min_tangential_pos_num,
const int max_tangential_pos_num )
protectedvirtual

Reimplemented from stir::ForwardProjectorByBin.


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