STIR  6.2.0
Modules | Files | Classes | Typedefs | Functions
Input/Output Library
Collaboration diagram for Input/Output Library:

Modules

 Interfile support in the IO library
 
 ECAT6 ... ECAT8 support in the IO library
 
 support for GE data
 

Files

file  local_InputFileFormatRegistry.cxx
 Instantiations for class stir::InputFileFormatRegistry.
 
file  local_OutputFileFormat_default.cxx
 initialisation of the stir::OutputFileFormat::_default_sptr member
 
file  OutputFileFormat_default.cxx
 initialisation of the stir::OutputFileFormat::_default_sptr member
 
file  FileSignature.h
 Declaration of class stir::FileSignature.
 
file  GEHDF5ListmodeInputFileFormat.h
 Declaration of class stir::GE::RDF_HDF5::IO::GEHDF5ListmodeInputFileFormat.
 
file  GEHDF5Wrapper.h
 Declaration of class stir::GE::RDF_HDF5::GEHDF5Wrapper.
 
file  GEHDF5Wrapper.inl
 Declaration of class stir::GE::RDF_HDF5::GEHDF5Wrapper.
 
file  GIPL_ImageFormat.h
 Applies the dilation filter (i.e. voxel=max(neighbours))
 
file  InputFileFormat.h
 Declaration of class stir::InputFileFormat.
 
file  InputFileFormatRegistry.h
 Declaration of class stir::InputFileFormatRegistry, stir::RegisterInputFileFormat.
 
file  InputStreamFromROOTFile.h
 Declaration of class stir::InputStreamFromROOTFile.
 
file  InputStreamFromROOTFile.inl
 Implementation of class stir::InputStreamFromROOTFile.
 
file  InputStreamFromROOTFileForCylindricalPET.h
 Declaration of class stir::InputStreamFromROOTFileForCylindricalPET.
 
file  InputStreamFromROOTFileForCylindricalPET.inl
 Implementation of class stir::InputStreamFromROOTFileForCylindricalPET.
 
file  InputStreamFromROOTFileForECATPET.h
 Declaration of class stir::InputStreamFromROOTFileForECATPET.
 
file  InputStreamWithRecords.h
 Declaration of class stir::InputStreamWithRecords.
 
file  InputStreamWithRecords.inl
 Implementation of class stir::InputStreamWithRecords.
 
file  InputStreamWithRecordsFromHDF5.h
 Declaration of class stir::GE::RDF_HDF5::InputStreamWithRecordsFromHDF5.
 
file  InputStreamWithRecordsFromHDF5.inl
 Implementation of class stir::GE::RDF_HDF5::InputStreamWithRecordsFromHDF5.
 
file  InputStreamWithRecordsFromUPENN.h
 Declaration of class stir::InputStreamWithRecordsFromUPENN.
 
file  InputStreamWithRecordsFromUPENNbin.h
 Declaration of class stir::InputStreamWithRecordsFromUPENNbin.
 
file  InputStreamWithRecordsFromUPENNbin.inl
 Implementation of class stir::InputStreamWithRecordsFromUPENNbin.
 
file  InputStreamWithRecordsFromUPENNtxt.h
 Declaration of class stir::InputStreamWithRecordsFromUPENNtxt.
 
file  InputStreamWithRecordsFromUPENNtxt.inl
 Implementation of class stir::InputStreamWithRecordsFromUPENNtxt.
 
file  InterfileDynamicDiscretisedDensityInputFileFormat.h
 Declaration of class stir::InterfileDynamicDiscretisedDensityInputFileFormat.
 
file  InterfileImageInputFileFormat.h
 Declaration of class stir::InterfileImageInputFileFormat.
 
file  InterfileParametricDiscretisedDensityInputFileFormat.h
 Declaration of class stir::InterfileParametricDiscretisedDensityInputFileFormat.
 
file  ITKImageInputFileFormat.h
 Declaration of class stir::ITKInputFileFormat.
 
file  ITKOutputFileFormat.h
 Declaration of class stir::ITKOutputFileFormat.
 
file  MultiDynamicDiscretisedDensityInputFileFormat.h
 Declaration of class stir::MultiDynamicDiscretisedDensityInputFileFormat.
 
