STIR 6.5.0
Input/Output Library
Collaboration diagram for Input/Output Library:

Topics

 Interfile support in the IO library
 support for "multi" files in the IO library
 ECAT6 ... ECAT8 support in the IO library
 support for GE data
 HDF5 utilities

Files

file  /home/kris/devel/STIRdistrib/STIR/src/experimental/IO/local_InputFileFormatRegistry.cxx
 Instantiations for class stir::InputFileFormatRegistry.
file  /home/kris/devel/STIRdistrib/STIR/src/experimental/IO/local_OutputFileFormat_default.cxx
 initialisation of the stir::OutputFileFormat::_default_sptr member
file  /home/kris/devel/STIRdistrib/STIR/src/experimental/IO/OutputFileFormat_default.cxx
 initialisation of the stir::OutputFileFormat::_default_sptr member
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/FileSignature.h
 Declaration of class stir::FileSignature.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/GEHDF5ListmodeInputFileFormat.h
 Declaration of class stir::GE::RDF_HDF5::IO::GEHDF5ListmodeInputFileFormat.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/GEHDF5Wrapper.h
 Declaration of class stir::GE::RDF_HDF5::GEHDF5Wrapper.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/GEHDF5Wrapper.inl
 Declaration of class stir::GE::RDF_HDF5::GEHDF5Wrapper.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/GIPL_ImageFormat.h
 Applies the dilation filter (i.e. voxel=max(neighbours)).
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/HDF5_utilities.h
 Utility function(s) for HDF5 files.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/InputFileFormat.h
 Declaration of class stir::InputFileFormat.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/InputFileFormatRegistry.h
 Declaration of class stir::InputFileFormatRegistry, stir::RegisterInputFileFormat.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/InputStreamFromROOTFile.h
 Declaration of class stir::InputStreamFromROOTFile.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/InputStreamFromROOTFile.inl
 Implementation of class stir::InputStreamFromROOTFile.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/InputStreamFromROOTFileForCylindricalPET.h
 Declaration of class stir::InputStreamFromROOTFileForCylindricalPET.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/InputStreamFromROOTFileForCylindricalPET.inl
 Implementation of class stir::InputStreamFromROOTFileForCylindricalPET.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/InputStreamFromROOTFileForECATPET.h
 Declaration of class stir::InputStreamFromROOTFileForECATPET.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/InputStreamWithRecords.h
 Declaration of class stir::InputStreamWithRecords.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/InputStreamWithRecords.inl
 Implementation of class stir::InputStreamWithRecords.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/InputStreamWithRecordsFromHDF5.h
 Declaration of class stir::GE::RDF_HDF5::InputStreamWithRecordsFromHDF5.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/InputStreamWithRecordsFromHDF5.inl
 Implementation of class stir::GE::RDF_HDF5::InputStreamWithRecordsFromHDF5.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/InputStreamWithRecordsFromUPENN.h
 Declaration of class stir::InputStreamWithRecordsFromUPENN.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/InputStreamWithRecordsFromUPENNbin.h
 Declaration of class stir::InputStreamWithRecordsFromUPENNbin.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/InputStreamWithRecordsFromUPENNbin.inl
 Implementation of class stir::InputStreamWithRecordsFromUPENNbin.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/InputStreamWithRecordsFromUPENNtxt.h
 Declaration of class stir::InputStreamWithRecordsFromUPENNtxt.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/InputStreamWithRecordsFromUPENNtxt.inl
 Implementation of class stir::InputStreamWithRecordsFromUPENNtxt.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/InterfileDynamicDiscretisedDensityInputFileFormat.h
 Declaration of class stir::InterfileDynamicDiscretisedDensityInputFileFormat.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/InterfileImageInputFileFormat.h
 Declaration of class stir::InterfileImageInputFileFormat.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/InterfileParametricDiscretisedDensityInputFileFormat.h
 Declaration of class stir::InterfileParametricDiscretisedDensityInputFileFormat.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/ITKImageInputFileFormat.h
 Declaration of class stir::ITKInputFileFormat.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/ITKOutputFileFormat.h
 Declaration of class stir::ITKOutputFileFormat.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/MultiDynamicDiscretisedDensityInputFileFormat.h
 Declaration of class stir::MultiDynamicDiscretisedDensityInputFileFormat.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/MultiParametricDiscretisedDensityInputFileFormat.h
 Declaration of class stir::MultiParametricDiscretisedDensityInputFileFormat.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/OutputFileFormat.h
 Declaration of class stir::OutputFileFormat.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/read_from_file.h
 Declaration of stir::read_from_file functions (providing easy access to class stir::InputFileFormatRegistry).
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/test/test_IO.h
 A simple program to test the stir::OutputFileFormat function.
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/IO/write_to_file.h
 Declaration of stir::write_to_file function (providing easy access to the default stir::OutputFileFormat).
file  /home/kris/devel/STIRdistrib/STIR/src/include/stir/listmode/CListRecordROOT.inl
 Implementation of class stir::InputStreamFromROOTFile.
file  /home/kris/devel/STIRdistrib/STIR/src/IO/GEHDF5ListmodeInputFileFormat.cxx
 Implementations of class stir::GE::RDF_HDF5::IO::GEHDF5ListmodeInputFileFormat.
file  /home/kris/devel/STIRdistrib/STIR/src/IO/GEHDF5Wrapper.cxx
 Declaration of class stir::GE::RDF_HDF5::GEHDF5Wrapper.
file  /home/kris/devel/STIRdistrib/STIR/src/IO/GIPL_ImageFormat.cxx
 Class for reading GIPL data.
