STIR  6.2.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
stir::ProjDataRebinning Class Referenceabstract

base class for all rebinning algorithms for 3D PET dataTODO describe what rebinning is and why you need it More...

#include "stir/recon_buildblock/ProjDataRebinning.h"

Inheritance diagram for stir::ProjDataRebinning:
Inheritance graph
[legend]

Public Member Functions

 ~ProjDataRebinning () override
 virtual destructor
 
virtual std::string method_info () const =0
 gives method information
 
virtual Succeeded rebin ()=0
 executes the rebinning More...
 
void set_input_proj_data_sptr (const shared_ptr< ProjData > &)
 set projection data that will be rebinned More...
 
shared_ptr< ProjDataget_proj_data_sptr ()
 
virtual Succeeded set_up ()
 operations prior to the rebinning
 
get/set the number of segments to process
void set_max_segment_num_to_process (int ns)
 
int get_max_segment_num_to_process () const
 
void set_output_filename_prefix (const std::string &s)
 
std::string get_output_filename_prefix () const
 
- 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 More...
 
void start_timers (bool do_reset=false) const
 start all timers kept by this object More...
 
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::RegisteredObjectBase
virtual std::string get_registered_name () const =0
 Returns the name of the type of the object. More...
 
- Public Member Functions inherited from stir::ParsingObject
 ParsingObject (const ParsingObject &)
 
ParsingObjectoperator= (const ParsingObject &)
 
void ask_parameters ()
 
virtual std::string parameter_info ()
 
bool parse (std::istream &f)
 
bool parse (const char *const filename)
 

Protected Member Functions

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.
 
- Protected Member Functions inherited from stir::ParsingObject
virtual void set_key_values ()
 This will be called before parsing or parameter_info is called. More...
 

Protected Attributes

std::string output_filename_prefix
 file name for output projdata (should be without extension)
 
std::string input_filename
 file name for input projdata
 
int max_segment_num_to_process
 the maximum absolute segment number to use in the reconstruction More...
 
shared_ptr< ProjDataproj_data_sptr
 
- Protected Attributes inherited from stir::ParsingObject
KeyParser parser
 

Additional Inherited Members

- Static Public Member Functions inherited from stir::RegisteredObject< ProjDataRebinning >
static ProjDataRebinningread_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. More...
 
static ProjDataRebinningask_type_and_parameters ()
 ask the user for the type, and then calls read_registered_object(0, type) More...
 
static void list_registered_names (std::ostream &stream)
 List all possible registered names to the stream. More...
 
- Protected Types inherited from stir::RegisteredObject< ProjDataRebinning >
typedef ProjDataRebinning *(* 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< ProjDataRebinning >
static RegistryTyperegistry ()
 Static function returning the registry. More...
 

Detailed Description

base class for all rebinning algorithms for 3D PET data

TODO describe what rebinning is and why you need it

Usage

The utility rebin_projdata provides the user interface to this class. What follows is for developers.

Parameters need to be initialised somehow. This is usually done using the parse() member functions (see ParsingObject). For some parameters, set_some_parameter() methods are provided.

Normal usage is for example as follows

shared_ptr<ProjDataRebinning> rebinning_sptr;
// set parameters somehow
if (rebinning_sptr->set_up()!= Succeeded::yes)
error("Disaster. Presumably data are inconsistent")
if (rebinning_sptr->rebin()!= Succeeded::yes)
error("Disaster. Presumably run-time error or so");
Info for developers

For convenience, the class is derived from TimedObject. It is the responsibility of the derived class to run these timers though.

Todo:
there should be a method to rebin the data without writing the result to disk

Member Function Documentation

◆ rebin()

virtual Succeeded stir::ProjDataRebinning::rebin ( )
pure virtual

executes the rebinning

At the end of the rebinning, the final 2D projection data are saved to file as given in output_filename_prefix.

Returns
Succeeded::yes if everything was alright.

Implemented in stir::FourierRebinning.

◆ set_output_filename_prefix()

void stir::ProjDataRebinning::set_output_filename_prefix ( const std::string &  s)

get/set file name for output projdata (should be without extension)

◆ set_input_proj_data_sptr()

void stir::ProjDataRebinning::set_input_proj_data_sptr ( const shared_ptr< ProjData > &  new_proj_data_sptr)

set projection data that will be rebinned

Usually this will be set via a call to parse()

Member Data Documentation

◆ max_segment_num_to_process

int stir::ProjDataRebinning::max_segment_num_to_process
protected

the maximum absolute segment number to use in the reconstruction

convention: if -1, use get_max_segment_num()


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