23 #ifndef __stir_IO_stir_ecat7_H__ 24 #define __stir_IO_stir_ecat7_H__ 29 #ifdef HAVE_LLN_MATRIX 30 # define CTISinogram ::Sinogram 35 int map_main_header(
char* bufr, Main_header* header);
36 int mh_update(MatrixFile*);
48 template <
int num_dimensions,
typename elemT>
49 class DiscretisedDensity;
50 template <
typename elemT>
51 class VoxelsOnCartesianGrid;
52 template <
typename elemT>
57 class ProjDataFromStream;
102 void find_scanner(shared_ptr<Scanner>& scanner_ptr,
const Main_header& mhead);
109 std::string
const& cti_name,
110 std::string
const& orig_name,
111 const Scanner& scanner,
112 const int frame_num = 1,
113 const int gate_num = 1,
114 const int data_num = 0,
115 const int bed_num = 0);
124 DiscretisedDensity<3, float>
const& density,
125 const int frame_num = 1,
126 const int gate_num = 1,
127 const int data_num = 0,
128 const int bed_num = 0);
137 NumericType output_type,
138 std::string
const& cti_name,
139 std::string
const& orig_name,
140 const int frame_num = 1,
141 const int gate_num = 1,
142 const int data_num = 0,
143 const int bed_num = 0,
144 const bool write_as_attenuation =
false,
145 float scale_factor = 0.0F);
159 ProjData
const& proj_data,
160 const int frame_num = 1,
161 const int gate_num = 1,
162 const int data_num = 0,
163 const int bed_num = 0,
164 float scale_factor = 0.0F);
178 void make_ECAT7_main_header(Main_header&,
const Scanner&,
const std::string& orig_name, ExamInfo
const& exam_info);
185 Scanner
const& scanner,
186 const std::string& orig_name,
187 DiscretisedDensity<3, float>
const& density);
208 const std::string& orig_name,
209 ExamInfo
const& exam_info,
210 ProjDataInfo
const& proj_data_info,
211 const bool write_as_attenuation =
false,
212 NumericType output_type = NumericType::FLOAT);
223 void make_subheader_for_ECAT7(Scan3D_subheader& shead,
const Main_header& mhead,
const ProjDataInfo& proj_data_info);
240 make_pdfs_from_matrix(MatrixFile*
const mptr, MatrixData*
const matrix,
const shared_ptr<std::iostream>& stream_ptr);
253 const std::string& ECAT7_filename,
266 VoxelsOnCartesianGrid<float>* ECAT7_to_VoxelsOnCartesianGrid(
267 const std::string& ECAT7_filename,
const int frame_num,
const int gate_num,
const int data_num,
const int bed_num);
276 ECAT7_to_PDFS(
const std::string& ECAT7_filename,
const int frame_num,
const int gate_num,
const int data_num,
const int bed_num);
bool is_ECAT7_emission_file(const std::string &filename)
checks if the file is in ECAT6 format and if the file contains emission sinograms (or blank/transmisi...
Definition: stir_ecat7.cxx:168
void make_subheader_for_ECAT7(Scan3D_subheader &shead, const Main_header &mhead, const ProjDataInfo &proj_data_info)
Fill in most of the subheader.
Definition: stir_ecat7.cxx:1143
Succeeded DiscretisedDensity_to_ECAT7(MatrixFile *mptr, DiscretisedDensity< 3, float > const &density, const int frame_num=1, const int gate_num=1, const int data_num=0, const int bed_num=0)
Write an (extra) image to an existing ECAT7 file.
Definition: stir_ecat7.cxx:1780
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast (or corresponding b...
bool is_ECAT7_attenuation_file(const std::string &filename)
checks if the file is in ECAT6 format and if the file contains attenuation correction factors ...
Definition: stir_ecat7.cxx:177
bool is_ECAT7_file(const std::string &filename)
checks if the file is in ECAT7 formatThis partly relies on the implementation of matrix_open in the L...
Definition: stir_ecat7.cxx:153
Succeeded read_ECAT7_main_header(Main_header &mhead, const std::string &filename)
read an ECAT7 main header from a file
Definition: stir_ecat7.cxx:111
Succeeded write_basic_interfile_header_for_ECAT7(std::string &interfile_header_name, const std::string &ECAT7_filename, const int frame_num, const int gate_num, const int data_num, const int bed_num)
Writes an Interfile header that 'points' into an ECAT7 file.
Definition: stir_ecat7.cxx:1624
ProjDataFromStream * make_pdfs_from_matrix(MatrixFile *const mptr, MatrixData *const matrix, const shared_ptr< std::iostream > &stream_ptr)
Make a ProjDataFromStream object that 'points' into an ECAT7 file.
Succeeded ProjData_to_ECAT7(MatrixFile *mptr, ProjData const &proj_data, const int frame_num=1, const int gate_num=1, const int data_num=0, const int bed_num=0, float scale_factor=0.0F)
Write an (extra) set of sinograms to an existing ECAT7 file.
Definition: stir_ecat7.cxx:2211
shared_ptr< ExamInfo > read_ECAT7_exam_info(const std::string &filename)
read ExamInfo from an ECAT7 file
Definition: stir_ecat7.cxx:582
NumericType make_ECAT7_main_header(Main_header &mhead, const std::string &orig_name, ExamInfo const &exam_info, ProjDataInfo const &proj_data_info, const bool write_as_attenuation=false, NumericType output_type=NumericType::FLOAT)
Fill in most of the main header given an orig_name and a proj_data_info.
Definition: stir_ecat7.cxx:793
void find_scanner(shared_ptr< Scanner > &scanner_ptr, const Main_header &mhead)
determine scanner type from the main_header
Definition: stir_ecat7.cxx:184
This file declares the stir::NumericType class.
bool is_ECAT7_image_file(const std::string &filename)
checks if the file is in ECAT6 format and if the file contains images
Definition: stir_ecat7.cxx:160
Declaration of routines which convert ECAT things into our building blocks and vice versa...