libtpcimgio
 All Data Structures Files Functions Variables Typedefs Enumerator Macros Pages
Functions
ecat7p.c File Reference
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <ctype.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
#include <swap.h>
#include <datetime.h>
#include "include/ecat7.h"

Go to the source code of this file.

Functions

void ecat7PrintMainheader (ECAT7_mainheader *h, FILE *fp)
 
void ecat7PrintImageheader (ECAT7_imageheader *h, FILE *fp)
 
void ecat7PrintScanheader (ECAT7_scanheader *h, FILE *fp)
 
void ecat7PrintAttenheader (ECAT7_attenheader *h, FILE *fp)
 
void ecat7PrintPolmapheader (ECAT7_polmapheader *h, FILE *fp)
 
void ecat7PrintNormheader (ECAT7_normheader *h, FILE *fp)
 
void ecat7Print2DScanheader (ECAT7_2Dscanheader *h, FILE *fp)
 
void ecat7Print2DNormheader (ECAT7_2Dnormheader *h, FILE *fp)
 
char * ecat7filetype (short int file_type)
 
char * ecat7acquisitiontype (short int acquisition_type)
 
char * ecat7datatype (short int data_type)
 
int ecat7PrintSubheader (ECAT7_mainheader mh, FILE *fp, int plane, int frame, FILE *ofp)
 

Function Documentation

char* ecat7acquisitiontype ( short int  acquisition_type)

Returns pointer to a string describing the ECAT7 acquisition_type

Parameters
acquisition_typeacquisition type code
Returns
pointer to static string

Definition at line 498 of file ecat7p.c.

Referenced by ecat7PrintMainheader().

char* ecat7datatype ( short int  data_type)

Returns pointer to a string describing the ECAT7 data_type

Parameters
data_typedata type code
Returns
pointer to static string

Definition at line 517 of file ecat7p.c.

Referenced by ecat7Print2DNormheader(), ecat7Print2DScanheader(), ecat7PrintAttenheader(), ecat7PrintImageheader(), ecat7PrintNormheader(), ecat7PrintPolmapheader(), and ecat7PrintScanheader().

char* ecat7filetype ( short int  file_type)

Returns pointer to a string describing the ECAT7 file_type

Parameters
file_typefile type code
Returns
pointer to static string

Definition at line 479 of file ecat7p.c.

Referenced by ecat7PrintMainheader(), and imgRead().

void ecat7Print2DNormheader ( ECAT7_2Dnormheader h,
FILE *  fp 
)
void ecat7Print2DScanheader ( ECAT7_2Dscanheader h,
FILE *  fp 
)
void ecat7PrintAttenheader ( ECAT7_attenheader h,
FILE *  fp 
)
void ecat7PrintImageheader ( ECAT7_imageheader h,
FILE *  fp 
)

Print ECAT 7.x image header contents to specified file pointer.

Parameters
hEcat7 image header
fptarget file pointer

Definition at line 137 of file ecat7p.c.

References ecat7_imageheader::annotation, ecat7_imageheader::data_type, ecat7_imageheader::decay_corr_fctr, ECAT7_TEST, ecat7datatype(), ecat7_imageheader::fill_cti, ecat7_imageheader::fill_user, ecat7_imageheader::filter_code, ecat7_imageheader::filter_cutoff_frequency, ecat7_imageheader::filter_order, ecat7_imageheader::filter_ramp_slope, ecat7_imageheader::filter_resolution, ecat7_imageheader::filter_scatter_fraction, ecat7_imageheader::filter_scatter_slope, ecat7_imageheader::frame_duration, ecat7_imageheader::frame_start_time, ecat7_imageheader::gate_duration, ecat7_imageheader::image_max, ecat7_imageheader::image_min, ecat7_imageheader::mt_1_1, ecat7_imageheader::mt_1_2, ecat7_imageheader::mt_1_3, ecat7_imageheader::mt_1_4, ecat7_imageheader::mt_2_1, ecat7_imageheader::mt_2_2, ecat7_imageheader::mt_2_3, ecat7_imageheader::mt_2_4, ecat7_imageheader::mt_3_1, ecat7_imageheader::mt_3_2, ecat7_imageheader::mt_3_3, ecat7_imageheader::mt_3_4, ecat7_imageheader::num_accepted_beats, ecat7_imageheader::num_angles, ecat7_imageheader::num_dimensions, ecat7_imageheader::num_r_elements, ecat7_imageheader::processing_code, ecat7_imageheader::r_wave_offset, ecat7_imageheader::recon_type, ecat7_imageheader::recon_views, ecat7_imageheader::recon_zoom, ecat7_imageheader::rfilter_code, ecat7_imageheader::rfilter_cutoff, ecat7_imageheader::rfilter_order, ecat7_imageheader::rfilter_resolution, ecat7_imageheader::scale_factor, ecat7_imageheader::scatter_type, ecat7_imageheader::x_dimension, ecat7_imageheader::x_offset, ecat7_imageheader::x_pixel_size, ecat7_imageheader::x_resolution, ecat7_imageheader::y_dimension, ecat7_imageheader::y_offset, ecat7_imageheader::y_pixel_size, ecat7_imageheader::y_resolution, ecat7_imageheader::z_dimension, ecat7_imageheader::z_offset, ecat7_imageheader::z_pixel_size, ecat7_imageheader::z_resolution, ecat7_imageheader::z_rotation_angle, ecat7_imageheader::zfilter_code, ecat7_imageheader::zfilter_cutoff, ecat7_imageheader::zfilter_order, and ecat7_imageheader::zfilter_resolution.

