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

Base class for reading listmode files from the PENNPet Explorer scanner. More...

#include "stir/IO/InputStreamWithRecordsFromUPENN.h"

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

Public Types

typedef std::vector< long long int >::size_type SavedPosition
 

Public Member Functions

unsigned long int get_total_number_of_events (CListRecordPENN &record)
 
virtual Succeeded create_output_file (const std::string ofilename)=0
 
virtual Succeeded set_up ()
 Must be called before calling for the first event.
 
virtual Succeeded get_next_record (CListRecordPENN &record)=0
 
virtual Succeeded reset ()=0
 go back to starting position
 
virtual SavedPosition save_get_position ()=0
 
virtual Succeeded set_get_position (const SavedPosition &)=0
 
std::vector< std::streampos > get_saved_get_positions () const
 
void set_saved_get_positions (const std::vector< std::streampos > &)
 
std::streambuf & get_stream ()
 
virtual void set_current_record ()=0
 
virtual void set_new_record (const bool &d, const short int &_dt, const unsigned short int &_xa, const unsigned short int &_xb, const unsigned short int &_za, const unsigned short int &_zb, const unsigned short int &_ea, const unsigned short int &_eb)=0
 
- 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

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. More...
 
- 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 filename
 
std::streampos starting_stream_position
 
std::vector< std::streampos > saved_get_positions
 
const uint8_t * current_record
 
int eventSize = 0
 
int low_energy_window = 0
 
int up_energy_window = 1000
 
int timeout = 0
 
long unsigned int N
 Total number of events.
 
long unsigned int abrupt_counter
 Stop after a predefined number of records, regardless of their type.
 
bool has_output = false
 This is a flag about a low lever function that replicates a listmode file preserving control records that are skipped in normal operations.
 
bool abrupt_stop
 This is a lower counter to abruptly stop the listmode file.
 
int minE_chan
 Minimum energy channel.
 
int maxE_chan
 Maximum energy channel.
 
bool keep_prompt
 In some processes it might be better to filter prompts and delayeds early.
 
bool keep_delayed
 In some processes it might be better to filter prompts and delayeds early.
 
- Protected Attributes inherited from stir::ParsingObject
KeyParser parser
 

Additional Inherited Members

- Static Public Member Functions inherited from stir::RegisteredObject< InputStreamWithRecordsFromUPENN >
static InputStreamWithRecordsFromUPENNread_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 InputStreamWithRecordsFromUPENNask_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< InputStreamWithRecordsFromUPENN >
typedef InputStreamWithRecordsFromUPENN *(* 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< InputStreamWithRecordsFromUPENN >
static RegistryTyperegistry ()
 Static function returning the registry. More...
 

Detailed Description

Base class for reading listmode files from the PENNPet Explorer scanner.

abrupt_stop is a lower level counter to make the listmode operations be more consistent on
how they process the total number of events. For example, if a file has 1M events (prompts + delay) and the user wishes to process 50% of the file. If in the e.g. lm_to_projdata sets 500K then each type of event (either prompt or delay) will continue until 500K events have been processed. This breaks the randoms' fraction. Setting the abrupt_stop to 500K, the InputStream will stop on the 500K^{th} event of either type.
Requirements
This needs access to the IRX libraries.

Member Function Documentation

◆ post_processing()

bool stir::InputStreamWithRecordsFromUPENN::post_processing ( )
protectedvirtual

This will be called at the end of the parsing.

Returns
false if everything OK, true if not

Reimplemented from stir::ParsingObject.

Reimplemented in stir::InputStreamWithRecordsFromUPENNbin, and stir::InputStreamWithRecordsFromUPENNtxt.


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