STIR  6.2.0
stir_ecat_common.h
Go to the documentation of this file.
1 //
2 //
14 /*
15  Copyright (C) 2000 PARAPET partners
16  Copyright (C) 2000- 2009, Hammersmith Imanet Ltd
17  This file is part of STIR.
18 
19  SPDX-License-Identifier: Apache-2.0 AND License-ref-PARAPET-license
20 
21  See STIR/LICENSE.txt for details
22 */
23 
24 #ifndef __stir_IO_stir_ecat_common_H__
25 #define __stir_IO_stir_ecat_common_H__
26 
27 #include "stir/common.h"
28 #include <vector>
29 
30 //*************** namespace macros
31 
32 #define START_NAMESPACE_ECAT \
33  namespace ecat \
34  {
35 #define END_NAMESPACE_ECAT }
36 #define USING_NAMESPACE_ECAT using namespace ecat;
37 
38 #define START_NAMESPACE_ECAT6 \
39  namespace ecat6 \
40  {
41 #define END_NAMESPACE_ECAT6 }
42 #define USING_NAMESPACE_ECAT6 using namespace ecat6;
43 
44 #define START_NAMESPACE_ECAT7 \
45  namespace ecat7 \
46  {
47 #define END_NAMESPACE_ECAT7 }
48 #define USING_NAMESPACE_ECAT7 using namespace ecat7;
49 
50 START_NAMESPACE_STIR
51 
52 class NumericType;
53 class ByteOrder;
54 class Scanner;
55 class ProjDataInfo;
56 
57 START_NAMESPACE_ECAT
58 
60 
66 typedef enum
67 {
68  ECAT_unknown_data_type = 0,
69  ECAT_Byte_data_type = 1,
70  ECAT_I2_little_endian_data_type = 2,
71  ECAT_I4_little_endian_data_type = 3,
72  ECAT_R4_VAX_data_type = 4,
73  ECAT_R4_IEEE_big_endian_data_type = 5,
74  ECAT_I2_big_endian_data_type = 6,
75  ECAT_I4_big_endian_data_type = 7
76 } ECATDataType;
77 
79 
82 void find_type_from_ECAT_data_type(NumericType& type, ByteOrder& byte_order, const short data_type);
83 
85 
88 short find_ECAT_data_type(const NumericType& type, const ByteOrder& byte_order);
89 
91 
94 short find_ECAT_system_type(const Scanner& scanner);
95 
97 
100 Scanner* find_scanner_from_ECAT_system_type(const short system_type);
101 
103 
107 std::vector<int> find_segment_sequence(const ProjDataInfo& pdi);
108 
110 
114 std::vector<int> find_timing_poss_sequence(const ProjDataInfo& pdi);
115 
116 END_NAMESPACE_ECAT
117 
118 END_NAMESPACE_STIR
119 #endif
short find_ECAT_system_type(const Scanner &scanner)
Find the value used in the ECAT Main header for a given scanner.
Definition: stir_ecat_common.cxx:115
This class provides member functions to find out what byte-order your machine is and to swap numbers...
Definition: ByteOrder.h:99
void find_type_from_ECAT_data_type(NumericType &type, ByteOrder &byte_order, const short data_type)
Find out which NumericType and ByteOrder corresponds to a ECAT data type.
Definition: stir_ecat_common.cxx:36
A class for storing some info on the scanner.
Definition: Scanner.h:107
Scanner * find_scanner_from_ECAT_system_type(const short system_type)
Find the scanner corresponding to the system type in the main header.
Definition: stir_ecat_common.cxx:155
std::vector< int > find_segment_sequence(const ProjDataInfo &pdi)
Return the sequence of how Siemens stores segments.
Definition: stir_ecat_common.cxx:186
ECATDataType
Possible values for the data_type field in ECAT headers.
Definition: stir_ecat_common.h:66
provides names for some numeric types and methods for finding their properties.
Definition: NumericType.h:54
short find_ECAT_data_type(const NumericType &type, const ByteOrder &byte_order)
Find out which ECAT data type corresponds to a certain NumericType and ByteOrder. ...
Definition: stir_ecat_common.cxx:76
basic configuration include file
An (abstract base) class that contains information on the projection data.
Definition: ProjDataInfo.h:69
std::vector< int > find_timing_poss_sequence(const ProjDataInfo &pdi)
Return the sequence of how Siemens stores TOF bins.
Definition: stir_ecat_common.cxx:202