file  /home/kris/devel/STIRdistrib/STIR/src/IO/InputFileFormatRegistry.cxx
 Instantiations for class stir::InputFileFormatRegistry.
file  /home/kris/devel/STIRdistrib/STIR/src/IO/InputStreamFromROOTFile.cxx
 Implementation of class stir::InputStreamFromROOTFile.
file  /home/kris/devel/STIRdistrib/STIR/src/IO/InputStreamWithRecordsFromUPENN.cxx
 Implementation of class stir::InputStreamWithRecordsFromUPENN.
file  /home/kris/devel/STIRdistrib/STIR/src/IO/InputStreamWithRecordsFromUPENNbin.cxx
 Implementation of class stir::InputStreamWithRecordsFromUPENNbin.
file  /home/kris/devel/STIRdistrib/STIR/src/IO/InputStreamWithRecordsFromUPENNtxt.cxx
 Implementation of class stir::InputStreamWithRecordsFromUPENNtxt.
file  /home/kris/devel/STIRdistrib/STIR/src/IO/IO_registries.cxx
 File that registers all stir::RegisterObject children in IO.
file  /home/kris/devel/STIRdistrib/STIR/src/IO/ITKImageInputFileFormat.cxx
 Declaration of class stir::ITKImageInputFileFormat.
file  /home/kris/devel/STIRdistrib/STIR/src/IO/ITKOutputFileFormat.cxx
 Implementation of class stir::ITKOutputFileFormat.
file  /home/kris/devel/STIRdistrib/STIR/src/IO/OutputFileFormat.cxx
 Instantiations of the stir::OutputFileFormat class.
file  /home/kris/devel/STIRdistrib/STIR/src/IO/OutputFileFormat_default.cxx
 initialisation of the stir::OutputFileFormat::_default_sptr member
file  /home/kris/devel/STIRdistrib/STIR/src/test/IO/test_IO_DiscretisedDensity.cxx
 A simple program to test the stir::OutputFileFormat function.
file  /home/kris/devel/STIRdistrib/STIR/src/test/IO/test_IO_DynamicDiscretisedDensity.cxx
 A simple program to test the stir::OutputFileFormat function.
file  /home/kris/devel/STIRdistrib/STIR/src/test/IO/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.

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.
template<class DataT, class FileT>
unique_ptr< DataT > stir::read_from_file (FileT file)
 Function that reads data from file using the default InputFileFormatRegistry.
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.

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::InputFileFormatRegistry< DataT >::default_sptr(), error(), stir::InputFileFormat< DataT >::read_from_file(), and read_from_file().

Referenced by stir::BinNormalisationFromProjData::BinNormalisationFromProjData(), stir::ReconstructionTests< TargetT >::construct_input_data(), stir::FBP3DRPReconstruction::do_read_image2D(), stir::PoissonLogLikelihoodWithLinearModelForMean< stir::DiscretisedDensity< 3, float > >::fill_nonidentifiable_target_parameters(), stir::NonRigidObjectTransformationUsingBSplines< num_dimensions, elemT >::NonRigidObjectTransformationUsingBSplines(), stir::GibbsPenalty< elemT, potentialT >::post_processing(), stir::KOSMAPOSLReconstruction< TargetT >::post_processing(), stir::LogcoshPrior< elemT >::post_processing(), stir::MoveImage::post_processing(), stir::ParametricQuadraticPrior< TargetT >::post_processing(), stir::QuadraticPrior< elemT >::post_processing(), stir::RelativeDifferencePrior< elemT >::post_processing(), stir::ScatterEstimation::post_processing(), stir::ScatterEstimation::process_data(), stir::DiscretisedDensity< num_dimensions, elemT >::read_from_file(), read_from_file(), read_from_file(), stir::MatchTrackerAndScanner::run(), stir::IOTests_ITKMulticomponent::run_tests(), stir::OutputFileFormatTests::run_tests(), stir::stir_mathTests::run_tests(), stir::PLSPrior< elemT >::set_anatomical_filename(), stir::ScatterSimulation::set_density_image_for_scatter_points(), stir::LmToProjData::set_input_data(), stir::PLSPrior< elemT >::set_kappa_filename(), stir::OSSPSReconstruction< TargetT >::set_up(), stir::ProjMatrixByBinSPECTUB::set_up(), and stir::RigidObject3DMotionFromPolaris::synchronise().

◆ 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"));
This abstract class is the basis for all image representations.
Definition DiscretisedDensity.h:99
unique_ptr< DataT > read_from_file(const FileSignature &signature, FileT file)
Function that reads data from file using the default InputFileFormatRegistry, using the provided File...
Definition read_from_file.h:46

References read_from_file().

◆ 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::OutputFileFormat< DataT >::default_sptr(), error(), and write_to_file().

Referenced by stir::ReconstructionTests< TargetT >::compare(), stir::ParametricQuadraticPrior< TargetT >::compute_gradient(), stir::PLSPrior< elemT >::compute_gradient(), stir::QuadraticPrior< elemT >::compute_gradient(), stir::RelativeDifferencePrior< elemT >::compute_gradient(), stir::ObjectiveFunctionTests< ObjectiveFunctionT, TargetT >::test_gradient(), stir::ObjectiveFunctionTests< ObjectiveFunctionT, TargetT >::test_Hessian(), stir::GeneralisedPriorTests::test_Hessian_against_numerical(), stir::ObjectiveFunctionTests< ObjectiveFunctionT, TargetT >::test_Hessian_concavity(), write_to_file(), and stir::GatedDiscretisedDensity::write_to_files().