Referenced by ecat7PrintSubheader(), and ecat7ReadImageMatrix().

void ecat7PrintMainheader ( ECAT7_mainheader h,
FILE *  fp 
)

Print ECAT 7.x main header contents to specified file pointer

Parameters
hEcat7 main header
fptarget file pointer

Definition at line 49 of file ecat7p.c.

References ecat7_mainheader::acquisition_mode, ecat7_mainheader::acquisition_type, ecat7_mainheader::angular_compression, ecat7_mainheader::axial_samp_mode, ecat7_mainheader::bed_elevation, ecat7_mainheader::bed_position, ecat7_mainheader::bin_size, ecat7_mainheader::branching_fraction, ecat7_mainheader::calibration_units, ecat7_mainheader::calibration_units_label, ecat7_mainheader::coin_samp_mode, ecat7_mainheader::compression_code, ecat7_mainheader::data_units, ecat7_mainheader::distance_scanned, ecat7_mainheader::dosage, ecat7_mainheader::dose_start_time, ECAT7_TEST, ecat7acquisitiontype(), ecat7filetype(), ecat7_mainheader::ecat_calibration_factor, ecat7_mainheader::facility_name, ecat7_mainheader::file_type, ecat7_mainheader::fill_cti, ecat7_mainheader::gantry_rotation, ecat7_mainheader::gantry_tilt, ecat7_mainheader::init_bed_position, ecat7_mainheader::intrinsic_tilt, ecat7_mainheader::isotope_halflife, ecat7_mainheader::isotope_name, ecat7_mainheader::lwr_sctr_thres, ecat7_mainheader::lwr_true_thres, ecat7_mainheader::magic_number, ecat7_mainheader::num_bed_pos, ecat7_mainheader::num_frames, ecat7_mainheader::num_gates, ecat7_mainheader::num_planes, ecat7_mainheader::operator_name, ecat7_mainheader::original_file_name, ecat7_mainheader::patient_age, ecat7_mainheader::patient_birth_date, ecat7_mainheader::patient_dexterity, ecat7_mainheader::patient_height, ecat7_mainheader::patient_id, ecat7_mainheader::patient_name, ecat7_mainheader::patient_orientation, ecat7_mainheader::patient_sex, ecat7_mainheader::patient_weight, ecat7_mainheader::physician_name, ecat7_mainheader::plane_separation, ecat7_mainheader::radiopharmaceutical, ecat7_mainheader::scan_start_time, ecat7_mainheader::septa_state, ecat7_mainheader::serial_number, ecat7_mainheader::study_description, ecat7_mainheader::study_type, ecat7_mainheader::sw_version, ecat7_mainheader::system_type, ecat7_mainheader::transaxial_fov, ecat7_mainheader::transm_source_type, ecat7_mainheader::upr_true_thres, ecat7_mainheader::user_process_code, ecat7_mainheader::well_counter_corr_factor, and ecat7_mainheader::wobble_speed.

void ecat7PrintNormheader ( ECAT7_normheader h,
FILE *  fp 
)
void ecat7PrintPolmapheader ( ECAT7_polmapheader h,
FILE *  fp 
)
void ecat7PrintScanheader ( ECAT7_scanheader h,
FILE *  fp 
)
int ecat7PrintSubheader ( ECAT7_mainheader  mh,
FILE *  fp,
int  plane,
int  frame,
FILE *  ofp 
)