STIR  6.2.0
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
stir::InputStreamFromROOTFileForCylindricalPET Class Reference

Declaration of class stir::InputStreamFromROOTFileForCylindricalPET. More...

#include "stir/IO/InputStreamFromROOTFileForCylindricalPET.h"

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

Public Member Functions

 InputStreamFromROOTFileForCylindricalPET ()
 Default constructor.
 
Succeeded get_next_record (CListRecordROOT &record) override
 
Succeeded set_up (const std::string &header_path) override
 Must be called before calling for the first event.
 
virtual std::string method_info () const
 gives method information
 
int get_num_rings () const override
 Calculate the number of rings based on the crystal, module, submodule repeaters.
 
int get_num_dets_per_ring () const override
 Calculate the number of detectors per ring based on the crystal, module, submodule repeaters.
 
int get_num_axial_blocks_per_bucket_v () const override
 Get the number of axial modules.
 
int get_num_transaxial_blocks_per_bucket_v () const override
 Get the number of transaxial modules.
 
int get_num_axial_crystals_per_singles_unit () const override
 Calculate the number of axial crystals per singles unit based on the repeaters numbers and the readout deptth.
 
int get_num_trans_crystals_per_singles_unit () const override
 Calculate the number of trans crystals per singles unit based on the repeaters numbers and the readout deptth.
 
void set_submodule_repeater_x (int)
 
void set_submodule_repeater_y (int)
 
void set_submodule_repeater_z (int)
 
void set_module_repeater_x (int)
 
void set_module_repeater_y (int)
 
void set_module_repeater_z (int)
 
void set_rsector_repeater (int)
 
- Public Member Functions inherited from stir::RegisteredParsingObject< InputStreamFromROOTFileForCylindricalPET, InputStreamFromROOTFile, InputStreamFromROOTFile >
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::InputStreamFromROOTFile
 InputStreamFromROOTFile ()
 Default constructor.
 
Succeeded reset ()
 Go to the first event.
 
SavedPosition save_get_position ()
 Save current position in a vector.
 
Succeeded set_get_position (const SavedPosition &)
 Set current position.
 
std::vector< unsigned long int > get_saved_get_positions () const
 Get the vector with the saved positions.
 
void set_saved_get_positions (const std::vector< unsigned long int > &)
 Set a vector with saved positions.
 
unsigned long int get_total_number_of_events () const
 Returns the total number of events.
 
std::string get_ROOT_filename () const
 
int get_num_axial_crystals_per_block_v () const
 Get the axial number of crystals per module.
 
int get_num_transaxial_crystals_per_block_v () const
 Get the transaxial number of crystals per module.
 
float get_low_energy_thres () const
 Lower energy threshold.
 
float get_up_energy_thres () const
 Upper energy threshold.
 
void set_singles_readout_depth (int)
 Set singles_readout_depth.
 
void set_input_filename (const std::string &)
 
void set_chain_name (const std::string &)
 
void set_exclude_true_events (bool)
 
void set_exclude_scattered_events (bool)
 
void set_exclude_unscattered_events (bool)
 
void set_exclude_random_events (bool)
 
void set_low_energy_window (float)
 
void set_upper_energy_window (float)
 
void set_optional_ROOT_fields (bool)
 Set the read_optional_root_fields flag.
 
void set_crystal_repeater_x (int)
 
void set_crystal_repeater_y (int)
 
void set_crystal_repeater_z (int)
 
int get_num_virtual_axial_crystals_per_block () const
 
int get_num_virtual_transaxial_crystals_per_block () const
 
void set_num_virtual_axial_crystals_per_block (int)
 
void set_num_virtual_transaxial_crystals_per_block (int)
 
- Public Member Functions inherited from stir::ParsingObject
 ParsingObject (const ParsingObject &)
 
ParsingObjectoperator= (const ParsingObject &)
 
void ask_parameters ()
 
bool parse (std::istream &f)
 
bool parse (const char *const filename)
 

Static Public Attributes

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

Protected Member Functions

void set_defaults () override
 Set defaults before parsing.
 
void initialise_keymap () override
 Initialise all keywords.
 
bool post_processing () override
 This will be called at the end of the parsing. More...
 