file  MultiParametricDiscretisedDensityInputFileFormat.h
 Declaration of class stir::MultiParametricDiscretisedDensityInputFileFormat.
 
file  OutputFileFormat.h
 Declaration of class stir::OutputFileFormat.
 
file  read_from_file.h
 Declaration of stir::read_from_file functions (providing easy access to class stir::InputFileFormatRegistry)
 
file  test_IO.h
 A simple program to test the stir::OutputFileFormat function.
 
file  write_to_file.h
 Declaration of stir::write_to_file function (providing easy access to the default stir::OutputFileFormat)
 
file  CListRecordROOT.inl
 Implementation of class stir::InputStreamFromROOTFile.
 
file  GEHDF5ListmodeInputFileFormat.cxx
 Implementations of class stir::GE::RDF_HDF5::IO::GEHDF5ListmodeInputFileFormat.
 
file  GEHDF5Wrapper.cxx
 Declaration of class stir::GE::RDF_HDF5::GEHDF5Wrapper.
 
file  GIPL_ImageFormat.cxx
 Class for reading GIPL data.
 
file  InputFileFormatRegistry.cxx
 Instantiations for class stir::InputFileFormatRegistry.
 
file  InputStreamFromROOTFile.cxx
 Implementation of class stir::InputStreamFromROOTFile.
 
file  InputStreamWithRecordsFromUPENN.cxx
 Implementation of class stir::InputStreamWithRecordsFromUPENN.
 
file  InputStreamWithRecordsFromUPENNbin.cxx
 Implementation of class stir::InputStreamWithRecordsFromUPENNbin.
 
file  InputStreamWithRecordsFromUPENNtxt.cxx
 Implementation of class stir::InputStreamWithRecordsFromUPENNtxt.
 
file  IO_registries.cxx
 File that registers all stir::RegisterObject children in IO.
 
file  ITKImageInputFileFormat.cxx
 Declaration of class stir::ITKImageInputFileFormat.
 
file  ITKOutputFileFormat.cxx
 Implementation of class stir::ITKOutputFileFormat.
 
file  OutputFileFormat.cxx
 Instantiations of the stir::OutputFileFormat class.
 
file  OutputFileFormat_default.cxx
 initialisation of the stir::OutputFileFormat::_default_sptr member
 
file  test_IO_DiscretisedDensity.cxx
 A simple program to test the stir::OutputFileFormat function.
 
file  test_IO_DynamicDiscretisedDensity.cxx
 A simple program to test the stir::OutputFileFormat function.
 
file  test_IO_ParametricDiscretisedDensity.cxx
 A simple program to test the stir::OutputFileFormat function.
 

Classes

class  stir::FileSignature
 A class to read/store the file signature. More...
 
class  stir::GE::RDF_HDF5::GEHDF5ListmodeInputFileFormat
 Class for being able to read list mode data from the GE Signa PET/MR scanner via the listmode-data registry. More...
 
class  stir::GE::RDF_HDF5::GEHDF5Wrapper
 A class that extracts and reads the necessary data from GE HDF5 input files. More...
 
class  stir::InputFileFormat< DataT >
 Base-class for file-formats for reading. More...
 
class  stir::InputFileFormatRegistry< DataT >
 A class for registering (and finding) all input file formats. More...
 
struct  stir::RegisterInputFileFormat< Format >
 A helper class to allow automatic registration to the default InputFileFormatRegistry. More...
 
class  stir::InputStreamFromROOTFile
 A helper class to read data from a ROOT file Generated by GATE simulation toolkit. More...
 
class  stir::InputStreamFromROOTFileForCylindricalPET
 Declaration of class stir::InputStreamFromROOTFileForCylindricalPET. More...
 
class  stir::InputStreamFromROOTFileForECATPET
 Declaration of class stir::InputStreamFromROOTFileForECATPET. More...
 
class  stir::InputStreamWithRecords< RecordT, OptionsT >
 A helper class to read data from a (presumably binary) stream. More...
 
