34Scanner::operator!=(
const Scanner& scanner)
const
36 return !(*
this == scanner);
53 return num_detectors_per_ring;
58 return max_num_non_arccorrected_bins;
70 return default_num_arccorrected_bins;
76 return inner_ring_radius;
82 return max_FOV_radius;
88 return average_depth_of_interaction;
94 return inner_ring_radius + average_depth_of_interaction;
112#ifdef STIR_LEGACY_IGNORE_VIEW_OFFSET
115 return intrinsic_tilt;
122 return num_transaxial_blocks_per_bucket;
128 return num_axial_blocks_per_bucket;
134 return num_axial_crystals_per_block;
140 return num_transaxial_crystals_per_block;
158 return num_detector_layers;
172 return num_detectors_per_ring / num_transaxial_crystals_per_block;
190 return num_axial_crystals_per_singles_unit;
196 return num_transaxial_crystals_per_singles_unit;
202 if (num_axial_crystals_per_singles_unit == 0)
215 if (num_transaxial_crystals_per_singles_unit == 0)
221 return num_detectors_per_ring / num_transaxial_crystals_per_singles_unit;
226Scanner::get_num_singles_units()
const
229 return get_num_axial_singles_units() * get_num_transaxial_singles_units();
235 return energy_resolution;
241 return reference_energy;
247 return max_num_of_timing_poss;
253 return size_timing_pos;
259 return timing_resolution;
265 return (max_num_of_timing_poss > 0 && size_timing_pos > 0.0f && timing_resolution > 0.0f);
271 return scanner_geometry;
277 return axial_crystal_spacing;
283 return transaxial_crystal_spacing;
289 return transaxial_block_spacing;
295 return axial_block_spacing;
307 error(
"get_axial_length not yet implemented for Generic scanner geometry");
314Scanner::get_crystal_map_file_name()
const
316 return crystal_map_file_name;
325 _already_setup =
false;
332 _already_setup =
false;
338 num_detectors_per_ring = new_num;
339 _already_setup =
false;
345 max_num_non_arccorrected_bins = new_num;
346 _already_setup =
false;
352 default_num_arccorrected_bins = new_num;
353 _already_setup =
false;
359 inner_ring_radius = new_radius;
360 _already_setup =
false;
366 average_depth_of_interaction = new_depth_of_interaction;
367 _already_setup =
false;
373 return (energy_resolution <= 0.0 || reference_energy <= 0.0) ? false :
true;
379 ring_spacing = new_spacing;
386 _already_setup =
false;
392 intrinsic_tilt = new_tilt;
393 _already_setup =
false;
399 num_transaxial_blocks_per_bucket = new_num;
400 _already_setup =
false;
406 num_axial_blocks_per_bucket = new_num;
407 _already_setup =
false;
413 num_detector_layers = new_num;
414 _already_setup =
false;
420 num_axial_crystals_per_block = new_num;
421 _already_setup =
false;
427 num_transaxial_crystals_per_block = new_num;
428 _already_setup =
false;
434 num_axial_crystals_per_singles_unit = new_num;
435 _already_setup =
false;
441 num_transaxial_crystals_per_singles_unit = new_num;
442 _already_setup =
false;
448 energy_resolution = new_num;
449 _already_setup =
false;
455 reference_energy = new_num;
456 _already_setup =
false;
462 axial_crystal_spacing = new_spacing;
463 _already_setup =
false;
469 transaxial_crystal_spacing = new_spacing;
470 _already_setup =
false;
476 transaxial_block_spacing = new_spacing;
477 _already_setup =
false;
483 axial_block_spacing = new_spacing;
484 _already_setup =
false;
490 crystal_map_file_name = new_crystal_map_file_name;
491 _already_setup =
false;
497 max_num_of_timing_poss = new_num;
498 _already_setup =
false;
504 size_timing_pos = new_num;
505 _already_setup =
false;
511 timing_resolution = new_num_in_ps;
512 _already_setup =
false;
558 if (!detector_map_sptr)
559 stir::error(
"Scanner: detector_map not defined. Did you run set_up()?");
561 return detector_map_sptr->get_det_pos_for_index(det_pos);
568 stir::error(
"Scanner: you forgot to call set_up().");
569 if (!detector_map_sptr)
570 stir::error(
"Scanner: detector_map not defined. Did you run set_up()?");
572 return detector_map_sptr->get_coordinate_for_det_pos(det_pos);
579 stir::error(
"Scanner: you forgot to call set_up().");
580 if (!detector_map_sptr)
581 stir::error(
"Scanner: detector_map not defined. Did you run set_up()?");
583 return detector_map_sptr->get_coordinate_for_index(index);
591 stir::error(
"Scanner: you forgot to call set_up().");
592 if (!detector_map_sptr)
593 stir::error(
"Scanner: detector_map not defined. Did you run set_up()?");
595 return detector_map_sptr->find_detection_position_given_cartesian_coordinate(det_pos, cart_coord);
Declaration of class stir::Succeeded.
a templated class for 3-dimensional coordinates.
Definition CartesianCoordinate3D.h:53
A class for storing coordinates of a detection.
Definition DetectionPosition.h:61
int get_max_num_timing_poss() const
Get the maximum number of TOF bins.
Definition Scanner.inl:245
float get_reference_energy() const
get the reference energy in keV of the energy resolution
Definition Scanner.inl:239
float get_default_bin_size() const
get default arc-corrected bin size
Definition Scanner.inl:104
Type get_type() const
get scanner type
Definition Scanner.inl:40
int get_num_axial_blocks() const
get number of axial blocks
Definition Scanner.inl:162
float get_axial_length() const
Definition Scanner.inl:299
void set_num_axial_crystals_per_singles_unit(const int &new_num)
set number of axial crystals per singles unit
Definition Scanner.inl:432
void set_average_depth_of_interaction(const float &new_depth_of_interaction)
set average depth of interaction
Definition Scanner.inl:364
int get_singles_bin_index(int axial_index, int transaxial_index) const
Calculate a singles bin index from axial and transaxial singles bin coordinates.
Definition Scanner.inl:518
bool has_energy_information() const
true if energy_resolution and reference_energy are set
Definition Scanner.inl:371
void set_reference_energy(const float new_num)
set the reference energy (in keV) of the energy resolution
Definition Scanner.inl:453
void set_size_of_timing_poss(float new_num)
Set the delta t which correspnds to the max number of TOF bins.
Definition Scanner.inl:502
void set_num_detector_layers(const int &new_num)
set number of crystal layers (for DOI)
Definition Scanner.inl:411
void set_default_num_arccorrected_bins(const int &new_num)
set the default number of arccorrected_bins
Definition Scanner.inl:350
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#,...
Definition Scanner.inl:565
void set_crystal_map_file_name(const std::string &new_crystal_map_file_name)
set crystal map file name for the generic geometry
Definition Scanner.inl:488
Succeeded find_detection_position_given_cartesian_coordinate(DetectionPosition<> &det_pos, const CartesianCoordinate3D< float > &cart_coord) const
Find detection position at a coordinate.
Definition Scanner.inl:587
float get_intrinsic_azimuthal_tilt() const
get intrinsic tilt in raw sinogram data (in radians)
Definition Scanner.inl:110
int get_num_axial_buckets() const
get number of axial buckets
Definition Scanner.inl:176
int get_num_transaxial_singles_units() const
get number of transaxial singles unit
Definition Scanner.inl:213
void set_type(const Type &new_type)
set scanner type
Definition Scanner.inl:322
int get_num_transaxial_buckets() const
get number of axial buckets
Definition Scanner.inl:182
void set_transaxial_crystal_spacing(const float &new_spacing)
set crystal spacing in transaxial direction
Definition Scanner.inl:467
void set_num_rings(const int &new_num)
set number of rings
Definition Scanner.inl:329
int get_num_transaxial_crystals_per_bucket() const
get crystals in a bucket
Definition Scanner.inl:150
int get_num_detector_layers() const
get number of crystal layers (for DOI)
Definition Scanner.inl:156
int get_num_axial_crystals_per_bucket() const
get crystals in a bucket
Definition Scanner.inl:144
float get_size_of_timing_pos() const
Get the size for one (unmashed) TOF bin in picoseconds.
Definition Scanner.inl:251
int get_num_transaxial_crystals_per_singles_unit() const
get number of transaxial crystals per singles unit.
Definition Scanner.inl:194
int get_num_detectors_per_ring() const
get the number of detectors per ring
Definition Scanner.inl:51
void set_num_transaxial_crystals_per_singles_unit(const int &new_num)
set number of transaxial crystals per singles unit
Definition Scanner.inl:439
float get_energy_resolution() const
get the energy resolution as a fraction at the reference energy
Definition Scanner.inl:233
Type
enum for all predefined scanners
Definition Scanner.h:141
int get_num_axial_crystals_per_singles_unit() const
get number of axial crystals per singles unit
Definition Scanner.inl:188
int get_axial_singles_unit(int singles_bin_index) const
Get the axial singles bin coordinate from a singles bin.
Definition Scanner.inl:540
std::string get_scanner_geometry() const
get scanner geometry
Definition Scanner.inl:269
int get_num_axial_singles_units() const
get number of axial singles units
Definition Scanner.inl:200
void set_num_transaxial_blocks_per_bucket(const int &new_num)
set number of transaxial blocks per bucket
Definition Scanner.inl:397
void set_ring_spacing(const float &new_spacing)
set ring spacing
Definition Scanner.inl:377
int get_transaxial_singles_unit(int singles_bin_index) const
Get the transaxial singles bin coordinate from a singles bin.
Definition Scanner.inl:548
float get_inner_ring_radius() const
get inner ring radius
Definition Scanner.inl:74
void set_num_axial_blocks_per_bucket(const int &new_num)
set number of axial blocks per bucket
Definition Scanner.inl:404
void set_timing_resolution(float new_num_in_ps)
Set timing resolution.
Definition Scanner.inl:509
int get_num_transaxial_blocks() const
get number of axial blocks
Definition Scanner.inl:170
float get_ring_spacing() const
get ring spacing
Definition Scanner.inl:98
void set_default_bin_size(const float &new_size)
set default arc-corrected bin size
Definition Scanner.inl:383
void set_num_axial_crystals_per_block(const int &new_num)
set number of crystals in the axial direction
Definition Scanner.inl:418
float get_average_depth_of_interaction() const
get average depth of interaction
Definition Scanner.inl:86
void set_max_num_non_arccorrected_bins(const int &new_num)
set the maximum number of arccorrected bins
Definition Scanner.inl:343
void set_transaxial_block_spacing(const float &new_spacing)
set block spacing in transaxial direction
Definition Scanner.inl:474
int get_default_num_arccorrected_bins() const
get the default number of arccorrected tangential positions
Definition Scanner.inl:68
void set_num_detectors_per_ring(const int &new_num)
set the namber of detectors per ring
Definition Scanner.inl:336
float get_axial_block_spacing() const
get block spacing in axial direction
Definition Scanner.inl:293
int get_num_axial_blocks_per_bucket() const
get number of axial blocks per bucket
Definition Scanner.inl:126
int get_num_virtual_axial_crystals_per_block() const
Definition Scanner.cxx:1638
int get_num_rings() const
get number of rings
Definition Scanner.inl:46
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 cr...
Definition Scanner.inl:556
int get_num_transaxial_crystals_per_block() const
get number of transaxial crystals
Definition Scanner.inl:138
void set_max_num_timing_poss(int new_num)
Set the maximum number of TOF bins.
Definition Scanner.inl:495
bool is_tof_ready() const
True if it is TOF compatible.
Definition Scanner.inl:263
int get_max_num_views() const
get maximum number of views
Definition Scanner.inl:62
int get_num_transaxial_blocks_per_bucket() const
get number of transaxial blocks per bucket
Definition Scanner.inl:120
void set_axial_block_spacing(const float &new_spacing)
set block spacing in axial direction
Definition Scanner.inl:481
float get_transaxial_crystal_spacing() const
get crystal spacing in transaxial direction
Definition Scanner.inl:281
void set_inner_ring_radius(const float &new_radius)
set inner ring radius
Definition Scanner.inl:357
void set_axial_crystal_spacing(const float &new_spacing)
set crystal spacing in axial direction
Definition Scanner.inl:460
void set_energy_resolution(const float new_num)
set the energy resolution of the system
Definition Scanner.inl:446
int get_num_axial_crystals_per_block() const
get number of crystals in the axial direction
Definition Scanner.inl:132
float get_transaxial_block_spacing() const
get block spacing in transaxial direction
Definition Scanner.inl:287
void set_intrinsic_azimuthal_tilt(const float new_tilt)
in degrees
Definition Scanner.inl:390
float get_effective_ring_radius() const
get effective ring radius
Definition Scanner.inl:92
float get_timing_resolution() const
Get the timing resolution of the scanner in picoseconds.
Definition Scanner.inl:257
float get_axial_crystal_spacing() const
get crystal spacing in axial direction
Definition Scanner.inl:275
int get_max_num_non_arccorrected_bins() const
get the maximum number of arccorrected tangential positions
Definition Scanner.inl:56
void set_num_transaxial_crystals_per_block(const int &new_num)
set number of transaxial crystals
Definition Scanner.inl:425
float get_max_FOV_radius() const
get maximum field of view radius
Definition Scanner.inl:80
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.
Definition Scanner.inl:576
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition Succeeded.h:44
Declaration of stir::error()
void error(const char *const s,...)
Print error with format string a la printf and throw exception.
Definition error.cxx:42