STIR 6.5.0
stir::Scanner Class Reference

A class for storing some info on the scanner. More...

#include "stir/Scanner.h"

Public Types

enum  Type {
  E931 , E951 , E953 , E921 ,
  E925 , E961 , E962 , E966 ,
  E1080 , test_scanner , Siemens_mMR , Siemens_mCT ,
  Siemens_Vision_600 , Siemens_Quadra , RPT , HiDAC ,
  Advance , DiscoveryLS , DiscoveryST , DiscoverySTE ,
  DiscoveryRX , Discovery600 , PETMR_Signa , Discovery690 ,
  DiscoveryMI3ring , DiscoveryMI4ring , DiscoveryMI5ring , DiscoveryMI6ring ,
  HZLR , RATPET , PANDA , HYPERimage ,
  nanoPET , HRRT , Allegro , GeminiTF ,
  SAFIRDualRingPrototype , UPENN_5rings , UPENN_5rings_no_gaps , UPENN_6rings ,
  UPENN_6rings_no_gaps , User_defined_scanner , Unknown_scanner
}
 enum for all predefined scanners

Public Member Functions

 Scanner (Type scanner_type)
 constructor that takes scanner type as an input argument
 Scanner (Type type_v, const std::list< std::string > &list_of_names_v, int num_detectors_per_ring_v, int num_rings_v, int max_num_non_arccorrected_bins_v, int default_num_arccorrected_bins_v, float inner_ring_radius_v, float average_depth_of_interaction_v, float ring_spacing_v, float bin_size_v, float intrinsic_tilt_v, int num_axial_blocks_per_bucket_v, int num_transaxial_blocks_per_bucket_v, int num_axial_crystals_per_block_v, int num_transaxial_crystals_per_block_v, int num_axial_crystals_per_singles_unit_v, int num_transaxial_crystals_per_singles_unit_v, int num_detector_layers_v, float energy_resolution_v=-1.0f, float reference_energy_v=-1.0f, short int max_num_of_timing_poss=-1, float size_timing_pos=-1.0f, float timing_resolution=-1.0f, const std::string &scanner_geometry_v="Cylindrical", float axial_crystal_spacing_v=-1.0f, float transaxial_crystal_spacing_v=-1.0f, float axial_block_spacing_v=-1.0f, float transaxial_block_spacing_v=-1.0f, const std::string &crystal_map_file_name="")
 constructor -(list of names)
 Scanner (Type type_v, const std::string &name, int num_detectors_per_ring_v, int num_rings_v, int max_num_non_arccorrected_bins_v, int default_num_arccorrected_bins_v, float inner_ring_radius_v, float average_depth_of_interaction_v, float ring_spacing_v, float bin_size_v, float intrinsic_tilt_v, int num_axial_blocks_per_bucket_v, int num_transaxial_blocks_per_bucket_v, int num_axial_crystals_per_block_v, int num_transaxial_crystals_per_block_v, int num_axial_crystals_per_singles_unit_v, int num_transaxial_crystals_per_singles_unit_v, int num_detector_layers_v, float energy_resolution_v=-1.0f, float reference_energy_v=-1.0f, short int max_num_of_timing_poss=-1, float size_timing_pos=-1.0f, float timing_resolution=-1.0f, const std::string &scanner_geometry_v="Cylindrical", float axial_crystal_spacing_v=-1.0f, float transaxial_crystal_spacing_v=-1.0f, float axial_block_spacing_v=-1.0f, float transaxial_block_spacing_v=-1.0f, const std::string &crystal_map_file_name="")
 constructor ( a single name)
virtual void set_up ()
 Initialise internal geometry.
std::string parameter_info () const
 get scanner parameters as a std::string
const std::string & get_name () const
 get the scanner name
const std::list< std::string > & get_all_names () const
 get all scanner names as a list of strings
std::string list_names () const
 get all scanner names as a string
bool operator== (const Scanner &scanner) const
 comparison operator
bool operator!= (const Scanner &scanner) const
Type get_type () const
 get scanner type
Succeeded check_consistency () const
 checks consistency
Functions returning geometrical info
int get_num_rings () const
 get number of rings
int get_num_detectors_per_ring () const
 get the number of detectors per ring
int get_max_num_non_arccorrected_bins () const
 get the maximum number of arccorrected tangential positions
int get_default_num_arccorrected_bins () const
 get the default number of arccorrected tangential positions
int get_max_num_views () const
 get maximum number of views
float get_inner_ring_radius () const
 get inner ring radius
float get_max_FOV_radius () const
 get maximum field of view radius
float get_effective_ring_radius () const
 get effective ring radius
float get_average_depth_of_interaction () const
 get average depth of interaction
float get_ring_spacing () const
 get ring spacing
float get_default_bin_size () const
 get default arc-corrected bin size
float get_intrinsic_azimuthal_tilt () const
 get intrinsic tilt in raw sinogram data (in radians)
number of "fake" crystals per block, inserted by the scanner
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)
functions to get block geometry info
std::string get_scanner_geometry () const
 get scanner geometry