- Protected Member Functions inherited from stir::InputStreamFromROOTFile
float get_energy1_in_keV () const
 OpenGATE output ROOT energy information is given in MeV, these methods convert to keV.
 
float get_energy2_in_keV () const
 
bool check_brentry_randoms_scatter_energy_conditions (long long int brentry)
 Checks brentry satisfies the randoms, scatter and energy conditions.
 
void GetEntryCheck (const int ret)
 Checks the return of branch->GetEntry(brentry) and errors if return <= 0.
 
- 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

int submodule_repeater_x
 
int submodule_repeater_y
 
int submodule_repeater_z
 
int module_repeater_x
 
int module_repeater_y
 
int module_repeater_z
 
int rsector_repeater
 
int half_block
 In GATE, inside a block, the indeces start from the lower unit counting upwards. Therefore in order to align the crystals, between STIR and GATE we have to move half block more.
 
TBranches for Cylindrical PET
TBranch * br_crystalID1 = nullptr
 
TBranch * br_crystalID2 = nullptr
 
TBranch * br_submoduleID1 = nullptr
 
TBranch * br_submoduleID2 = nullptr
 
TBranch * br_moduleID1 = nullptr
 
TBranch * br_moduleID2 = nullptr
 
TBranch * br_rsectorID1 = nullptr
 
TBranch * br_rsectorID2 = nullptr
 
ROOT Variables, i.e. to hold data from each entry.
std::int32_t crystalID1
 
std::int32_t crystalID2
 
std::int32_t submoduleID1
 
std::int32_t submoduleID2
 
std::int32_t moduleID1
 
std::int32_t moduleID2
 
std::int32_t rsectorID1
 
std::int32_t rsectorID2
 
- Protected Attributes inherited from stir::InputStreamFromROOTFile
std::string filename
 Input data file name.
 
unsigned long int starting_stream_position
 The starting position.
 
unsigned long int nentries
 The total number of entries.
 
unsigned long int current_position
 Current get position.
 
std::vector< unsigned long int > saved_get_positions
 A vector with saved position indices.
 
std::string chain_name
 The name of the ROOT chain to be read.
 
bool read_optional_root_fields
 This variable can be used to setBranchAddress to ROOT fields that currently are not used by STIR. Because they might be related to medical image reconstruction or because STIR does not support a relevant use. Of course, just activating this flag does not mean that something meaningfull will happen. Please edit get_next_record() function accordingly.
 
bool exclude_nonrandom
 Skip True events (eventID1 == eventID2). Default is false.
 
bool exclude_scattered
 Skip scattered events (comptonphantom1 > 0 && comptonphantom2 > 0). Default is false.
 
bool exclude_unscattered
 Skip unscattered events (comptonphantom1 == 0 && comptonphantom2 == 0)). Default is false.
 
bool exclude_randoms
 Skip random events (eventID1 != eventID2). Default is false.
 
bool check_energy_window_information
 Check energy window information (low_energy_window < energy < up_energy_window). Default is true.
 
float low_energy_window
 Lower energy threshold. Default is 1000 (keV)
 
float up_energy_window
 Upper energy threshold. Default is 0 (keV)
 
int singles_readout_depth
 For the singles_readout_depth from GATE's online documentation: (here )

the readout depth depends upon how the electronic readout functions.


 
double least_significant_clock_bit
 
int crystal_repeater_x
 
int crystal_repeater_y
 
int crystal_repeater_z
 
TChain * stream_ptr
 
std::int32_t eventID1
 
std::int32_t eventID2
 
std::int32_t runID
 
std::int32_t sourceID1
 
std::int32_t sourceID2
 
double time1
 
double time2
 
float energy1
 
float energy2
 
float rotation_angle
 
float sinogramS
 
float sinogramTheta
 
float axialPos
 
int32_t comptonphantom1
 
int32_t comptonphantom2
 
float globalPosX1
 
float globalPosX2
 
float globalPosY1
 
float globalPosY2
 
float globalPosZ1
 
float globalPosZ2
 
float sourcePosX1
 
float sourcePosX2
 
float sourcePosY1
 
float sourcePosY2
 
float sourcePosZ1
 
float sourcePosZ2
 