class  stir::GE::RDF_HDF5::InputStreamWithRecordsFromHDF5< RecordT >
 A helper class to read data from a hdf5 file. More...
 
class  stir::InputStreamWithRecordsFromUPENN
 Base class for reading listmode files from the PENNPet Explorer scanner. More...
 
class  stir::InputStreamWithRecordsFromUPENNbin
 Class for reading binary listmode files from the PENNPet Explorer scanner. More...
 
class  stir::InputStreamWithRecordsFromUPENNtxt
 Class for reading listmode files in text format from the PENNPet Explorer scanner. More...
 
class  stir::InterfileDynamicDiscretisedDensityInputFileFormat
 Class for reading images in Interfile file-format. More...
 
class  stir::InterfileImageInputFileFormat
 Class for reading images in Interfile file-format. More...
 
class  stir::InterfileParametricDiscretisedDensityInputFileFormat
 Class for reading images in Interfile file-format. More...
 
class  stir::ITKImageInputFileFormat< STIRImageType >
 Class for reading images using ITK. More...
 
class  stir::ITKOutputFileFormat
 Implementation of OutputFileFormat paradigm using the ITK library for writing. More...
 
class  stir::MultiDynamicDiscretisedDensityInputFileFormat
 Class for reading images in Multi file-format. More...
 
class  stir::MultiParametricDiscretisedDensityInputFileFormat
 Class for reading images in Multi file-format. More...
 
class  stir::OutputFileFormat< DataT >
 Base class for classes that create output files. More...
 

Typedefs

typedef itk::Image< float, 3 > stir::ITKImageSingle
 Class for reading images in ITK file-format. More...
 

Functions

template<class DataT , class FileT >
unique_ptr< DataT > stir::read_from_file (const FileSignature &signature, FileT file)
 Function that reads data from file using the default InputFileFormatRegistry, using the provided FileSignature to find the matching file format. More...
 
template<class DataT , class FileT >
unique_ptr< DataT > stir::read_from_file (FileT file)
 Function that reads data from file using the default InputFileFormatRegistry. More...
 
template<class DataT >
std::string stir::write_to_file (const std::string &filename, const DataT &data)
 Function that writes data to file using the default OutputFileFormat. More...
 

Detailed Description

Library with classes and functions to read and write images and projection from/to file.

Typedef Documentation

◆ ITKImageSingle

typedef itk::Image<float, 3> stir::ITKImageSingle

Class for reading images in ITK file-format.


Preliminary

Function Documentation

◆ read_from_file() [1/2]

template<class DataT , class FileT >
unique_ptr<DataT> stir::read_from_file ( const FileSignature signature,
FileT  file 
)
inline

Function that reads data from file using the default InputFileFormatRegistry, using the provided FileSignature to find the matching file format.

This is a convenience function that uses InputFileFormatRegistry::find_factory() to find the InputFileFormat factory, and uses it to create the DataT object.

Note that (at the time of writing) InputFileFormatRegistry::find_factory() calls error() if no matching file format was found.

The input file format class used is not for DataT but actually for DataT::hierarchy_base_type. This is necessary such that this function can work for data being from a derived class (e.g. VoxelsOnCartesianGrid) while the input file format is defined for the base (i.e. DiscretisedDensity).

Sadly, this requires that the DataT::hierarchy_base_type typedef exists.

References stir::error(), stir::InputFileFormatRegistry< DataT >::find_factory(), and stir::InputFileFormat< DataT >::read_from_file().