float get_axial_crystal_spacing () const
 get crystal spacing in axial direction
float get_transaxial_crystal_spacing () const
 get crystal spacing in transaxial direction
float get_axial_block_spacing () const
 get block spacing in axial direction
float get_transaxial_block_spacing () const
 get block spacing in transaxial direction
float get_axial_length () const
functions to get generic geometry info

get crystal map file name

std::string get_crystal_map_file_name () const
Functions to get detector response info
float get_energy_resolution () const
 get the energy resolution as a fraction at the reference energy
float get_reference_energy () const
 get the reference energy in keV of the energy resolution
bool has_energy_information () const
 true if energy_resolution and reference_energy are set
Functions setting info
void set_type (const Type &new_type)
 set scanner type
void set_num_rings (const int &new_num)
 set number of rings
void set_num_detectors_per_ring (const int &new_num)
 set the namber of detectors per ring
void set_max_num_non_arccorrected_bins (const int &new_num)
 set the maximum number of arccorrected bins
void set_default_num_arccorrected_bins (const int &new_num)
 set the default number of arccorrected_bins
void set_inner_ring_radius (const float &new_radius)
 set inner ring radius
void set_average_depth_of_interaction (const float &new_depth_of_interaction)
 set average depth of interaction
void set_ring_spacing (const float &new_spacing)
 set ring spacing
void set_default_bin_size (const float &new_size)
 set default arc-corrected bin size
void set_intrinsic_azimuthal_tilt (const float new_tilt)
 in degrees

Static Public Member Functions

static Scanner * ask_parameters ()
static Scanner * get_scanner_from_name (const std::string &name)
 get the scanner pointer from the name
static std::string list_all_names ()
 get a string listing names for all predefined scanners
static std::list< std::string > get_names_of_predefined_scanners ()
 get a list with the names for each predefined scanner

Friends

class BlocksTests
class ProjDataInfoCylindricalNoArcCorrTests

Info on crystals per block etc.

int get_num_transaxial_blocks_per_bucket () const
 get number of transaxial blocks per bucket
int get_num_axial_blocks_per_bucket () const
 get number of axial blocks per bucket
int get_num_axial_crystals_per_block () const
 get number of crystals in the axial direction
int get_num_transaxial_crystals_per_block () const
 get number of transaxial crystals
int get_num_transaxial_crystals_per_bucket () const
 get crystals in a bucket
int get_num_axial_crystals_per_bucket () const
 get crystals in a bucket
int get_num_detector_layers () const
 get number of crystal layers (for DOI)
int get_num_axial_blocks () const
 get number of axial blocks
int get_num_transaxial_blocks () const
 get number of axial blocks
int get_num_axial_buckets () const
 get number of axial buckets
int get_num_transaxial_buckets () const
 get number of axial buckets
int get_num_axial_crystals_per_singles_unit () const
 get number of axial crystals per singles unit
int get_num_transaxial_crystals_per_singles_unit () const
 get number of transaxial crystals per singles unit.
int get_num_axial_singles_units () const
 get number of axial singles units
int get_num_transaxial_singles_units () const
 get number of transaxial singles unit
int get_num_singles_units () const
int get_max_num_timing_poss () const
 Get the maximum number of TOF bins.
float get_size_of_timing_pos () const
 Get the size for one (unmashed) TOF bin in picoseconds.
float get_timing_resolution () const
 Get the timing resolution of the scanner in picoseconds.
float get_coincidence_window_width_in_ps () const
 Get the full width of the coincidence window in picoseconds.
float get_coincidence_window_width_in_mm () const
 Get the full width of the coincidence window in millimeter.
void set_num_transaxial_blocks_per_bucket (const int &new_num)
 set number of transaxial blocks per bucket
void set_num_axial_blocks_per_bucket (const int &new_num)
 set number of axial blocks per bucket
void set_num_axial_crystals_per_block (const int &new_num)
 set number of crystals in the axial direction
void set_num_transaxial_crystals_per_block (const int &new_num)
 set number of transaxial crystals
void set_num_detector_layers (const int &new_num)
 set number of crystal layers (for DOI)
void set_num_axial_crystals_per_singles_unit (const int &new_num)
 set number of axial crystals per singles unit
void set_num_transaxial_crystals_per_singles_unit (const int &new_num)
 set number of transaxial crystals per singles unit
void set_scanner_geometry (const std::string &new_scanner_geometry)
 name functions to set block geometry info set scanner geometry
void set_axial_crystal_spacing (const float &new_spacing)
 set crystal spacing in axial direction
void set_transaxial_crystal_spacing (const float &new_spacing)
 set crystal spacing in transaxial direction
void set_axial_block_spacing (const float &new_spacing)
 set block spacing in axial direction
void set_transaxial_block_spacing (const float &new_spacing)
 set block spacing in transaxial direction
void set_crystal_map_file_name (const std::string &new_crystal_map_file_name)
 set crystal map file name for the generic geometry
