|
STIR 6.4.0
|

Classes | |
| class | stir::InterfileDynamicDiscretisedDensityOutputFileFormat |
| Implementation of OutputFileFormat paradigm for the Interfile format. More... | |
| class | stir::MinimalInterfileHeader |
| a minimal class for Interfile keywords (and parsing) common to all types of data More... | |
| class | stir::InterfileHeader |
| a class for Interfile keywords (and parsing) common to all types of data More... | |
| class | stir::InterfileImageHeader |
| a class for Interfile keywords (and parsing) specific to images More... | |
| class | stir::InterfilePDFSHeader |
| a class for Interfile keywords (and parsing) specific to projection data (i.e. ProjDataFromStream) More... | |
| class | stir::InterfileHeaderSiemens |
| a class for Interfile keywords (and parsing) common to all types of data More... | |
| class | stir::InterfileRawDataHeaderSiemens |
| a class for Interfile keywords (and parsing) specific to Siemens PET projection, list mode data or norm data More... | |
| class | stir::InterfilePDFSHeaderSiemens |
| a class for Interfile keywords (and parsing) specific to projection data (i.e. ProjDataFromStream) for Siemens PET scanners More... | |
| class | stir::InterfileListmodeHeaderSiemens |
| a class for Interfile keywords (and parsing) specific to Siemens listmode data (in PETLINK format) More... | |
| class | stir::InterfileNormHeaderSiemens |
| a class for Interfile keywords (and parsing) specific to Siemens (component-based) normalisation data More... | |
| class | stir::InterfileOutputFileFormat |
| Implementation of OutputFileFormat paradigm for the Interfile format. More... | |
| class | stir::InterfileParametricDiscretisedDensityOutputFileFormat< DiscDensityT > |
| Implementation of OutputFileFormat paradigm for the Interfile format. More... | |
| class | stir::InterfilePDFSHeaderSPECT |
| a class for Interfile keywords (and parsing) specific to SPECT projection data More... | |
Functions | |
| bool | stir::is_interfile_signature (const char *const signature) |
| Checks if the signature corresponds to the start of an interfile header. | |
| VoxelsOnCartesianGrid< float > * | stir::read_interfile_image (std::istream &input, const std::string &directory_for_data="") |
| This reads the first 3d image in an Interfile header file, given as a stream. | |
| VoxelsOnCartesianGrid< float > * | stir::read_interfile_image (const std::string &filename) |
| This reads the first 3d image in an Interfile header file, given as a filename. | |
| Succeeded | stir::write_basic_interfile_image_header (const std::string &header_file_name, const std::string &image_file_name, const ExamInfo &exam_info, const IndexRange< 3 > &index_range, const CartesianCoordinate3D< float > &voxel_size, const CartesianCoordinate3D< float > &origin, const NumericType output_type, const ByteOrder byte_order, const VectorWithOffset< float > &scaling_factors, const VectorWithOffset< unsigned long > &file_offsets, const std::vector< std::string > &data_type_descriptions=std::vector< std::string >()) |
| This outputs an Interfile header for an image. | |
| const VectorWithOffset< unsigned long > | stir::compute_file_offsets (int number_of_time_frames, const NumericType output_type, const Coordinate3D< int > &dim, unsigned long initial_offset=0) |
| a utility function that computes the file offsets of subsequent images | |
| template<class elemT> | |
| Succeeded | stir::write_basic_interfile (const std::string &filename, const ArrayType< 3, elemT > &image, const CartesianCoordinate3D< float > &voxel_size, const CartesianCoordinate3D< float > &origin, const NumericType output_type=NumericType::FLOAT, const float scale=0, const ByteOrder byte_order=ByteOrder::native) |
| This outputs an Interfile header and data for a ArrayType<3,elemT> object. | |
| template<class elemT> | |
| Succeeded | stir::write_basic_interfile (const std::string &filename, const ExamInfo &exam_info, const ArrayType< 3, elemT > &image, const CartesianCoordinate3D< float > &voxel_size, const CartesianCoordinate3D< float > &origin, const NumericType output_type=NumericType::FLOAT, const float scale=0, const ByteOrder byte_order=ByteOrder::native) |
| This outputs an Interfile header and data for a ArrayType<3,elemT> object. | |
| template<class elemT> | |
| Succeeded | stir::write_basic_interfile (const std::string &filename, const ArrayType< 3, elemT > &image, const NumericType output_type=NumericType::FLOAT, const float scale=0, const ByteOrder byte_order=ByteOrder::native) |
| This outputs an Interfile header and data for a ArrayType<3,elemT> object, assuming unit voxel sizes. | |
| Succeeded | stir::write_basic_interfile (const std::string &filename, const VoxelsOnCartesianGrid< float > &image, const NumericType output_type=NumericType::FLOAT, const float scale=0, const ByteOrder byte_order=ByteOrder::native) |
| This outputs an Interfile header and data for a VoxelsOnCartesianGrid<float> object. | |
| Succeeded | stir::write_basic_interfile (const std::string &filename, const DiscretisedDensity< 3, float > &image, const NumericType output_type=NumericType::FLOAT, const float scale=0, const ByteOrder byte_order=ByteOrder::native) |
| This outputs an Interfile header and data for a DiscretisedDensity<3,float> object. | |
| ProjDataFromStream * | stir::read_interfile_PDFS (std::istream &input, const std::string &directory_for_data="", const std::ios::openmode openmode=std::ios::in) |
| This reads the first 3D sinogram from an Interfile header, given as a stream. | |
| ProjDataFromStream * | stir::read_interfile_PDFS (const std::string &filename, const std::ios::openmode open_mode) |
| This reads the first 3D sinogram from an Interfile header, given as a filename. | |
| Succeeded | stir::write_basic_interfile_PDFS_header (const std::string &header_filename, const std::string &data_filename, const ProjDataFromStream &pdfs) |
| This writes an Interfile header appropriate for the ProjDataFromStream object. | |
| Succeeded | stir::write_basic_interfile_PDFS_header (const std::string &data_filename, const ProjDataFromStream &pdfs) |
| This function writes an Interfile header for the pdfs object. | |
| bool stir::is_interfile_signature | ( | const char *const | signature | ) |
Checks if the signature corresponds to the start of an interfile header.
The first line of an Interfile header should contain the
INTERFILE :=
(potentially preceded by an exclamation mark, and maybe in mixed or lower case). This function checks if the list of characters pointed to by signature satifies these requirements.
References is_interfile_signature(), and standardise_interfile_keyword().
Referenced by is_interfile_signature(), stir::DiscretisedDensity< num_dimensions, elemT >::read_from_file(), stir::ProjData::read_from_file(), and stir::TimeFrameDefinitions::TimeFrameDefinitions().
| VoxelsOnCartesianGrid< float > * stir::read_interfile_image | ( | std::istream & | input, |
| const std::string & | directory_for_data = "" ) |
This reads the first 3d image in an Interfile header file, given as a stream.
If there is trouble interpreting the header, VoxelsOnCartesianGrid<float>::ask_parameters() is called instead If the name for the data file is not an absolute pathname, directory_for_data is prepended (if not NULL).
This should normally never be used. Use read_from_file<DiscretisedDensity<3,float> >() instead.
References stir::InterfileHeader::file_byte_order, stir::TimeFrameDefinitions::get_num_frames(), max_filename_length, open_read_binary(), read_data(), read_interfile_image(), stir::ExamData::set_exam_info(), stir::TimeFrameDefinitions::set_num_time_frames(), stir::InterfileHeader::type_of_numbers, and warning().
Referenced by stir::DiscretisedDensity< num_dimensions, elemT >::read_from_file(), stir::InterfileImageInputFileFormat::read_from_file(), stir::InterfileImageInputFileFormat::read_from_file(), read_interfile_image(), and read_interfile_image().
| VoxelsOnCartesianGrid< float > * stir::read_interfile_image | ( | const std::string & | filename | ) |
This reads the first 3d image in an Interfile header file, given as a filename.
The function first opens a stream from 'filename' and then calls the previous function with 'directory_for_data' set to the directory part of 'filename'.
This should normally never be used. Use read_from_file<DiscretisedDensity<3,float> >() instead.
References error(), get_directory_name(), max_filename_length, and read_interfile_image().
| Succeeded stir::write_basic_interfile_image_header | ( | const std::string & | header_file_name, |
| const std::string & | image_file_name, | ||
| const ExamInfo & | exam_info, | ||
| const IndexRange< 3 > & | index_range, | ||
| const CartesianCoordinate3D< float > & | voxel_size, | ||
| const CartesianCoordinate3D< float > & | origin, | ||
| const NumericType | output_type, | ||
| const ByteOrder | byte_order, | ||
| const VectorWithOffset< float > & | scaling_factors, | ||
| const VectorWithOffset< unsigned long > & | file_offsets, | ||
| const std::vector< std::string > & | data_type_descriptions = std::vector<std::string>() ) |
This outputs an Interfile header for an image.
A .hv extension will be added to the header_file_name if none is present.
In fact, at the moment 2 headers are output:
They both point to the same file with binary data.
References add_extension(), stir::MinimalInterfileHeader::double_value_not_set, error(), stir::ExamInfo::get_calibration_factor(), stir::VectorWithOffset< T >::get_length(), stir::VectorWithOffset< T >::get_max_index(), stir::IndexRange< num_dimensions >::get_regular_range(), stir::NumericType::integer_type(), stir::ByteOrder::little_endian, replace_extension(), secs_since_Unix_epoch_to_Interfile_datetime(), stir::NumericType::signed_type(), stir::NumericType::size_in_bytes(), warning(), and write_basic_interfile_image_header().
Referenced by stir::ecat::ecat7::write_basic_interfile_header_for_ECAT7(), and write_basic_interfile_image_header().
| Succeeded stir::write_basic_interfile | ( | const std::string & | filename, |
| const ArrayType< 3, elemT > & | image, | ||
| const CartesianCoordinate3D< float > & | voxel_size, | ||
| const CartesianCoordinate3D< float > & | origin, | ||
| const NumericType | output_type = NumericType::FLOAT, | ||
| const float | scale = 0, | ||
| const ByteOrder | byte_order = ByteOrder::native ) |
This outputs an Interfile header and data for a ArrayType<3,elemT> object.
Extension .v will be added to the parameter 'filename' (if no extension present). Extensions .hv (and .ahv) will be used for the header filename.
References stir::ByteOrder::native, and write_basic_interfile().
Referenced by stir::InterfileDynamicDiscretisedDensityOutputFileFormat::actual_write_to_file(), stir::InterfileOutputFileFormat::actual_write_to_file(), write_basic_interfile(), write_basic_interfile(), write_basic_interfile(), write_basic_interfile(), and write_basic_interfile().
| Succeeded stir::write_basic_interfile | ( | const std::string & | filename, |
| const ExamInfo & | exam_info, | ||
| const ArrayType< 3, elemT > & | image, | ||
| const CartesianCoordinate3D< float > & | voxel_size, | ||
| const CartesianCoordinate3D< float > & | origin, | ||
| const NumericType | output_type = NumericType::FLOAT, | ||
| const float | scale = 0, | ||
| const ByteOrder | byte_order = ByteOrder::native ) |
This outputs an Interfile header and data for a ArrayType<3,elemT> object.
Extension .v will be added to the parameter 'filename' (if no extension present). Extensions .hv (and .ahv) will be used for the header filename.
References stir::ByteOrder::native, and write_basic_interfile().
| Succeeded stir::write_basic_interfile | ( | const std::string & | filename, |
| const ArrayType< 3, elemT > & | image, | ||
| const NumericType | output_type = NumericType::FLOAT, | ||
| const float | scale = 0, | ||
| const ByteOrder | byte_order = ByteOrder::native ) |
This outputs an Interfile header and data for a ArrayType<3,elemT> object, assuming unit voxel sizes.
Extension .v will be added to the parameter 'filename' (if no extension present). Extensions .hv (and .ahv) will be used for the header filename.
References stir::ByteOrder::native, and write_basic_interfile().
| Succeeded stir::write_basic_interfile | ( | const std::string & | filename, |
| const VoxelsOnCartesianGrid< float > & | image, | ||
| const NumericType | output_type = NumericType::FLOAT, | ||
| const float | scale = 0, | ||
| const ByteOrder | byte_order = ByteOrder::native ) |
This outputs an Interfile header and data for a VoxelsOnCartesianGrid<float> object.
Extension .v will be added to the parameter 'filename' (if no extension present). Extensions .hv (and .ahv) will be used for the header filename.
References stir::DiscretisedDensityOnCartesianGrid< num_dimensions, elemT >::get_grid_spacing(), stir::DiscretisedDensity< num_dimensions, elemT >::get_origin(), and write_basic_interfile().
| Succeeded stir::write_basic_interfile | ( | const std::string & | filename, |
| const DiscretisedDensity< 3, float > & | image, | ||
| const NumericType | output_type = NumericType::FLOAT, | ||
| const float | scale = 0, | ||
| const ByteOrder | byte_order = ByteOrder::native ) |
This outputs an Interfile header and data for a DiscretisedDensity<3,float> object.
Extension .v will be added to the parameter 'filename' (if no extension present). Extensions .hv (and .ahv) will be used for the header filename.
Currently the DiscretisedDensity<3,float>& object has to be a reference to a VoxelsOnCartesianGrid<float> object.
References write_basic_interfile().
| ProjDataFromStream * stir::read_interfile_PDFS | ( | std::istream & | input, |
| const std::string & | directory_for_data = "", | ||
| const std::ios::openmode | openmode = std::ios::in ) |
This reads the first 3D sinogram from an Interfile header, given as a stream.
If there is trouble interpreting the header, ProjDataFromStream::ask_parameters() is called instead
| input | A stream giving the Interfile header. |
| directory_for_data | If the name for the data file is not an absolute pathname, this string is prepended. |
| openmode | Mode for opening the data file. ios::binary will be added by the code. |
References read_interfile_PDFS().
Referenced by stir::ProjData::read_from_file(), read_interfile_PDFS(), and read_interfile_PDFS().
| ProjDataFromStream * stir::read_interfile_PDFS | ( | const std::string & | filename, |
| const std::ios::openmode | open_mode ) |
This reads the first 3D sinogram from an Interfile header, given as a filename.
This first opens a stream and then calls the previous function with 'directory_for_data' set to the directory part of 'filename'.
This should normally never be used. Use ProjData::read_from_file() instead.
References read_interfile_PDFS(), and write_basic_interfile_PDFS_header().
| Succeeded stir::write_basic_interfile_PDFS_header | ( | const std::string & | header_filename, |
| const std::string & | data_filename, | ||
| const ProjDataFromStream & | pdfs ) |
This writes an Interfile header appropriate for the ProjDataFromStream object.
A .hs extension will be added to the header_file_name if none is present.
References _PI, add_extension(), stir::VectorWithOffset< T >::begin(), stir::VectorWithOffset< T >::end(), error(), stir::ProjDataFromStream::get_byte_order_in_stream(), stir::ProjDataFromStream::get_data_type_in_stream(), stir::Scanner::get_effective_ring_radius(), stir::NumericType::get_Interfile_info(), stir::DataWithProjDataInfo::get_num_views(), stir::ProjDataFromStream::get_offset_in_stream(), stir::DataWithProjDataInfo::get_proj_data_info_sptr(), stir::Scanner::get_ring_spacing(), stir::ProjDataFromStream::get_scale_factor(), stir::ProjDataFromStream::get_segment_sequence_in_stream(), stir::ProjDataFromStream::get_storage_order(), stir::ProjDataFromStream::get_timing_poss_sequence_in_stream(), stir::ByteOrder::little_endian, stir::Scanner::parameter_info(), warning(), and write_basic_interfile_PDFS_header().
Referenced by read_interfile_PDFS(), stir::ecat::ecat7::write_basic_interfile_header_for_ECAT7(), write_basic_interfile_PDFS_header(), and write_basic_interfile_PDFS_header().
| Succeeded stir::write_basic_interfile_PDFS_header | ( | const std::string & | data_filename, |
| const ProjDataFromStream & | pdfs ) |
This function writes an Interfile header for the pdfs object.
The header_filename is found by replacing the extension in the data_filename with .hs
References add_extension(), find_filename(), find_pos_of_extension(), max_filename_length, replace_extension(), and write_basic_interfile_PDFS_header().