Referenced by stir::ReconstructionTests< target_type >::construct_input_data(), stir::ProjMatrixByBinPinholeSPECTUB::get_mask_image_sptr(), stir::DynamicDiscretisedDensity::get_start_time_in_secs_since_1970(), stir::NonRigidObjectTransformationUsingBSplines< num_dimensions, elemT >::NonRigidObjectTransformationUsingBSplines(), stir::MoveProjData::post_processing(), stir::AnalyticReconstruction::post_processing(), stir::ProjDataRebinning::post_processing(), stir::PoissonLogLikelihoodWithLinearModelForMeanAndDynamicProjData< TargetT >::post_processing(), stir::FindMCNormFactors::post_processing(), stir::QuadraticPrior< float >::post_processing(), stir::LogcoshPrior< elemT >::post_processing(), stir::PoissonLogLikelihoodWithLinearModelForMeanAndListModeData< TargetT >::post_processing(), stir::PoissonLogLikelihoodWithLinearModelForMeanAndGatedProjDataWithMotion< TargetT >::post_processing(), stir::RelativeDifferencePrior< elemT >::post_processing(), stir::ScatterEstimation::post_processing(), stir::ScatterSimulation::post_processing(), stir::LmToProjData::post_processing(), stir::PoissonLogLikelihoodWithLinearModelForMeanAndProjData< TargetT >::post_processing(), stir::ProjMatrixByBinFromFile::ProjMatrixByBinFromFile(), stir::InputFileFormat< ListModeData >::read_from_file(), stir::DiscretisedDensity< 3, float >::read_from_file(), stir::MatchTrackerAndScanner::run(), stir::MultipleProjDataTests::run_tests(), stir::ProjMatrixByBinUsingInterpolationTests::run_tests(), stir::stir_mathTests::run_tests(), stir::DataSymmetriesForBins_PET_CartesianGridTests::run_tests(), stir::ProjMatrixByBinSPECTUB::set_attenuation_image_sptr(), stir::ProjMatrixByBinPinholeSPECTUB::set_attenuation_image_sptr(), stir::ScatterSimulation::set_density_image_for_scatter_points(), stir::DynamicProjData::set_start_time_in_secs_since_1970(), and stir::GE::RDF_HDF5::SinglesRatesFromGEHDF5::SinglesRatesFromGEHDF5().

◆ read_from_file() [2/2]

template<class DataT , class FileT >
unique_ptr<DataT> stir::read_from_file ( FileT  file)
inline

Function that reads data from file using the default InputFileFormatRegistry.

This is a convenience function that first reads the FileSignature, then uses InputFileFormatRegistry::find_factory() to find the factory, which then is used to create the object.

Note that (at the time of writing) InputFileFormatRegistry::find_factory() calls error() if no matching file format was found.

See also
read_from_file(const FileSignature&, FileT)
Example
typedef DiscretisedDensity<3,float> DataType ;
unique_ptr<DataType> density_uptr(read_from_file<DataType>("my_file.hv"));
shared_ptr<DataType> density_sptr(read_from_file<DataType>("another_file.hv"));

◆ write_to_file()

template<class DataT >
std::string stir::write_to_file ( const std::string &  filename,
const DataT &  data 
)
inline

Function that writes data to file using the default OutputFileFormat.

This is a convenience function that uses OutputFileFormat::default_sptr(). It calls error() when the writing failed.

Returns
The actual filename being used (which might be different if no extension was specified).
warning

The output file format class used is not for DataT but actually for DataT::hierarchy_base_type. This is necessary such that this function can work for data being from a derived class (e.g. VoxelsOnCartesianGrid) while the output file format is defined for the base (i.e. DiscretisedDensity).

Sadly, this requires that the DataT::hierarchy_base_type typedef exists.

References stir::error().

Referenced by stir::ReconstructionTests< target_type >::compare(), stir::ParametricQuadraticPrior< TargetT >::compute_gradient(), stir::RelativeDifferencePrior< elemT >::compute_gradient(), stir::PLSPrior< elemT >::compute_gradient(), stir::ProjData::copy_to(), stir::PoissonLogLikelihoodWithLinearModelForMeanAndListModeDataWithProjMatrixByBinTests::run_tests_for_objective_function(), stir::ObjectiveFunctionTests< GeneralisedPrior< DiscretisedDensity< 3, float > >, DiscretisedDensity< 3, float > >::test_gradient(), stir::ObjectiveFunctionTests< GeneralisedPrior< DiscretisedDensity< 3, float > >, DiscretisedDensity< 3, float > >::test_Hessian(), stir::ObjectiveFunctionTests< GeneralisedPrior< DiscretisedDensity< 3, float > >, DiscretisedDensity< 3, float > >::test_Hessian_concavity(), stir::ProjMatrixByBinFromFile::write_to_file(), and stir::GatedDiscretisedDensity::write_to_files().