void set_energy_resolution (const float new_num)
 set the energy resolution of the system
void set_reference_energy (const float new_num)
 set the reference energy (in keV) of the energy resolution
void set_max_num_timing_poss (int new_num)
 Set the maximum number of TOF bins.
void set_size_of_timing_poss (float new_num)
 Set the delta t which correspnds to the max number of TOF bins.
void set_timing_resolution (float new_num_in_ps)
 Set timing resolution.
int get_singles_bin_index (int axial_index, int transaxial_index) const
 Calculate a singles bin index from axial and transaxial singles bin coordinates.
int get_singles_bin_index (const DetectionPosition<> &det_pos) const
 Method used to calculate a singles bin index from a detection position.
int get_axial_singles_unit (int singles_bin_index) const
 Get the axial singles bin coordinate from a singles bin.
int get_transaxial_singles_unit (int singles_bin_index) const
 Get the transaxial singles bin coordinate from a singles bin.
bool is_tof_ready () const
 True if it is TOF compatible.
bool is_already_setup () const
stir::DetectionPosition get_det_pos_for_index (const stir::DetectionPosition<> &det_pos) const
 Get the STIR detection position (det#, ring#, layer#) given the detection position id in the input crystal map.
stir::CartesianCoordinate3D< float > get_coordinate_for_det_pos (const stir::DetectionPosition<> &det_pos) const
 Get the Cartesian coordinates (x,y,z) given the STIR detection position (det#, ring#, layer#).
stir::CartesianCoordinate3D< float > get_coordinate_for_index (const stir::DetectionPosition<> &det_pos) const
 Get the Cartesian coordinates (x,y,z) given the detection position id in the input crystal map.
Succeeded find_detection_position_given_cartesian_coordinate (DetectionPosition<> &det_pos, const CartesianCoordinate3D< float > &cart_coord) const
 Find detection position at a coordinate.
shared_ptr< const DetectorCoordinateMap > STIR_DEPRECATED get_detector_map_sptr () const
shared_ptr< const DetectorCoordinateMap > get_detector_coordinate_map_sptr () const
const DetectorCoordinateMap & get_detector_coordinate_map () const

Detailed Description

A class for storing some info on the scanner.

This class stores geometrical info etc on the scanner.

Warning
Currently really only appropriate for cylindrical PET scanners
information on blocks, buckets etc
This class gives some informations on crystals, blocks etc. However, this is currently (i.e. at least up to STIR 2.1) used in very few places. For ECAT scanners, this information is used to read the normalisation .n files and computed dead-time correction etc. For all other scanners, STIR currently ignores this info. This might change in the future of course.

At present, these functions follow CTI terminology, but the concepts are similar for other scanners.

  • crystal the smallest detection unit
  • block several crystals are grouped in a block, this can be in 3 dimensions (see layer). This information could be useful for finding the geometry of the scanner, but we would plenty more size info presumably.
  • layer Some scanners have multiple layers of detectors to give Depth Of Interaction information
  • bucket several blocks send detected events to one bucket. This has consequences for the dead-time modelling. For instance, one bucket could have much more singles than another, and hence presumably higher singles-dead-time.
  • singles_unit (non-standard terminology) Most scanners report the singles detected during the acquisition. Some scanners (such as GE scanners) report singles for every crystal, while others (such as CTI scanners) give only singles for a collection of blocks. A singles_unit is then a set of crystals for which we can get singles rates.

A further complication is that some scanners (including many Siemens scanners) insert virtual crystals in the sinogram data (corresponding to gaps between detector blocks). We currently define the blocks as the "virtual" ones, but provide extra members to find out how many of these virtual crystals there are.

Warning
This information is only sensible for discrete detector-based scanners.
Currently, in a TOF compatible scanner template, the last three types have to be explicitly defined to avoid ambiguity.
The energy resolution has to be specified but it is used only for scatter correction.
In order to define a nonTOF scanner the timing resolution has to be set to 0 or 1. Anything else will trigger a TOF reconstruction.
Todo
Some scanners do not have all info filled in at present. Values are then set to 0.
Warning
You have to call set_up() after using the set_* functions (except set_params()).
Todo

a hierarchy distinguishing between different types of scanners

derive from ParsingObject

Constructor & Destructor Documentation

◆ Scanner() [1/3]

stir::Scanner::Scanner ( Type scanner_type)

◆ Scanner() [2/3]

stir::Scanner::Scanner ( Type type_v,
const std::list< std::string > & list_of_names_v,
int num_detectors_per_ring_v,
int num_rings_v,
int max_num_non_arccorrected_bins_v,
int default_num_arccorrected_bins_v,
float inner_ring_radius_v,
float average_depth_of_interaction_v,
float ring_spacing_v,
float bin_size_v,
float intrinsic_tilt_v,
int num_axial_blocks_per_bucket_v,
int num_transaxial_blocks_per_bucket_v,
int num_axial_crystals_per_block_v,
int num_transaxial_crystals_per_block_v,
int num_axial_crystals_per_singles_unit_v,
int num_transaxial_crystals_per_singles_unit_v,
int num_detector_layers_v,
float energy_resolution_v = -1.0f,
float reference_energy_v = -1.0f,
short int max_num_of_timing_poss = -1,
float size_timing_pos = -1.0f,
float timing_resolution = -1.0f,
const std::string & scanner_geometry_v = "Cylindrical",
float axial_crystal_spacing_v = -1.0f,
float transaxial_crystal_spacing_v = -1.0f,
float axial_block_spacing_v = -1.0f,
float transaxial_block_spacing_v = -1.0f,
const std::string & crystal_map_file_name = "" )

constructor -(list of names)

size info is in mm

Parameters
intrinsic_tilt_vvalue in radians,
See also
get_intrinsic_azimuthal_tilt()
Parameters
scanner_geometry_v
See also
set_scanner_geometry()
Warning
calls error() when block/bucket info are inconsistent

◆ Scanner() [3/3]

stir::Scanner::Scanner ( Type type_v,
const std::string & name,
int num_detectors_per_ring_v,
int num_rings_v,
int max_num_non_arccorrected_bins_v,
int default_num_arccorrected_bins_v,
float inner_ring_radius_v,
float average_depth_of_interaction_v,
float ring_spacing_v,
float bin_size_v,
float intrinsic_tilt_v,
int num_axial_blocks_per_bucket_v,
int num_transaxial_blocks_per_bucket_v,
int num_axial_crystals_per_block_v,
int num_transaxial_crystals_per_block_v,
int num_axial_crystals_per_singles_unit_v,
int num_transaxial_crystals_per_singles_unit_v,
int num_detector_layers_v,
float energy_resolution_v = -1.0f,
float reference_energy_v = -1.0f,
short int max_num_of_timing_poss = -1,
float size_timing_pos = -1.0f,
float timing_resolution = -1.0f,
const std::string & scanner_geometry_v = "Cylindrical",
float axial_crystal_spacing_v = -1.0f,
float transaxial_crystal_spacing_v = -1.0f,
float axial_block_spacing_v = -1.0f,
float transaxial_block_spacing_v = -1.0f,
const std::string & crystal_map_file_name = "" )

constructor ( a single name)

size info is in mm

Parameters
intrinsic_tilt_vvalue in radians,
See also
get_intrinsic_azimuthal_tilt()
Parameters
scanner_geometry_v
See also
set_scanner_geometry()
Warning
calls error() when block/bucket info are inconsistent

Member Function Documentation

◆ get_scanner_from_name()

◆ list_all_names()

string stir::Scanner::list_all_names ( )
static

get a string listing names for all predefined scanners

References get_type(), list_names(), and Scanner().

◆ get_names_of_predefined_scanners()

std::list< std::string > stir::Scanner::get_names_of_predefined_scanners ( )
static

get a list with the names for each predefined scanner

References get_name(), get_type(), and Scanner().

◆ set_up()

void stir::Scanner::set_up ( )
virtual

Initialise internal geometry.

Currently called in the set_params() functions, but needs to be called explicitly when afterwards using any of the other set_ functions

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

Referenced by get_scanner_from_name(), and stir::ScannerTests::run_tests().

◆ parameter_info()

◆ get_name()

◆ get_all_names()

const list< string > & stir::Scanner::get_all_names ( ) const

get all scanner names as a list of strings

Referenced by get_scanner_from_name().

◆ list_names()

string stir::Scanner::list_names ( ) const

get all scanner names as a string

References stir::VectorWithOffset< T >::begin(), and stir::VectorWithOffset< T >::end().

Referenced by list_all_names().

◆ operator==()

bool stir::Scanner::operator== ( const Scanner & scanner) const

comparison operator

References is_tof_ready(), Scanner(), and stir::warning().

◆ get_type()

◆ check_consistency()

◆ get_num_rings()

◆ get_num_detectors_per_ring()

◆ get_max_num_non_arccorrected_bins()

int stir::Scanner::get_max_num_non_arccorrected_bins ( ) const
inline

get the maximum number of arccorrected tangential positions

Warning
name is not in standard STIR terminology. Should be get_max_num_non_arccorrected_tangential_poss() or so. Even better would be to replace it by a name relating to the number of detectors that are in coincidence with a a single detector in the ring, as that is the physical reason why there is a maximum number anyway.
Todo
change name

References get_max_num_non_arccorrected_bins().

Referenced by get_max_num_non_arccorrected_bins(), stir::ecat::ecat7::make_ECAT7_main_header(), and parameter_info().

◆ get_default_num_arccorrected_bins()

int stir::Scanner::get_default_num_arccorrected_bins ( ) const
inline

get the default number of arccorrected tangential positions

Warning
name is not in standard STIR terminology. Should be get_max_default_num_arccorrected_tangential_poss() or so.
Todo
change name, mabe refering to the fan of detectors in coincidence or so

References get_default_num_arccorrected_bins().

Referenced by get_default_num_arccorrected_bins(), stir::ecat::ecat6::make_ECAT6_Main_header(), and parameter_info().

◆ get_max_num_views()

int stir::Scanner::get_max_num_views ( ) const
inline

get maximum number of views

This is simply get_num_detectors_per_ring()/2

References get_max_num_views(), and get_num_detectors_per_ring().

Referenced by get_max_num_views().

◆ get_inner_ring_radius()

float stir::Scanner::get_inner_ring_radius ( ) const
inline

◆ get_max_FOV_radius()

float stir::Scanner::get_max_FOV_radius ( ) const
inline

get maximum field of view radius

References get_max_FOV_radius().

Referenced by check_consistency(), and get_max_FOV_radius().

◆ get_effective_ring_radius()

◆ get_average_depth_of_interaction()

float stir::Scanner::get_average_depth_of_interaction ( ) const
inline

get average depth of interaction

References get_average_depth_of_interaction().

Referenced by get_average_depth_of_interaction(), and parameter_info().

◆ get_ring_spacing()

◆ get_default_bin_size()

float stir::Scanner::get_default_bin_size ( ) const
inline

◆ get_intrinsic_azimuthal_tilt()

float stir::Scanner::get_intrinsic_azimuthal_tilt ( ) const
inline

get intrinsic tilt in raw sinogram data (in radians)

Some scanners construct sinograms where the first view does not correspond to the vertical. This angle tells you how much the image will be rotated when this tilt is ignored in the reconstruction algorithm. It uses the same coordinate system as ProjDataInfo::get_phi().

References get_intrinsic_azimuthal_tilt().

Referenced by get_intrinsic_azimuthal_tilt(), stir::ecat::ecat7::make_ECAT7_main_header(), parameter_info(), and set_up().

◆ get_num_transaxial_blocks_per_bucket()

int stir::Scanner::get_num_transaxial_blocks_per_bucket ( ) const
inline

◆ get_num_axial_blocks_per_bucket()

int stir::Scanner::get_num_axial_blocks_per_bucket ( ) const
inline

◆ get_num_axial_crystals_per_block()

int stir::Scanner::get_num_axial_crystals_per_block ( ) const
inline

◆ get_num_transaxial_crystals_per_block()

int stir::Scanner::get_num_transaxial_crystals_per_block ( ) const
inline

◆ get_num_transaxial_crystals_per_bucket()

int stir::Scanner::get_num_transaxial_crystals_per_bucket ( ) const
inline

◆ get_num_axial_crystals_per_bucket()

int stir::Scanner::get_num_axial_crystals_per_bucket ( ) const
inline

◆ get_num_detector_layers()

int stir::Scanner::get_num_detector_layers ( ) const
inline

get number of crystal layers (for DOI)

References get_num_detector_layers().

Referenced by get_num_detector_layers(), and parameter_info().

◆ get_num_axial_blocks()

int stir::Scanner::get_num_axial_blocks ( ) const
inline

◆ get_num_transaxial_blocks()

int stir::Scanner::get_num_transaxial_blocks ( ) const
inline

◆ get_num_axial_buckets()

int stir::Scanner::get_num_axial_buckets ( ) const
inline

get number of axial buckets

References get_num_axial_blocks(), and get_num_axial_buckets().

Referenced by check_consistency(), get_axial_length(), and get_num_axial_buckets().

◆ get_num_transaxial_buckets()

int stir::Scanner::get_num_transaxial_buckets ( ) const
inline

◆ get_num_axial_crystals_per_singles_unit()

int stir::Scanner::get_num_axial_crystals_per_singles_unit ( ) const
inline

◆ get_num_transaxial_crystals_per_singles_unit()

int stir::Scanner::get_num_transaxial_crystals_per_singles_unit ( ) const
inline

◆ get_num_axial_singles_units()

int stir::Scanner::get_num_axial_singles_units ( ) const
inline

◆ get_num_transaxial_singles_units()

int stir::Scanner::get_num_transaxial_singles_units ( ) const
inline

◆ get_max_num_timing_poss()

int stir::Scanner::get_max_num_timing_poss ( ) const
inline

Get the maximum number of TOF bins.

Returns
will be 0 or negative if not known

References get_max_num_timing_poss().

Referenced by check_consistency(), get_coincidence_window_width_in_ps(), get_max_num_timing_poss(), and parameter_info().

◆ get_size_of_timing_pos()

float stir::Scanner::get_size_of_timing_pos ( ) const
inline

Get the size for one (unmashed) TOF bin in picoseconds.

Returns
will be 0 or negative if not known
Todo
change name to get_size_of_timing_pos_in_ps

References get_size_of_timing_pos().

Referenced by get_coincidence_window_width_in_ps(), get_size_of_timing_pos(), and parameter_info().

◆ get_timing_resolution()

float stir::Scanner::get_timing_resolution ( ) const
inline

Get the timing resolution of the scanner in picoseconds.

Returns
will be 0 or negative if not known
Todo
change name to get_size_of_timing_pos_in_ps

References get_timing_resolution().

Referenced by check_consistency(), get_timing_resolution(), and parameter_info().

◆ get_coincidence_window_width_in_ps()

float stir::Scanner::get_coincidence_window_width_in_ps ( ) const

Get the full width of the coincidence window in picoseconds.

This is often written as $2\tau$ and is usually around 4000ps. It is determined from get_max_num_timing_poss() and get_size_of_timing_pos().

Warning
This is currently not known yet for many non-TOF scanners. The function will then throw an error.

References stir::error(), get_max_num_timing_poss(), get_size_of_timing_pos(), and is_tof_ready().

Referenced by check_consistency(), and get_coincidence_window_width_in_mm().

◆ get_coincidence_window_width_in_mm()

float stir::Scanner::get_coincidence_window_width_in_mm ( ) const

Get the full width of the coincidence window in millimeter.

Calls get_coincidence_window_width_in_ps()

References get_coincidence_window_width_in_ps().

Referenced by check_consistency().

◆ get_num_virtual_axial_crystals_per_block()

int stir::Scanner::get_num_virtual_axial_crystals_per_block ( ) const

Some scanners (including many Siemens scanners) insert virtual crystals in the sinogram data. The other members of the class return the size of the "virtual" block. With these functions you can find its true size (or set it).

You have to call set_up() after using the set_* functions.

Todo
The current list is bound to be incomplete. would be better to stick it in set_params().

References get_type().

Referenced by check_consistency(), get_num_axial_blocks(), get_num_axial_singles_units(), and set_num_virtual_axial_crystals_per_block().

◆ get_num_virtual_transaxial_crystals_per_block()

int stir::Scanner::get_num_virtual_transaxial_crystals_per_block ( ) const
Todo
The current list is bound to be incomplete. would be better to stick it in set_params().

References get_type().

Referenced by set_num_virtual_transaxial_crystals_per_block().

◆ set_num_virtual_axial_crystals_per_block()

void stir::Scanner::set_num_virtual_axial_crystals_per_block ( int val)
Todo
Can currently only set to hard-wired values. Otherwise calls error()

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

◆ set_num_virtual_transaxial_crystals_per_block()

void stir::Scanner::set_num_virtual_transaxial_crystals_per_block ( int val)
Todo
Can currently only set to hard-wired values. Otherwise calls error()

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

◆ get_scanner_geometry()

std::string stir::Scanner::get_scanner_geometry ( ) const
inline

◆ get_axial_crystal_spacing()

float stir::Scanner::get_axial_crystal_spacing ( ) const
inline

get crystal spacing in axial direction

References get_axial_crystal_spacing().

Referenced by check_consistency(), get_axial_crystal_spacing(), get_axial_length(), parameter_info(), and Scanner().

◆ get_transaxial_crystal_spacing()

float stir::Scanner::get_transaxial_crystal_spacing ( ) const
inline

◆ get_axial_block_spacing()

float stir::Scanner::get_axial_block_spacing ( ) const
inline

get block spacing in axial direction

References get_axial_block_spacing().

Referenced by check_consistency(), get_axial_block_spacing(), get_axial_length(), and parameter_info().

◆ get_transaxial_block_spacing()

float stir::Scanner::get_transaxial_block_spacing ( ) const
inline

◆ get_axial_length()

float stir::Scanner::get_axial_length ( ) const
inline

get total axial length covered by the detectors (incl. any gaps between blocks etc.)

Todo
Need to update this function when enabling different spacing between blocks and buckets etc. For cylindrical scanners, calculates the length by the ring spacing.

References stir::error(), get_axial_block_spacing(), get_axial_crystal_spacing(), get_axial_length(), get_num_axial_blocks_per_bucket(), get_num_axial_buckets(), get_num_axial_crystals_per_block(), get_num_rings(), get_ring_spacing(), and get_scanner_geometry().

Referenced by stir::ScatterSimulation::downsample_scanner(), and get_axial_length().

◆ get_energy_resolution()

float stir::Scanner::get_energy_resolution ( ) const
inline

get the energy resolution as a fraction at the reference energy

Values for PET scanners are around 0.1 at 511 keV, depending on the scanner of course.

If less than or equal to 0, it is assumed to be unknown.

References get_energy_resolution().

Referenced by get_energy_resolution(), and parameter_info().

◆ get_reference_energy()

float stir::Scanner::get_reference_energy ( ) const
inline

get the reference energy in keV of the energy resolution

For PET, normally set to 511

References get_reference_energy().

Referenced by get_reference_energy(), and parameter_info().

◆ has_energy_information()

bool stir::Scanner::has_energy_information ( ) const
inline

true if energy_resolution and reference_energy are set

References has_energy_information().

Referenced by has_energy_information().

◆ set_type()

void stir::Scanner::set_type ( const Type & new_type)
inline

set scanner type

Be careful to keep consistency by setting all relevant parameters.

You have to call set_up() after using any of these.

References set_type().

Referenced by set_type().

◆ set_num_rings()

void stir::Scanner::set_num_rings ( const int & new_num)
inline

set number of rings

References set_num_rings().

Referenced by set_num_rings().

◆ set_num_detectors_per_ring()

void stir::Scanner::set_num_detectors_per_ring ( const int & new_num)
inline

set the namber of detectors per ring

References set_num_detectors_per_ring().

Referenced by set_num_detectors_per_ring().

◆ set_max_num_non_arccorrected_bins()

void stir::Scanner::set_max_num_non_arccorrected_bins ( const int & new_num)
inline

set the maximum number of arccorrected bins

References set_max_num_non_arccorrected_bins().

Referenced by set_max_num_non_arccorrected_bins().

◆ set_default_num_arccorrected_bins()

void stir::Scanner::set_default_num_arccorrected_bins ( const int & new_num)
inline

set the default number of arccorrected_bins

References set_default_num_arccorrected_bins().

Referenced by set_default_num_arccorrected_bins().

◆ set_inner_ring_radius()

void stir::Scanner::set_inner_ring_radius ( const float & new_radius)
inline

set inner ring radius

References set_inner_ring_radius().

Referenced by set_inner_ring_radius().

◆ set_average_depth_of_interaction()

void stir::Scanner::set_average_depth_of_interaction ( const float & new_depth_of_interaction)
inline

set average depth of interaction

References set_average_depth_of_interaction().

Referenced by set_average_depth_of_interaction().

◆ set_ring_spacing()

void stir::Scanner::set_ring_spacing ( const float & new_spacing)
inline

set ring spacing

References set_ring_spacing().

Referenced by set_ring_spacing().

◆ set_default_bin_size()

void stir::Scanner::set_default_bin_size ( const float & new_size)
inline

set default arc-corrected bin size

References set_default_bin_size().

Referenced by set_default_bin_size().

◆ set_intrinsic_azimuthal_tilt()

void stir::Scanner::set_intrinsic_azimuthal_tilt ( const float new_tilt)
inline

in degrees

References set_intrinsic_azimuthal_tilt().

Referenced by set_intrinsic_azimuthal_tilt().

◆ set_num_transaxial_blocks_per_bucket()

void stir::Scanner::set_num_transaxial_blocks_per_bucket ( const int & new_num)
inline

set number of transaxial blocks per bucket

References set_num_transaxial_blocks_per_bucket().

Referenced by set_num_transaxial_blocks_per_bucket().

◆ set_num_axial_blocks_per_bucket()

void stir::Scanner::set_num_axial_blocks_per_bucket ( const int & new_num)
inline

set number of axial blocks per bucket

References set_num_axial_blocks_per_bucket().

Referenced by set_num_axial_blocks_per_bucket().

◆ set_num_axial_crystals_per_block()

void stir::Scanner::set_num_axial_crystals_per_block ( const int & new_num)
inline

set number of crystals in the axial direction

References set_num_axial_crystals_per_block().

Referenced by set_num_axial_crystals_per_block().

◆ set_num_transaxial_crystals_per_block()

void stir::Scanner::set_num_transaxial_crystals_per_block ( const int & new_num)
inline

set number of transaxial crystals

References set_num_transaxial_crystals_per_block().

Referenced by set_num_transaxial_crystals_per_block().

◆ set_num_detector_layers()

void stir::Scanner::set_num_detector_layers ( const int & new_num)
inline

set number of crystal layers (for DOI)

References set_num_detector_layers().

Referenced by set_num_detector_layers().

◆ set_num_axial_crystals_per_singles_unit()

void stir::Scanner::set_num_axial_crystals_per_singles_unit ( const int & new_num)
inline

set number of axial crystals per singles unit

References set_num_axial_crystals_per_singles_unit().

Referenced by set_num_axial_crystals_per_singles_unit().

◆ set_num_transaxial_crystals_per_singles_unit()

void stir::Scanner::set_num_transaxial_crystals_per_singles_unit ( const int & new_num)
inline

set number of transaxial crystals per singles unit

References set_num_transaxial_crystals_per_singles_unit().

Referenced by set_num_transaxial_crystals_per_singles_unit().

◆ set_scanner_geometry()

void stir::Scanner::set_scanner_geometry ( const std::string & new_scanner_geometry)

name functions to set block geometry info set scanner geometry

Parameters
new_scanner_geometry"Cylindrical", "BlocksOnCylindrical" or "Generic"

Will also read the detector map from file if the geometry is "Generic".

Warning
you need to call set_up() after calling this function.
See also
set_scanner_geometry

◆ set_axial_crystal_spacing()

void stir::Scanner::set_axial_crystal_spacing ( const float & new_spacing)
inline

set crystal spacing in axial direction

References set_axial_crystal_spacing().

Referenced by set_axial_crystal_spacing().

◆ set_transaxial_crystal_spacing()

void stir::Scanner::set_transaxial_crystal_spacing ( const float & new_spacing)
inline

set crystal spacing in transaxial direction

References set_transaxial_crystal_spacing().

Referenced by set_transaxial_crystal_spacing().

◆ set_axial_block_spacing()

void stir::Scanner::set_axial_block_spacing ( const float & new_spacing)
inline

set block spacing in axial direction

References set_axial_block_spacing().

Referenced by Scanner(), and set_axial_block_spacing().

◆ set_transaxial_block_spacing()

void stir::Scanner::set_transaxial_block_spacing ( const float & new_spacing)
inline

set block spacing in transaxial direction

References set_transaxial_block_spacing().

Referenced by Scanner(), and set_transaxial_block_spacing().

◆ set_crystal_map_file_name()

void stir::Scanner::set_crystal_map_file_name ( const std::string & new_crystal_map_file_name)
inline

set crystal map file name for the generic geometry

Warning
, data is not read yet. use set_scanner_geometry() after calling this function

References set_crystal_map_file_name().

Referenced by set_crystal_map_file_name().

◆ set_energy_resolution()

void stir::Scanner::set_energy_resolution ( const float new_num)
inline

set the energy resolution of the system

See also
get_energy_resolution()

References set_energy_resolution().

Referenced by set_energy_resolution().

◆ set_reference_energy()

void stir::Scanner::set_reference_energy ( const float new_num)
inline

set the reference energy (in keV) of the energy resolution

See also
get_reference_energy()

References set_reference_energy().

Referenced by set_reference_energy().

◆ set_max_num_timing_poss()

void stir::Scanner::set_max_num_timing_poss ( int new_num)
inline

Set the maximum number of TOF bins.

References set_max_num_timing_poss().

Referenced by set_max_num_timing_poss().

◆ set_size_of_timing_poss()

void stir::Scanner::set_size_of_timing_poss ( float new_num)
inline

Set the delta t which correspnds to the max number of TOF bins.

References set_size_of_timing_poss().

Referenced by set_size_of_timing_poss().

◆ set_timing_resolution()

void stir::Scanner::set_timing_resolution ( float new_num_in_ps)
inline

Set timing resolution.

References set_timing_resolution().

Referenced by set_timing_resolution().

◆ get_singles_bin_index() [1/2]

int stir::Scanner::get_singles_bin_index ( int axial_index,
int transaxial_index ) const
inline

Calculate a singles bin index from axial and transaxial singles bin coordinates.

References get_num_transaxial_singles_units(), and get_singles_bin_index().

Referenced by get_singles_bin_index(), and get_singles_bin_index().

◆ get_singles_bin_index() [2/2]

int stir::Scanner::get_singles_bin_index ( const DetectionPosition<> & det_pos) const
inline

Method used to calculate a singles bin index from a detection position.

References get_num_axial_crystals_per_singles_unit(), get_num_transaxial_crystals_per_singles_unit(), and get_singles_bin_index().

◆ get_axial_singles_unit()

int stir::Scanner::get_axial_singles_unit ( int singles_bin_index) const
inline

Get the axial singles bin coordinate from a singles bin.

References get_axial_singles_unit(), and get_num_transaxial_singles_units().

Referenced by get_axial_singles_unit().

◆ get_transaxial_singles_unit()

int stir::Scanner::get_transaxial_singles_unit ( int singles_bin_index) const
inline

Get the transaxial singles bin coordinate from a singles bin.

References get_num_transaxial_singles_units(), and get_transaxial_singles_unit().

Referenced by get_transaxial_singles_unit().

◆ is_tof_ready()

bool stir::Scanner::is_tof_ready ( ) const
inline

◆ get_det_pos_for_index()

stir::DetectionPosition stir::Scanner::get_det_pos_for_index ( const stir::DetectionPosition<> & det_pos) const
inline

Get the STIR detection position (det#, ring#, layer#) given the detection position id in the input crystal map.

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

Referenced by get_det_pos_for_index().

◆ get_coordinate_for_det_pos()

stir::CartesianCoordinate3D< float > stir::Scanner::get_coordinate_for_det_pos ( const stir::DetectionPosition<> & det_pos) const
inline

Get the Cartesian coordinates (x,y,z) given the STIR detection position (det#, ring#, layer#).

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

Referenced by stir::ProjDataInfoGenericNoArcCorr::find_cartesian_coordinates_given_scanner_coordinates(), get_coordinate_for_det_pos(), and stir::ProjDataInfoGenericNoArcCorr::get_LOR().

◆ get_coordinate_for_index()

stir::CartesianCoordinate3D< float > stir::Scanner::get_coordinate_for_index ( const stir::DetectionPosition<> & det_pos) const
inline

Get the Cartesian coordinates (x,y,z) given the detection position id in the input crystal map.

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

Referenced by get_coordinate_for_index().

◆ find_detection_position_given_cartesian_coordinate()

Succeeded stir::Scanner::find_detection_position_given_cartesian_coordinate ( DetectionPosition<> & det_pos,
const CartesianCoordinate3D< float > & cart_coord ) const
inline

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