TBranch * br_time1 = nullptr
 
TBranch * br_time2 = nullptr
 
TBranch * br_eventID1 = nullptr
 
TBranch * br_eventID2 = nullptr
 
TBranch * br_energy1 = nullptr
 
TBranch * br_energy2 = nullptr
 
TBranch * br_comptonPhantom1 = nullptr
 
TBranch * br_comptonPhantom2 = nullptr
 
TBranch * br_axialPos = nullptr
 
TBranch * br_globalPosX1 = nullptr
 
TBranch * br_globalPosX2 = nullptr
 
TBranch * br_globalPosY1 = nullptr
 
TBranch * br_globalPosY2 = nullptr
 
TBranch * br_globalPosZ1 = nullptr
 
TBranch * br_globalPosZ2 = nullptr
 
TBranch * br_rotation_angle = nullptr
 
TBranch * br_runID = nullptr
 
TBranch * br_sinogramS = nullptr
 
TBranch * br_sinogramTheta = nullptr
 
TBranch * br_sourceID1 = nullptr
 
TBranch * br_sourceID2 = nullptr
 
TBranch * br_sourcePosX1 = nullptr
 
TBranch * br_sourcePosX2 = nullptr
 
TBranch * br_sourcePosY1 = nullptr
 
TBranch * br_sourcePosY2 = nullptr
 
TBranch * br_sourcePosZ1 = nullptr
 
TBranch * br_sourcePosZ2 = nullptr
 
int num_virtual_axial_crystals_per_block
 
int num_virtual_transaxial_crystals_per_block
 
- Protected Attributes inherited from stir::ParsingObject
KeyParser parser
 

Additional Inherited Members

- Public Types inherited from stir::InputStreamFromROOTFile
typedef std::vector< long long int >::size_type SavedPosition
 
- Static Public Member Functions inherited from stir::RegisteredParsingObject< InputStreamFromROOTFileForCylindricalPET, InputStreamFromROOTFile, InputStreamFromROOTFile >
static InputStreamFromROOTFileread_from_stream (std::istream *)
 Construct a new object (of type Derived) by parsing the istream. More...
 
- Static Public Member Functions inherited from stir::RegisteredObject< InputStreamFromROOTFile >
static InputStreamFromROOTFileread_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 InputStreamFromROOTFileask_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< InputStreamFromROOTFile >
typedef InputStreamFromROOTFile *(* 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< InputStreamFromROOTFile >
static RegistryTyperegistry ()
 Static function returning the registry. More...
 

Detailed Description

Declaration of class stir::InputStreamFromROOTFileForCylindricalPET.

From (here ) a cylindrical PET scanner has five levels rsector module submodule crystal layer

The geometry is defined through the repeaters. In the example header file found below. The values in the repeaters must match the values in the simulation macro file.

Warning
In case that in the simulation a level is skipped then the repeater has to be set to 1.
  GATE scanner type := GATE_Cylindrical_PET
      GATE_Cylindrical_PET Parameters :=
      name of data file := ${INPUT_ROOT_FILE}
      name of input TChain := Coincidences

      number of Rsectors := 504
      number of modules_X := 1
      number of modules_Y := 1
      number of modules_Z := 1
      number of submodules_X := 1
      number of submodules_Y := 1
      number of submodules_Z := 1
      number of crystals_X := 1
      number of crystals_Y := 1
      number of crystals_Z := 4

      Singles readout depth := 1
      exclude scattered events := ${EXCLUDE_SCATTERED}
      exclude random events := ${EXCLUDE_RANDOM}
      low energy window (keV) := 0
      upper energy window (keV):= 10000

  End GATE_Cylindrical_PET Parameters :=
Author
Nikos Efthimiou

Member Function Documentation

◆ get_next_record()

Succeeded stir::InputStreamFromROOTFileForCylindricalPET::get_next_record ( CListRecordROOT record)
overridevirtual

◆ post_processing()

bool stir::InputStreamFromROOTFileForCylindricalPET::post_processing ( )
overrideprotectedvirtual

This will be called at the end of the parsing.

Returns
false if everything OK, true if not

Reimplemented from stir::InputStreamFromROOTFile.

References stir::InputStreamFromROOTFile::post_processing().


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