33 #ifndef __stir_buildblock_SCANNER_H__ 34 #define __stir_buildblock_SCANNER_H__ 46 #include <boost/algorithm/string.hpp> 47 #include <boost/unordered_map.hpp> 113 static Scanner* ask_parameters();
116 static Scanner* get_scanner_from_name(
const std::string& name);
121 static std::string list_all_names();
127 static std::list<std::string> get_names_of_predefined_scanners();
176 SAFIRDualRingPrototype,
178 UPENN_5rings_no_gaps,
180 UPENN_6rings_no_gaps,
181 User_defined_scanner,
197 const std::list<std::string>& list_of_names_v,
198 int num_detectors_per_ring_v,
200 int max_num_non_arccorrected_bins_v,
201 int default_num_arccorrected_bins_v,
202 float inner_ring_radius_v,
203 float average_depth_of_interaction_v,
204 float ring_spacing_v,
206 float intrinsic_tilt_v,
207 int num_axial_blocks_per_bucket_v,
208 int num_transaxial_blocks_per_bucket_v,
209 int num_axial_crystals_per_block_v,
210 int num_transaxial_crystals_per_block_v,
211 int num_axial_crystals_per_singles_unit_v,
212 int num_transaxial_crystals_per_singles_unit_v,
213 int num_detector_layers_v,
214 float energy_resolution_v = -1.0f,
215 float reference_energy_v = -1.0f,
216 short int max_num_of_timing_poss = -1,
217 float size_timing_pos = -1.0f,
218 float timing_resolution = -1.0f,
219 const std::string& scanner_geometry_v =
"Cylindrical",
220 float axial_crystal_spacing_v = -1.0f,
221 float transaxial_crystal_spacing_v = -1.0f,
222 float axial_block_spacing_v = -1.0f,
223 float transaxial_block_spacing_v = -1.0f,
224 const std::string& crystal_map_file_name =
"");
233 const std::string& name,
234 int num_detectors_per_ring_v,
236 int max_num_non_arccorrected_bins_v,
237 int default_num_arccorrected_bins_v,
238 float inner_ring_radius_v,
239 float average_depth_of_interaction_v,
240 float ring_spacing_v,
242 float intrinsic_tilt_v,
243 int num_axial_blocks_per_bucket_v,
244 int num_transaxial_blocks_per_bucket_v,
245 int num_axial_crystals_per_block_v,
246 int num_transaxial_crystals_per_block_v,
247 int num_axial_crystals_per_singles_unit_v,
248 int num_transaxial_crystals_per_singles_unit_v,
249 int num_detector_layers_v,
250 float energy_resolution_v = -1.0f,
251 float reference_energy_v = -1.0f,
252 short int max_num_of_timing_poss = -1,
253 float size_timing_pos = -1.0f,
254 float timing_resolution = -1.0f,
255 const std::string& scanner_geometry_v =
"Cylindrical",
256 float axial_crystal_spacing_v = -1.0f,
257 float transaxial_crystal_spacing_v = -1.0f,
258 float axial_block_spacing_v = -1.0f,
259 float transaxial_block_spacing_v = -1.0f,
260 const std::string& crystal_map_file_name =
"");
266 virtual void set_up();
269 std::string parameter_info()
const;
271 const std::string& get_name()
const;
273 const std::list<std::string>& get_all_names()
const;
275 std::string list_names()
const;
278 bool operator==(
const Scanner& scanner)
const;
279 inline bool operator!=(
const Scanner& scanner)
const;
282 inline Type get_type()
const;
293 inline int get_num_rings()
const;
295 inline int get_num_detectors_per_ring()
const;
305 inline int get_max_num_non_arccorrected_bins()
const;
312 inline int get_default_num_arccorrected_bins()
const;
315 inline int get_max_num_views()
const;
317 inline float get_inner_ring_radius()
const;
319 inline float get_max_FOV_radius()
const;
321 inline float get_effective_ring_radius()
const;
323 inline float get_average_depth_of_interaction()
const;
325 inline float get_ring_spacing()
const;
327 inline float get_default_bin_size()
const;
334 inline float get_intrinsic_azimuthal_tilt()
const;
337 inline int get_num_transaxial_blocks_per_bucket()
const;
340 inline int get_num_axial_blocks_per_bucket()
const;
342 inline int get_num_axial_crystals_per_block()
const;
344 inline int get_num_transaxial_crystals_per_block()
const;
346 inline int get_num_transaxial_crystals_per_bucket()
const;
348 inline int get_num_axial_crystals_per_bucket()
const;
350 inline int get_num_detector_layers()
const;
352 inline int get_num_axial_blocks()
const;
354 inline int get_num_transaxial_blocks()
const;
356 inline int get_num_axial_buckets()
const;
358 inline int get_num_transaxial_buckets()
const;
361 inline int get_num_axial_crystals_per_singles_unit()
const;
363 inline int get_num_transaxial_crystals_per_singles_unit()
const;
367 inline int get_num_axial_singles_units()
const;
369 inline int get_num_transaxial_singles_units()
const;
371 inline int get_num_singles_units()
const;
374 inline int get_max_num_timing_poss()
const;
380 inline float get_size_of_timing_pos()
const;
386 inline float get_timing_resolution()
const;
395 float get_coincidence_window_width_in_ps()
const;
398 float get_coincidence_window_width_in_mm()
const;
408 int get_num_virtual_axial_crystals_per_block()
const;
409 int get_num_virtual_transaxial_crystals_per_block()
const;
410 void set_num_virtual_axial_crystals_per_block(
int);
411 void set_num_virtual_transaxial_crystals_per_block(
int);
418 inline std::string get_scanner_geometry()
const;
420 inline float get_axial_crystal_spacing()
const;
422 inline float get_transaxial_crystal_spacing()
const;
424 inline float get_axial_block_spacing()
const;
426 inline float get_transaxial_block_spacing()
const;
430 inline float get_axial_length()
const;
435 inline std::string get_crystal_map_file_name()
const;
449 inline float get_energy_resolution()
const;
452 inline float get_reference_energy()
const;
454 inline bool has_energy_information()
const;
466 inline void set_type(
const Type& new_type);
468 inline void set_num_rings(
const int& new_num);
470 inline void set_num_detectors_per_ring(
const int& new_num);
472 inline void set_max_num_non_arccorrected_bins(
const int& new_num);
474 inline void set_default_num_arccorrected_bins(
const int& new_num);
476 inline void set_inner_ring_radius(
const float& new_radius);
478 inline void set_average_depth_of_interaction(
const float& new_depth_of_interaction);
480 inline void set_ring_spacing(
const float& new_spacing);
482 inline void set_default_bin_size(
const float& new_size);
484 inline void set_intrinsic_azimuthal_tilt(
const float new_tilt);
487 inline void set_num_transaxial_blocks_per_bucket(
const int& new_num);
490 inline void set_num_axial_blocks_per_bucket(
const int& new_num);
492 inline void set_num_axial_crystals_per_block(
const int& new_num);
494 inline void set_num_transaxial_crystals_per_block(
const int& new_num);
496 inline void set_num_detector_layers(
const int& new_num);
498 inline void set_num_axial_crystals_per_singles_unit(
const int& new_num);
500 inline void set_num_transaxial_crystals_per_singles_unit(
const int& new_num);
513 void set_scanner_geometry(
const std::string& new_scanner_geometry);
515 inline void set_axial_crystal_spacing(
const float& new_spacing);
517 inline void set_transaxial_crystal_spacing(
const float& new_spacing);
519 inline void set_axial_block_spacing(
const float& new_spacing);
521 inline void set_transaxial_block_spacing(
const float& new_spacing);
524 inline void set_crystal_map_file_name(
const std::string& new_crystal_map_file_name);
530 inline void set_energy_resolution(
const float new_num);
533 inline void set_reference_energy(
const float new_num);
535 inline void set_max_num_timing_poss(
int new_num);
537 inline void set_size_of_timing_poss(
float new_num);
539 inline void set_timing_resolution(
float new_num_in_ps);
545 inline int get_singles_bin_index(
int axial_index,
int transaxial_index)
const;
552 inline int get_axial_singles_unit(
int singles_bin_index)
const;
555 inline int get_transaxial_singles_unit(
int singles_bin_index)
const;
558 inline bool is_tof_ready()
const;
573 shared_ptr<const DetectorCoordinateMap> get_detector_map_sptr()
const {
return detector_map_sptr; }
578 std::list<std::string> list_of_names;
580 int max_num_non_arccorrected_bins;
581 int default_num_arccorrected_bins;
582 int num_detectors_per_ring;
584 float inner_ring_radius;
585 float average_depth_of_interaction;
586 float max_FOV_radius;
589 float intrinsic_tilt;
591 int num_transaxial_blocks_per_bucket;
592 int num_axial_blocks_per_bucket;
593 int num_axial_crystals_per_block;
594 int num_transaxial_crystals_per_block;
595 int num_detector_layers;
597 int num_axial_crystals_per_singles_unit;
598 int num_transaxial_crystals_per_singles_unit;
605 float energy_resolution;
608 float reference_energy;
610 float timing_resolution;
612 int max_num_of_timing_poss;
614 float size_timing_pos;
620 std::string scanner_geometry;
621 float axial_crystal_spacing;
622 float transaxial_crystal_spacing;
623 float axial_block_spacing;
624 float transaxial_block_spacing;
626 std::string crystal_map_file_name;
627 shared_ptr<DetectorCoordinateMap> detector_map_sptr;
629 void set_detector_map(
const DetectorCoordinateMap::det_pos_to_coord_type& coord_map);
630 void initialise_max_FOV_radius();
633 void read_detectormap_from_file(
const std::string& filename);
636 void set_params(
Type type_v,
637 const std::list<std::string>& list_of_names_v,
639 int max_num_non_arccorrected_bins_v,
640 int default_num_arccorrected_bins_v,
641 int num_detectors_per_ring_v,
642 float inner_ring_radius_v,
643 float average_depth_of_interaction_v,
644 float ring_spacing_v,
646 float intrinsic_tilt_v,
647 int num_axial_blocks_per_bucket_v,
648 int num_transaxial_blocks_per_bucket_v,
649 int num_axial_crystals_per_block_v,
650 int num_transaxial_crystals_per_block_v,
651 int num_axial_crystals_per_singles_unit_v,
652 int num_transaxial_crystals_per_singles_unit_v,
653 int num_detector_layers_v,
654 float energy_resolution_v = -1.0f,
655 float reference_energy = -1.0f,
656 short int max_num_of_timing_poss_v = -1.0f,
657 float size_timing_pos_v = -1.0f,
658 float timing_resolution_v = -1.0f,
659 const std::string& scanner_geometry_v =
"",
660 float axial_crystal_spacing_v = -1.0f,
661 float transaxial_crystal_spacing_v = -1.0f,
662 float axial_block_spacing_v = -1.0f,
663 float transaxial_block_spacing_v = -1.0f,
664 const std::string& crystal_map_file_name =
"");
implementation of inline functions of class Scanner
Type
enum for all predefined scanners
Definition: Scanner.h:140
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast (or corresponding b...
Test class for Blocks.
Definition: test_blocks_on_cylindrical_projectors.cxx:65
A class for storing some info on the scanner.
Definition: Scanner.h:107
Declaration of class stir::DetectorCoordinateMap.
Declaration of class stir::DetectionPosition.
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition: Succeeded.h:43
defines the stir::CartesianCoordinate3D<coordT> class