STIR 6.4.0

Class for reading list mode data from the ECAT 966 scanner. More...

#include "stir/IO/ECAT966ListmodeInputFileFormat.h"

Inheritance diagram for stir::ecat::ecat7::ECAT966ListmodeInputFileFormat:

Public Member Functions

virtual const std::string get_name () const
 
virtual bool can_read (const FileSignature &signature, std::istream &input) const
 Always return false as ECAT7 IO cannot read from stream.
 
virtual bool can_read (const FileSignature &signature, const std::string &singles_filename) const
 Checks if it's an ECAT7 file by reading the main header and if the scanner is supported. *‍/.
 
virtual unique_ptr< data_typeread_from_file (std::istream &input) const
 read data from a stream
 
virtual unique_ptr< data_typeread_from_file (const std::string &filename) const
 read the data via the .sgl file
 

Protected Member Functions

virtual bool actual_can_read (const FileSignature &signature, std::istream &input) const
 Always return false as ECAT7 IO cannot read from stream.
 

Additional Inherited Members

- Public Types inherited from stir::InputFileFormat< ListModeData >
typedef ListModeData data_type
 

Detailed Description

Class for reading list mode data from the ECAT 966 scanner.

ECAT7 list mode data are recorded in the following files:

  • PREFIX_1.sgl: contains an ECAT7 main header and the singles counts
  • PREFIX_1.lm: contains the coincidence events (max size is 2GB)
  • PREFIX_1.sgl: contains the next chunk of coincidence events
  • ...

This class expects to be passed the name of the .sgl file.

Member Function Documentation

◆ get_name()

virtual const std::string stir::ecat::ecat7::ECAT966ListmodeInputFileFormat::get_name ( ) const
inlinevirtual

◆ can_read() [1/2]

virtual bool stir::ecat::ecat7::ECAT966ListmodeInputFileFormat::can_read ( const FileSignature & signature,
std::istream & input ) const
inlinevirtual

Always return false as ECAT7 IO cannot read from stream.

Reimplemented from stir::InputFileFormat< ListModeData >.

References actual_can_read().

◆ can_read() [2/2]

virtual bool stir::ecat::ecat7::ECAT966ListmodeInputFileFormat::can_read ( const FileSignature & signature,
const std::string & singles_filename ) const
inlinevirtual

Checks if it's an ECAT7 file by reading the main header and if the scanner is supported. *‍/.

Reimplemented from stir::InputFileFormat< ListModeData >.

References stir::ecat::ecat7::find_scanner(), and stir::FileSignature::get_signature().

◆ actual_can_read()

virtual bool stir::ecat::ecat7::ECAT966ListmodeInputFileFormat::actual_can_read ( const FileSignature & signature,
std::istream & input ) const
inlineprotectedvirtual

Always return false as ECAT7 IO cannot read from stream.

Implements stir::InputFileFormat< ListModeData >.

References stir::FileSignature::get_signature(), and stir::warning().

Referenced by can_read().

◆ read_from_file() [1/2]

virtual unique_ptr< data_type > stir::ecat::ecat7::ECAT966ListmodeInputFileFormat::read_from_file ( std::istream & input) const
inlinevirtual

read data from a stream

This function should throw an exception if the read fails.

Warning
This member throws for most implementations. Use a filename instead.

Implements stir::InputFileFormat< ListModeData >.

References stir::error().

◆ read_from_file() [2/2]

virtual unique_ptr< data_type > stir::ecat::ecat7::ECAT966ListmodeInputFileFormat::read_from_file ( const std::string & filename) const
inlinevirtual

read the data via the .sgl file

We first remove the suffix (either .sgl or _1.sgl) and then call ecat::ecat7::CListModeDataECAT::CListModeDataECAT(const std::string&)

Reimplemented from stir::InputFileFormat< ListModeData >.

References stir::find_pos_of_extension(), and stir::info().


The documentation for this class was generated from the following file: