|
STIR 6.5.0
|
Namespace for the ECAT6 IO part of the STIR library (and some/most of its applications). More...
Classes | |
| class | ECAT6ImageInputFileFormat |
| Class for reading images in ECAT6 file-format. More... | |
| class | ECAT6OutputFileFormat |
| Implementation of OutputFileFormat paradigm for the ECAT6 format. More... | |
| struct | ScanInfoRec |
| ECAT 6 CTI scanner parameters. More... | |
Typedefs | |
| typedef short | word |
| typedef unsigned char | byte |
| typedef struct stir::ecat::ecat6::ScanInfoRec | ScanInfoRec |
| typedef Main_header | ECAT6_Main_header |
| typedef struct Matval | Matval |
Enumerations | |
| enum | MatFileType { matScanFile = 1 , matImageFile = 2 , matAttenFile = 3 , matNormFile = 4 } |
Functions | |
| long | cti_numcod (int frame, int plane, int gate, int data, int bed) |
| Encode scan information into a single, incomprehensible number. | |
| void | cti_numdoc (long matnum, Matval *matval) |
| Unpack encoded data into a nice struct. Reverse of cti_numcod (). | |
| int | cti_rings2plane (short nrings, short ring0, short ring1) |
| Get sinogram plane from ring pair. | |
| FILE * | cti_create (const char *fname, const ECAT6_Main_header *mhead) |
| Open a file and write main header to it. Returns a pointer to the file, or 0 if unsuccessful. | |
| int | cti_rblk (FILE *fptr, int blkno, void *bufr, int nblks) |
| Read from a matrix file starting at the given block. Returns EXIT_SUCCESS if all went well. | |
| int | cti_wblk (FILE *fptr, int blkno, void *bufr, int nblks) |
| Write blocks from buffer into file. Returns EXIT_SUCCESS if successful. | |
| int | cti_read_ECAT6_Main_header (FILE *fptr, ECAT6_Main_header *h) |
| Read header data from a file and place it into a ECAT6_Main_header struct. Returns EXIT_SUCCESS if no error. | |
| int | cti_read_scan_subheader (FILE *fptr, const ECAT6_Main_header *, int blknum, Scan_subheader *) |
| Read header data from a file and place it into a Scan_subheader struct. Returns EXIT_SUCCESS if no error. | |
| int | cti_read_attn_subheader (FILE *fptr, const ECAT6_Main_header *h, int blknum, Attn_subheader *header_ptr) |
| Read header data from a file and place it into a Attn_subheader struct. Returns EXIT_SUCCESS if no error. | |
| int | cti_read_norm_subheader (FILE *fptr, const ECAT6_Main_header *h, int blknum, Norm_subheader *header_ptr) |
| Read header data from a file and place it into a Norm_subheader struct. Returns EXIT_SUCCESS if no error. | |
| int | cti_read_image_subheader (FILE *fptr, const ECAT6_Main_header *h, int blknum, Image_subheader *header_ptr) |
| Read header data from a file and place it into an Image_subheader struct. Returns EXIT_SUCCESS if no error. | |
| int | cti_enter (FILE *fptr, const ECAT6_Main_header *mhead_ptr, long matnum, int nblks) |
| Create entry in file corresponding to matnum, and return offset of next block. Or some such. Returns 0 if there was an error. | |
| int | cti_lookup (FILE *fptr, const ECAT6_Main_header *mhead_ptr, long matnum, MatDir *entry) |
| Look up a "matrix number" in the file and return the MatDir entry for it. Returns 0 if the lookup was NOT successful. | |
| int | cti_write_idata (FILE *fptr, int blk, const short *data, int isize) |
| Write data in blocks from buffer into file. | |
| int | cti_write_image_subheader (FILE *fptr, const ECAT6_Main_header *h, int blknum, const Image_subheader *header_ptr) |
| Write an image subheader into a matrix file. Returns 0 if successful. | |
| int | cti_write_ECAT6_Main_header (FILE *fptr, const ECAT6_Main_header *header_ptr) |
| Write an image main header into a matrix file. Returns 0 if successful. | |
| int | cti_write_scan_subheader (FILE *fptr, const ECAT6_Main_header *h, int blknum, const Scan_subheader *header_ptr) |
| Write a scan subheader into a matrix file. | |
| int | cti_write_image (FILE *fptr, long matnum, const ECAT6_Main_header *mhead_ptr, const Image_subheader *header_ptr, const short *data, int data_size) |
| Write an image, including headers, into a matrix file. | |
| int | cti_write_scan (FILE *fptr, long matnum, const ECAT6_Main_header *mhead_ptr, const Scan_subheader *header_ptr, const short *data, int data_size) |
| Write a scan, including headers, into a matrix file. | |
| int | get_scanheaders (FILE *fptr, long matnum, ECAT6_Main_header *mhead, Scan_subheader *shead, ScanInfoRec *scanParams) |
| Read main header and subheader from scan file. Returns EXIT_SUCCESS if no error. | |
| int | get_scandata (FILE *fptr, char *scan, ScanInfoRec *scanParams) |
| Read scan data from file. Returns EXIT_FAILURE if the data could not be read. | |
| int | get_attnheaders (FILE *fptr, long matnum, ECAT6_Main_header *mhead, Attn_subheader *shead, ScanInfoRec *attnParams) |
| Read main header and subheader from attn file. Returns EXIT_SUCCESS if no error. | |
| int | get_normheaders (FILE *fptr, long matnum, ECAT6_Main_header *mhead, Norm_subheader *shead, ScanInfoRec *nrmParams) |
| Read main header and subheader from normalisation file. Returns EXIT_SUCCESS if no error. | |
| int | file_data_to_host (char *dptr, int nblks, int dtype) |
| Convert data in buffer dptr to native host format. | |
| Scan_subheader | scan_zero_fill () |
| Fill scan subheader with negative or default values. | |
| Image_subheader | img_zero_fill () |
| Fill image subheader with negative or default values. | |
| bool | is_ECAT6_file (const std::string &filename) |
| checks if the file is in ECAT6 format | |
| bool | is_ECAT6_image_file (const std::string &filename) |
| checks if the file is in ECAT6 format and if the file contains images | |
| bool | is_ECAT6_emission_file (const std::string &filename) |
| checks if the file is in ECAT6 format and if the file contains emission sinograms (or blank/transmision) | |
| bool | is_ECAT6_attenuation_file (const std::string &filename) |
| checks if the file is in ECAT6 format and if the file contains attenuation correction factors | |
| VoxelsOnCartesianGrid< float > * | ECAT6_to_VoxelsOnCartesianGrid (const int frame_num, const int gate_num, const int data_num, const int bed_num, FILE *cti_fptr, const ECAT6_Main_header &mhead) |
| void | ECAT6_to_PDFS (const int frame_num, const int gate_num, const int data_num, const int bed_num, int max_ring_diff, bool arccorrected, const std::string &output_file_name, FILE *cti_fptr, const ECAT6_Main_header &mhead) |
| Scanner * | find_scanner_from_ECAT6_Main_header (const ECAT6_Main_header &mhead) |
| determine scanner type from the ECAT6_Main_header | |
| Succeeded | DiscretisedDensity_to_ECAT6 (DiscretisedDensity< 3, float > const &density, std::string const &cti_name, std::string const &orig_name, const Scanner &scanner, const int frame_num=1, const int gate_num=1, const int data_num=0, const int bed_num=0) |
| Create a new ECAT6 image file and write the data in there. | |
| Succeeded | DiscretisedDensity_to_ECAT6 (FILE *fptr, DiscretisedDensity< 3, float > const &density, const ECAT6_Main_header &mhead, const int frame_num=1, const int gate_num=1, const int data_num=0, const int bed_num=0) |
| Write an (extra) image to an existing ECAT6 file. | |
| Succeeded | ProjData_to_ECAT6 (ProjData const &proj_data, std::string const &cti_name, std::string const &orig_name, const int frame_num=1, const int gate_num=1, const int data_num=0, const int bed_num=0, const bool write_2D_sinograms=false) |
| Create a new ECAT6 sinogram file and write the data in there. | |
| Succeeded | ProjData_to_ECAT6 (FILE *fptr, ProjData const &proj_data, const ECAT6_Main_header &mhead, const int frame_num=1, const int gate_num=1, const int data_num=0, const int bed_num=0, const bool write_2D_sinograms=false) |
| Write an (extra) set of sinograms to an existing ECAT6 file. | |
| void | make_ECAT6_Main_header (ECAT6_Main_header &, const Scanner &, const std::string &orig_name, ExamInfo const &exam_info) |
| Fill in most of the main header given a Scanner object and orig_name. | |
| void | make_ECAT6_Main_header (ECAT6_Main_header &mhead, Scanner const &scanner, const std::string &orig_name, DiscretisedDensity< 3, float > const &density) |
| Fill in most of the main header given a Scanner object and orig_name and an image. | |
| void | make_ECAT6_Main_header (ECAT6_Main_header &mhead, const std::string &orig_name, ProjDataInfo const &proj_data_info) |
| Fill in most of the main header given an orig_name and a proj_data_info. | |
Variables | |
| const int | MatBLKSIZE = 512 |
| const int | MatFirstDirBlk = 2 |
Namespace for the ECAT6 IO part of the STIR library (and some/most of its applications).
| int stir::ecat::ecat6::file_data_to_host | ( | char * | dptr, |
| int | nblks, | ||
| int | dtype ) |
Convert data in buffer dptr to native host format.
References file_data_to_host().
Referenced by cti_write_ECAT6_Main_header(), file_data_to_host(), and get_scandata().
| Scan_subheader stir::ecat::ecat6::scan_zero_fill | ( | ) |
Fill scan subheader with negative or default values.
References scan_zero_fill().
Referenced by cti_write_ECAT6_Main_header(), ProjData_to_ECAT6(), and scan_zero_fill().
| Image_subheader stir::ecat::ecat6::img_zero_fill | ( | ) |
Fill image subheader with negative or default values.
References img_zero_fill().
Referenced by cti_write_ECAT6_Main_header(), DiscretisedDensity_to_ECAT6(), and img_zero_fill().