STIR  6.2.0
Namespaces | Functions

Implementation of functions which read/write Interfile data. More...

#include "stir/ExamInfo.h"
#include "stir/TimeFrameDefinitions.h"
#include "stir/PatientPosition.h"
#include "stir/ImagingModality.h"
#include "stir/IO/interfile.h"
#include "stir/interfile_keyword_functions.h"
#include "stir/IO/InterfileHeader.h"
#include "stir/IO/InterfileHeaderSiemens.h"
#include "stir/IO/InterfilePDFSHeaderSPECT.h"
#include "stir/IndexRange3D.h"
#include "stir/utilities.h"
#include "stir/CartesianCoordinate3D.h"
#include "stir/VoxelsOnCartesianGrid.h"
#include "stir/ProjDataFromStream.h"
#include "stir/ProjDataInfoCylindricalArcCorr.h"
#include "stir/Scanner.h"
#include "stir/Succeeded.h"
#include "stir/IO/write_data.h"
#include "stir/IO/read_data.h"
#include "stir/is_null_ptr.h"
#include "stir/Bin.h"
#include "stir/stream.h"
#include "stir/error.h"
#include "stir/warning.h"
#include "stir/DynamicDiscretisedDensity.h"
#include "stir/modelling/ParametricDiscretisedDensity.h"
#include "stir/date_time_functions.h"
#include <boost/format.hpp>
#include <fstream>
#include <algorithm>
#include "stir/ProjDataInfoBlocksOnCylindricalNoArcCorr.h"
#include "stir/ProjDataInfoGenericNoArcCorr.h"
#include "stir/ProjDataInfoSubsetByView.h"

Namespaces

 stir
 Namespace for the STIR library (and some/most of its applications)
 

Functions

bool stir::is_interfile_signature (const char *const signature)
 Checks if the signature corresponds to the start of an interfile header. More...
 
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. More...
 
DynamicDiscretisedDensity * stir::read_interfile_dynamic_image (std::istream &input, const std::string &directory_for_data)
 Read dynamic image.
 
ParametricDiscretisedDensity< VoxelsOnCartesianGrid< KineticParameters< 2, float > > > * stir::read_interfile_parametric_image (std::istream &input, const std::string &directory_for_data)
 Read parametric 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. More...
 
DynamicDiscretisedDensity * stir::read_interfile_dynamic_image (const std::string &filename)
 Read dynamic image.
 
ParametricDiscretisedDensity< VoxelsOnCartesianGrid< KineticParameters< 2, float > > > * stir::read_interfile_parametric_image (const std::string &filename)
 Read parametric 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. More...
 
template<class elemT >
Succeeded stir::write_basic_interfile (const std::string &filename, const Array< 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 Array<3,elemT> object, assuming unit voxel sizes. More...
 
template<class NUMBER >
Succeeded stir::write_basic_interfile (const string &filename, const ExamInfo &exam_info, const Array< 3, NUMBER > &image, const CartesianCoordinate3D< float > &voxel_size, const CartesianCoordinate3D< float > &origin, const NumericType output_type, const float scale, const ByteOrder byte_order)
 
template<class NUMBER >
Succeeded stir::write_basic_interfile (const string &filename, const Array< 3, NUMBER > &image, const CartesianCoordinate3D< float > &voxel_size, const CartesianCoordinate3D< float > &origin, const NumericType output_type, const float scale, const ByteOrder byte_order)
 
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. More...
 
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. More...
 
Succeeded stir::write_basic_interfile (const string &filename, const ParametricVoxelsOnCartesianGrid &image, const NumericType output_type, const float scale, const ByteOrder byte_order)
 
Succeeded stir::write_basic_interfile (const std::string &filename, const DynamicDiscretisedDensity &image, const NumericType output_type=NumericType::FLOAT, const float scale=0, const ByteOrder byte_order=ByteOrder::native)
 
ProjDataFromStream * stir::read_interfile_PDFS_Siemens (istream &input, const string &directory_for_data, const ios::openmode open_mode)
 
ProjDataFromStream * stir::read_interfile_PDFS (istream &input, const string &directory_for_data, const ios::openmode open_mode)
 
ProjDataFromStream * stir::read_interfile_PDFS (const string &filename, const ios::openmode open_mode)
 
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. More...
 
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. More...
 
template Succeeded stir::write_basic_interfile (const string &filename, const Array< 3, signed short > &, const CartesianCoordinate3D< float > &voxel_size, const CartesianCoordinate3D< float > &origin, const NumericType output_type, const float scale, const ByteOrder byte_order)
 
template Succeeded stir::write_basic_interfile (const string &filename, const Array< 3, unsigned short > &, const CartesianCoordinate3D< float > &voxel_size, const CartesianCoordinate3D< float > &origin, const NumericType output_type, const float scale, const ByteOrder byte_order)
 
template Succeeded stir::write_basic_interfile (const string &filename, const Array< 3, float > &, const CartesianCoordinate3D< float > &voxel_size, const CartesianCoordinate3D< float > &origin, const NumericType output_type, const float scale, const ByteOrder byte_order)
 
template Succeeded stir::write_basic_interfile (const string &filename, const Array< 3, signed short > &image, const NumericType output_type, const float scale, const ByteOrder byte_order)
 
template Succeeded stir::write_basic_interfile (const string &filename, const Array< 3, unsigned short > &image, const NumericType output_type, const float scale, const ByteOrder byte_order)
 
template Succeeded stir::write_basic_interfile (const string &filename, const Array< 3, float > &image, const NumericType output_type, const float scale, const ByteOrder byte_order)
 

Detailed Description

Implementation of functions which read/write Interfile data.

Author
Kris Thielemans
Sanida Mustafovic
PARAPET project
Richard Brown
Parisa Khateri