STIR  6.2.0
Public Member Functions | Protected Member Functions | List of all members
stir::LmToProjDataWithRandomRejection< LmToProjDataT > Class Template Reference

Class for binning list mode data into projection data using the bootstrap procedure. More...

#include "stir/listmode/LmToProjDataWithRandomRejection.h"

Inherits LmToProjDataT.

Public Member Functions

 LmToProjDataWithRandomRejection (const char *const par_filename)
 Constructor that parses from a file.
 
 LmToProjDataWithRandomRejection (const char *const par_filename, const unsigned int seed)
 Constructor that parses from a file but with explicit seed. More...
 
float set_reject_if_above (const float)
 
Succeeded set_up () override
 

Protected Member Functions

void start_new_time_frame (const unsigned int new_frame_num) override
 will be called when a new time frame starts More...
 
void get_bin_from_event (Bin &bin, const ListEvent &) const override
 

Protected Attributes

unsigned int seed
 used to seed the pseudo-random number generator More...
 
float reject_if_above
 

Detailed Description

template<typename LmToProjDataT>
class stir::LmToProjDataWithRandomRejection< LmToProjDataT >

Class for binning list mode data into projection data using the bootstrap procedure.

The bootstrap method allows estimating the variance of an estimator based on a single data-set (magic!). This class can be used to generate multiple equivalent projdata, which can then be reconstructed. The sample variance computed on these images will be an estimate of the variance on the reconstructions.

For list mode data, bootstrapping works by selecting random events from the list mode file with replication (i.e. some events will occur more than once, other events will not occur at all).

There are various papers on the bootstrap method. For PET data, it was for example applied by I. Buvat. (TODO add references)

The pseudo-random number generator used is boost::mt19937 which should be good enough for most purposes. However, it can be easily replaced by any generator that follows the boost conventions.

Parsing
This class implements just one keyword in addition to those made available by its base type.
; an unsigned int (but not 0) to seed the pseudo-random number generator
seed := 42 ; default value
Notes for developers

This class is templated in terms of a LmToProjDataT to allow it to be used with different derived classes of LmToProjData. After all, the bootstrapping mechanism does not depend on how LmToProjData actually works.

Constructor & Destructor Documentation

◆ LmToProjDataWithRandomRejection()

template<typename LmToProjDataT >
stir::LmToProjDataWithRandomRejection< LmToProjDataT >::LmToProjDataWithRandomRejection ( const char *const  par_filename,
const unsigned int  seed 
)

Constructor that parses from a file but with explicit seed.

The seed argument will override any value found in the par file

References stir::error(), and stir::warning().

Member Function Documentation

◆ start_new_time_frame()

template<typename LmToProjDataT >
void stir::LmToProjDataWithRandomRejection< LmToProjDataT >::start_new_time_frame ( const unsigned int  new_frame_num)
overrideprotected

will be called when a new time frame starts

Initialises a vector with the number of times each event has to be replicated

References stir::Bin::set_bin_value().

Member Data Documentation

◆ seed

template<typename LmToProjDataT>
unsigned int stir::LmToProjDataWithRandomRejection< LmToProjDataT >::seed
protected

used to seed the pseudo-random number generator

should be non-zero


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