My Project
ecat63p.c
Go to the documentation of this file.
1 /******************************************************************************
2 
3  Copyright (c) 2003-2008 Turku PET Centre
4 
5  Library: ecat63p.c
6  Description: Procedures for printing ECAT 6.3 header contents.
7 
8  This library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU Lesser General Public
10  License as published by the Free Software Foundation; either
11  version 2.1 of the License, or (at your option) any later version.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  See the GNU Lesser General Public License for more details:
17  http://www.gnu.org/copyleft/lesser.html
18 
19  You should have received a copy of the GNU Lesser General Public License
20  along with this library/program; if not, write to the Free Software
21  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 
23  Turku PET Centre, Turku, Finland, http://www.turkupetcentre.fi/
24 
25  Modification history:
26  2003-07-21 Vesa Oikonen
27  Contents separated from ecat63.c.
28  2004-02-08 VO
29  ecat63PrintMainheader() prints also sw_version.
30  2004-09-20 VO
31  Doxygen style comments.
32  2007-03-12 VO
33  Header print functions changed: file pointer is required as second
34  argument, set to stdout to make it work as before;
35  header contents are now printed one value per line.
36  2008-07-24 VO
37  Added ecat63PrintSubheader().
38 
39 
40 ******************************************************************************/
41 #include <stdio.h>
42 #include <stdlib.h>
43 #include <math.h>
44 #include <ctype.h>
45 #include <string.h>
46 #include <unistd.h>
47 #include <time.h>
48 /*****************************************************************************/
49 #include "swap.h"
50 #include "include/ecat63.h"
51 /*****************************************************************************/
52 
53 /*****************************************************************************/
54 
55 /*****************************************************************************/
63  char tmp[32];
64 
65  if(ECAT63_TEST) fprintf(stdout, "ecat63PrintMainheader()\n");
66  fprintf(fp, "original_file_name := %.20s\n", h->original_file_name);
67  fprintf(fp, "data_type := %d (%s)\n", h->data_type, ecat63Datatype(h->data_type));
68  fprintf(fp, "system_type := %d\n", h->system_type);
69  if(h->file_type==1) strcpy(tmp, "sinogram");
70  else if(h->file_type==2) strcpy(tmp, "image");
71  else if(h->file_type==3) strcpy(tmp, "attenuation");
72  else if(h->file_type==4) strcpy(tmp, "normalization");
73  else strcpy(tmp, "unknown");
74  fprintf(fp, "file_type := %d (%s)\n", h->file_type, tmp);
75  fprintf(fp, "sw_version := %d\n", h->sw_version);
76  fprintf(fp, "scan start := %02d.%02d.%04d %02d:%02d:%02d\n",
79  fprintf(fp, "isotope_code := %.8s\n", h->isotope_code);
80  fprintf(fp, "isotope_halflife := %E sec\n", h->isotope_halflife);
81  fprintf(fp, "radiopharmaceutical := %.32s\n", h->radiopharmaceutical);
82  fprintf(fp, "gantry_tilt := %g\n", h->gantry_tilt);
83  fprintf(fp, "gantry_rotation := %g\n", h->gantry_rotation);
84  fprintf(fp, "bed_elevation := %g\n", h->bed_elevation);
85  fprintf(fp, "axial_fov := %g\n", h->axial_fov);
86  fprintf(fp, "transaxial_fov := %g\n", h->transaxial_fov);
87  fprintf(fp, "calibration_factor := %g\n", h->calibration_factor);
88  fprintf(fp, "calibration_units := %d (%s)\n", h->calibration_units, ecat63Unit(h->calibration_units));
89  fprintf(fp, "study_name := %.12s\n", h->study_name);
90  fprintf(fp, "patient_id := %.32s\n", h->patient_id);
91  fprintf(fp, "patient_name := %.32s\n", h->patient_name);
92  fprintf(fp, "sex := %c\nage := %.10s\nheight := %.10s\nweigth := %.10s\ndexterity := %c\n",
95  fprintf(fp, "physician_name := %.32s\noperator_name := %.32s\n",
97  fprintf(fp, "study_description := %.32s\n", h->study_description);
98  fprintf(fp, "num_planes := %d\n", h->num_planes);
99  fprintf(fp, "num_frames := %d\n", h->num_frames);
100  fprintf(fp, "num_gates := %d\n", h->num_gates);
101  fprintf(fp, "num_bed_pos := %d\n", h->num_bed_pos);
102  fprintf(fp, "init_bed_position := %g\n", h->init_bed_position);
103  fprintf(fp, "plane_separation := %g cm\n", h->plane_separation);
104  fprintf(fp, "user_process_code := %.10s\n", h->user_process_code);
105 }
106 /*****************************************************************************/
107 
108 /*****************************************************************************/
116  int i;
117 
118  if(ECAT63_TEST) printf("ecat63PrintImageheader()\n");
119  fprintf(fp, "data_type := %d (%s)\n", h->data_type, ecat63Datatype(h->data_type));
120  fprintf(fp, "dimension_1 := %d\n", h->dimension_1);
121  fprintf(fp, "dimension_2 := %d\n", h->dimension_2);
122  fprintf(fp, "x_origin := %g\ny_origin := %g\nrecon_scale := %g\n",
123  h->x_origin, h->y_origin, h->recon_scale);
124  fprintf(fp, "quant_scale := %g\nimage_min := %d\nimage_max := %d\n",
125  h->quant_scale, h->image_min, h->image_max);
126  fprintf(fp, "slice_width := %g\npixel_size := %g\n", h->slice_width, h->pixel_size);
127  fprintf(fp, "frame_start_time := %d\nframe_duration := %d\n",
129  fprintf(fp, "reconstruction_start := %02d.%02d.%04d %02d:%02d:%02d\n",
132  fprintf(fp, "filter_code := %d\nimage_rotation := %g\nintrinsic_tilt := %g\n",
134  fprintf(fp, "filter_params :=");
135  for(i=0; i<6; i++) fprintf(fp, " %g", h->filter_params[i]); fprintf(fp, "\n");
136  fprintf(fp, "plane_eff_corr_fctr := %g\ndecay_corr_fctr := %g\nloss_corr_fctr := %g\n",
138  fprintf(fp, "quant_units := %d (%s)\n", h->quant_units, ecat63Unit(h->quant_units));
139  fprintf(fp, "ecat_calibration_fctr := %g\nwell_counter_cal_fctr := %g\n",
141  fprintf(fp, "annotation := %.40s\n", h->annotation);
142 }
143 /*****************************************************************************/
144 
145 /*****************************************************************************/
153  int i;
154 
155  if(ECAT63_TEST) printf("ecat63PrintScanheader()\n");
156  fprintf(fp, "data_type := %d (%s)\n", h->data_type, ecat63Datatype(h->data_type));
157  fprintf(fp, "dimension_1 := %d\n", h->dimension_1);
158  fprintf(fp, "dimension_2 := %d\n", h->dimension_2);
159  fprintf(fp, "sample_distance := %g cm\n", h->sample_distance);
160  fprintf(fp, "isotope_halflife := %g sec\n", h->isotope_halflife);
161  fprintf(fp, "gate_duration := %d\nr_wave_offset := %d\n",
163  fprintf(fp, "scale_factor := %g\n", h->scale_factor);
164  fprintf(fp, "scan_min := %d\nscan_max := %d\n", h->scan_min, h->scan_max);
165  fprintf(fp, "prompts := %d\ndelayed := %d\nmultiples := %d\nnet_trues := %d\n",
166  h->prompts, h->delayed, h->multiples, h->net_trues);
167  fprintf(fp, "cor_singles :=");
168  for(i=0; i<16; i++) fprintf(fp, " %8.0f", h->cor_singles[i]); printf("\n");
169  fprintf(fp, "uncor_singles :=");
170  for(i=0; i<16; i++) fprintf(fp, " %8.0f", h->uncor_singles[i]); printf("\n");
171  fprintf(fp, "tot_avg_cor := %g\ntot_avg_uncor := %g\n", h->tot_avg_cor, h->tot_avg_uncor);
172  fprintf(fp, "total_coin_rate := %d\n", h->total_coin_rate);
173  fprintf(fp, "frame_start_time := %d\nframe_duration := %d\n",
175  fprintf(fp, "loss_correction_fctr := %g\n", h->loss_correction_fctr);
176 }
177 /*****************************************************************************/
178 
179 /*****************************************************************************/
187  if(ECAT63_TEST) printf("ecat63PrintAttnheader()\n");
188  fprintf(fp, "data_type := %d (%s)\n", h->data_type, ecat63Datatype(h->data_type));
189  fprintf(fp, "dimension_1 := %d\n", h->dimension_1);
190  fprintf(fp, "dimension_2 := %d\n", h->dimension_2);
191  fprintf(fp, "sample_distance := %g cm\n", h->sample_distance);
192  fprintf(fp, "attenuation_type := %d\n", h->attenuation_type);
193  fprintf(fp, "scale_factor := %g\n", h->scale_factor);
194  fprintf(fp, "x_origin := %g\ny_origin := %g\nx_radius := %g\ny_radius := %g\n",
195  h->x_origin, h->y_origin, h->x_radius, h->y_radius);
196  fprintf(fp, "tilt_angle := %g\nattenuation_coeff := %g\n",
198 }
199 /*****************************************************************************/
200 
201 /*****************************************************************************/
209  if(ECAT63_TEST) printf("ecat63PrintNormheader()\n");
210  fprintf(fp, "data_type := %d (%s)\n", h->data_type, ecat63Datatype(h->data_type));
211  fprintf(fp, "dimension_1 := %d\n", h->dimension_1);
212  fprintf(fp, "dimension_2 := %d\n", h->dimension_2);
213  fprintf(fp, "scale_factor := %g\n", h->scale_factor);
214  fprintf(fp, "norm time := %02d.%02d.%04d %02d:%02d:%02d\n",
215  h->norm_day, h->norm_month, h->norm_year,
216  h->norm_hour, h->norm_minute, h->norm_second);
217 }
218 /*****************************************************************************/
219 
220 /*****************************************************************************/
227 char *ecat63Datatype(short int dtype) {
228  static char *ecat63_datatype[]={
229  /* 0 */ "Unknown",
230  /* 1 */ "BYTE_TYPE",
231  /* 2 */ "VAX_I2",
232  /* 3 */ "VAX_I4",
233  /* 4 */ "VAX_R4",
234  /* 5 */ "IEEE_R4",
235  /* 6 */ "SUN_I2",
236  /* 7 */ "SUN_I4",
237  /* 8 */ "Unknown",
238  /* 9 */ "Unknown"
239  };
240  if(dtype>=0 && dtype<10) return(ecat63_datatype[dtype]);
241  else return(ecat63_datatype[0]);
242 }
243 
250 char *ecat63Unit(short int dunit) {
251  static char *ecat63_unit[]={
252  /* 0 */ "Unknown",
253  /* 1 */ "Unknown",
254  /* 2 */ "ECAT counts",
255  /* 3 */ "uCi/ml",
256  /* 4 */ "LMRGlu",
257  /* 5 */ "LMRUGlu umol/min/100g",
258  /* 6 */ "LMRUGlu mg/min/100g",
259  /* 7 */ "nCi/mL",
260  /* 8 */ "Well counts",
261  /* 9 */ "Becquerels",
262  /* 10 */ "kBq/mL",
263  /* 11 */ "1/min",
264  /* 12 */ "mL/min/100g",
265  /* 13 */ "sec*kBq/mL",
266  /* 14 */ "sec*nCi/mL",
267  /* 15 */ "1/sec",
268  /* 16 */ "Unitless",
269  /* 17 */ "Unknown"
270  };
271  if(dunit>=0 && dunit<18) return(ecat63_unit[dunit]);
272  else return(ecat63_unit[0]);
273 }
274 /*****************************************************************************/
282 void float2parts(float *buf) {
283  unsigned int u, exp, mantissa;
284  char sign;
285 
286  memcpy(&u, buf, 4); if(u & 1L<<31) sign='-'; else sign='+';
287  exp=u<<1; exp=exp>>24; mantissa=u<<9; mantissa=mantissa>>9;
288  printf("%e = %c (%u/8388608 + 1)*2^(%u-127)\n", *buf, sign, mantissa, exp);
289 }
290 /*****************************************************************************/
291 
292 /*****************************************************************************/
300  FILE *fp,
302  int plane,
304  int frame,
306  FILE *ofp
307 ) {
308  int mi, ret, nr=0;
309  static MATRIXLIST mlist;
310  ECAT63_imageheader image_header;
311  ECAT63_scanheader scan_header;
312  ECAT63_attnheader attn_header;
313  ECAT63_normheader norm_header;
314  Matval matval;
315 
316 
317  /* Read matrix list and nr */
318  ecat63InitMatlist(&mlist);
319  ret=ecat63ReadMatlist(fp, &mlist);
320  if(ret) {
321  fprintf(stderr, "Error (%d): cannot read matrix list.\n", ret);
322  return 2;
323  }
324  if(mlist.matrixNr<=0) {
325  fprintf(stderr, "Error: matrix list is empty.\n");
326  return 2;
327  }
328  if(ECAT63_TEST>1) ecat63PrintMatlist(&mlist);
329 
330  /*
331  * Read and print subheaders one at a time
332  */
333  for(mi=nr=0; mi<mlist.matrixNr; mi++) {
334  /* Get plane and frame nr */
335  mat_numdoc(mlist.matdir[mi].matnum, &matval);
336  /* Check if this is supposed to be listed or not */
337  if(frame>=0 && frame!=matval.frame) continue;
338  if(plane>=0 && plane!=matval.plane) continue;
339  /* Read subheader */
340  if(mh.file_type==IMAGE_DATA)
341  ret=ecat63ReadImageheader(fp, mlist.matdir[mi].strtblk, &image_header);
342  else if(mh.file_type==RAW_DATA)
343  ret=ecat63ReadScanheader(fp, mlist.matdir[mi].strtblk, &scan_header);
344  else if(mh.file_type==ATTN_DATA)
345  ret=ecat63ReadAttnheader(fp, mlist.matdir[mi].strtblk, &attn_header);
346  else if(mh.file_type==NORM_DATA)
347  ret=ecat63ReadNormheader(fp, mlist.matdir[mi].strtblk, &norm_header);
348  if(ret) {
349  fprintf(stderr, "Error: cannot read matrix %u subheader.\n",
350  mlist.matdir[mi].matnum);
351  ecat63EmptyMatlist(&mlist); return 4;
352  }
353  /* Print subheader */
354  fprintf(fp, "Matrix: plane %d frame %d gate %d bed %d\n",
355  matval.plane, matval.frame, matval.gate, matval.bed);
356  if(mh.file_type==IMAGE_DATA)
357  ecat63PrintImageheader(&image_header, ofp);
358  else if(mh.file_type==RAW_DATA)
359  ecat63PrintScanheader(&scan_header, ofp);
360  else if(mh.file_type==ATTN_DATA)
361  ecat63PrintAttnheader(&attn_header, ofp);
362  else if(mh.file_type==NORM_DATA)
363  ecat63PrintNormheader(&norm_header, ofp);
364  nr++; // counter
365  } /* next matrix */
366  ecat63EmptyMatlist(&mlist);
367 
368  if(nr==0 && (plane>=0 || frame>=0)) {
369  fprintf(stderr, "Error: specified matrices not found.\n");
370  return(11);
371  }
372 
373  return(0);
374 }
375 /*****************************************************************************/
376 
377 /*****************************************************************************/
378 
ecat63_normheader
Definition: ecat63.h:146
ecat63_scanheader::uncor_singles
float uncor_singles[16]
Definition: ecat63.h:138
ecat63_attnheader::dimension_2
short int dimension_2
Definition: ecat63.h:156
ecat63_mainheader::patient_sex
char patient_sex
Definition: ecat63.h:91
MatDir::strtblk
int strtblk
Definition: ecat63.h:57
ecat63_scanheader::dimension_2
short int dimension_2
Definition: ecat63.h:129
ecat63_imageheader::loss_corr_fctr
float loss_corr_fctr
Definition: ecat63.h:118
ecat63ReadNormheader
int ecat63ReadNormheader(FILE *fp, int blk, ECAT63_normheader *h)
Definition: ecat63r.c:375
ecat63_imageheader::quant_scale
float quant_scale
Definition: ecat63.h:108
MATRIXLIST::matrixNr
int matrixNr
Definition: ecat63.h:63
ecat63_mainheader::transaxial_fov
float transaxial_fov
Definition: ecat63.h:87
Matval
Definition: ecat63.h:68
ecat63_imageheader::slice_width
float slice_width
Definition: ecat63.h:110
ecat63.h
ecat63_mainheader::calibration_factor
float calibration_factor
Definition: ecat63.h:89
ecat63_attnheader::attenuation_type
short int attenuation_type
Definition: ecat63.h:155
ecat63EmptyMatlist
void ecat63EmptyMatlist(MATRIXLIST *mlist)
Definition: ecat63ml.c:80
ecat63_mainheader::operator_name
char operator_name[32]
Definition: ecat63.h:93
ecat63_attnheader
Definition: ecat63.h:154
ecat63_normheader::scale_factor
float scale_factor
Definition: ecat63.h:149
ecat63PrintAttnheader
void ecat63PrintAttnheader(ECAT63_attnheader *h, FILE *fp)
Definition: ecat63p.c:186
Matval::bed
int bed
Definition: ecat63.h:69
ecat63_mainheader::scan_start_minute
short int scan_start_minute
Definition: ecat63.h:81
Matval::frame
int frame
Definition: ecat63.h:69
ecat63_imageheader::image_max
short int image_max
Definition: ecat63.h:109
MATRIXLIST::matdir
MatDir * matdir
Definition: ecat63.h:65
ecat63_normheader::norm_second
short int norm_second
Definition: ecat63.h:150
ecat63_attnheader::y_radius
float y_radius
Definition: ecat63.h:158
ecat63_imageheader::filter_code
short int filter_code
Definition: ecat63.h:115
ecat63_scanheader::frame_start_time
int frame_start_time
Definition: ecat63.h:141
ecat63_mainheader::patient_weight
char patient_weight[10]
Definition: ecat63.h:92
mat_numdoc
void mat_numdoc(int matnum, Matval *matval)
Definition: ecat63ml.c:276
ecat63PrintMainheader
void ecat63PrintMainheader(ECAT63_mainheader *h, FILE *fp)
Definition: ecat63p.c:62
ecat63_imageheader::intrinsic_tilt
float intrinsic_tilt
Definition: ecat63.h:118
ecat63Unit
char * ecat63Unit(short int dunit)
Definition: ecat63p.c:250
ecat63_imageheader::well_counter_cal_fctr
float well_counter_cal_fctr
Definition: ecat63.h:121
ecat63_scanheader::sample_distance
float sample_distance
Definition: ecat63.h:131
ecat63_imageheader::image_rotation
float image_rotation
Definition: ecat63.h:117
ecat63_normheader::dimension_1
short int dimension_1
Definition: ecat63.h:148
ecat63_imageheader::y_origin
float y_origin
Definition: ecat63.h:108
ecat63_mainheader::scan_start_month
short int scan_start_month
Definition: ecat63.h:80
ecat63_mainheader::physician_name
char physician_name[32]
Definition: ecat63.h:93
ecat63_mainheader::calibration_units
short int calibration_units
Definition: ecat63.h:90
ecat63_mainheader::isotope_halflife
float isotope_halflife
Definition: ecat63.h:83
ecat63_attnheader::x_origin
float x_origin
Definition: ecat63.h:158
ECAT63_TEST
int ECAT63_TEST
Definition: ecat63.h:52
ecat63_imageheader::frame_start_time
int frame_start_time
Definition: ecat63.h:111
ecat63_mainheader::scan_start_year
short int scan_start_year
Definition: ecat63.h:80
ecat63_mainheader::patient_age
char patient_age[10]
Definition: ecat63.h:92
ecat63_mainheader::study_description
char study_description[32]
Definition: ecat63.h:94
ecat63_scanheader::tot_avg_uncor
float tot_avg_uncor
Definition: ecat63.h:139
ecat63_imageheader::plane_eff_corr_fctr
float plane_eff_corr_fctr
Definition: ecat63.h:117
ecat63_mainheader::scan_start_day
short int scan_start_day
Definition: ecat63.h:80
ecat63_scanheader::net_trues
int net_trues
Definition: ecat63.h:137
ecat63_mainheader::num_gates
short int num_gates
Definition: ecat63.h:97
ecat63_scanheader::multiples
int multiples
Definition: ecat63.h:137
ecat63_mainheader::gantry_rotation
float gantry_rotation
Definition: ecat63.h:85
ecat63_imageheader::recon_scale
float recon_scale
Definition: ecat63.h:108
ecat63_imageheader
Definition: ecat63.h:105
ecat63_imageheader::data_type
short int data_type
Definition: ecat63.h:107
ecat63_imageheader::annotation
char annotation[40]
Definition: ecat63.h:122
ecat63_imageheader::ecat_calibration_fctr
float ecat_calibration_fctr
Definition: ecat63.h:121
ecat63_scanheader::frame_duration
int frame_duration
Definition: ecat63.h:141
ecat63_imageheader::quant_units
short int quant_units
Definition: ecat63.h:119
ecat63_mainheader
Definition: ecat63.h:72
MatDir::matnum
int matnum
Definition: ecat63.h:56
ecat63_attnheader::data_type
short int data_type
Definition: ecat63.h:155
ecat63_mainheader::system_type
short int system_type
Definition: ecat63.h:77
ecat63_imageheader::frame_duration
int frame_duration
Definition: ecat63.h:111
ecat63_mainheader::isotope_code
char isotope_code[8]
Definition: ecat63.h:82
ecat63_scanheader::cor_singles
float cor_singles[16]
Definition: ecat63.h:138
NORM_DATA
#define NORM_DATA
Definition: ecat63.h:41
ecat63_mainheader::file_type
short int file_type
Definition: ecat63.h:78
ecat63_imageheader::image_min
short int image_min
Definition: ecat63.h:109
ecat63InitMatlist
void ecat63InitMatlist(MATRIXLIST *mlist)
Definition: ecat63ml.c:69
ecat63_mainheader::user_process_code
char user_process_code[10]
Definition: ecat63.h:101
ecat63_scanheader::prompts
int prompts
Definition: ecat63.h:137
ecat63ReadScanheader
int ecat63ReadScanheader(FILE *fp, int blk, ECAT63_scanheader *h)
Definition: ecat63r.c:296
ecat63_scanheader::r_wave_offset
int r_wave_offset
Definition: ecat63.h:134
ecat63_mainheader::study_name
char study_name[12]
Definition: ecat63.h:91
ecat63_mainheader::plane_separation
float plane_separation
Definition: ecat63.h:98
ecat63_mainheader::num_frames
short int num_frames
Definition: ecat63.h:97
ecat63_scanheader::isotope_halflife
float isotope_halflife
Definition: ecat63.h:132
ecat63PrintScanheader
void ecat63PrintScanheader(ECAT63_scanheader *h, FILE *fp)
Definition: ecat63p.c:152
ecat63_normheader::norm_year
short int norm_year
Definition: ecat63.h:150
ecat63_attnheader::sample_distance
float sample_distance
Definition: ecat63.h:160
ecat63_mainheader::data_type
short int data_type
Definition: ecat63.h:76
ecat63_scanheader::total_coin_rate
int total_coin_rate
Definition: ecat63.h:140
ecat63_scanheader::data_type
short int data_type
Definition: ecat63.h:128
ecat63_scanheader::scan_max
short int scan_max
Definition: ecat63.h:136
ecat63_mainheader::num_planes
short int num_planes
Definition: ecat63.h:97
ecat63_imageheader::pixel_size
float pixel_size
Definition: ecat63.h:110
ecat63_imageheader::recon_start_month
short int recon_start_month
Definition: ecat63.h:120
ecat63_scanheader
Definition: ecat63.h:126
ecat63_imageheader::recon_start_day
short int recon_start_day
Definition: ecat63.h:120
ecat63PrintMatlist
void ecat63PrintMatlist(MATRIXLIST *ml)
Definition: ecat63ml.c:160
IMAGE_DATA
#define IMAGE_DATA
Definition: ecat63.h:39
MATRIXLIST
Definition: ecat63.h:62
ecat63_mainheader::scan_start_second
short int scan_start_second
Definition: ecat63.h:81
ecat63_scanheader::loss_correction_fctr
float loss_correction_fctr
Definition: ecat63.h:142
ecat63_mainheader::axial_fov
float axial_fov
Definition: ecat63.h:87
ecat63_attnheader::y_origin
float y_origin
Definition: ecat63.h:158
ecat63_imageheader::dimension_2
short int dimension_2
Definition: ecat63.h:107
ecat63_normheader::dimension_2
short int dimension_2
Definition: ecat63.h:148
RAW_DATA
#define RAW_DATA
Definition: ecat63.h:38
ecat63_mainheader::patient_height
char patient_height[10]
Definition: ecat63.h:92
Matval::gate
int gate
Definition: ecat63.h:69
ecat63_normheader::data_type
short int data_type
Definition: ecat63.h:147
ecat63_imageheader::recon_start_year
short int recon_start_year
Definition: ecat63.h:120
ATTN_DATA
#define ATTN_DATA
Definition: ecat63.h:40
ecat63PrintNormheader
void ecat63PrintNormheader(ECAT63_normheader *h, FILE *fp)
Definition: ecat63p.c:208
ecat63_attnheader::dimension_1
short int dimension_1
Definition: ecat63.h:156
ecat63_mainheader::scan_start_hour
short int scan_start_hour
Definition: ecat63.h:81
ecat63_imageheader::recon_start_sec
short int recon_start_sec
Definition: ecat63.h:113
ecat63_mainheader::bed_elevation
float bed_elevation
Definition: ecat63.h:85
ecat63_scanheader::delayed
int delayed
Definition: ecat63.h:137
ecat63_mainheader::patient_id
char patient_id[16]
Definition: ecat63.h:91
ecat63_imageheader::x_origin
float x_origin
Definition: ecat63.h:108
ecat63_mainheader::patient_name
char patient_name[32]
Definition: ecat63.h:91
ecat63_mainheader::radiopharmaceutical
char radiopharmaceutical[32]
Definition: ecat63.h:84
ecat63_imageheader::recon_start_hour
short int recon_start_hour
Definition: ecat63.h:113
ecat63ReadImageheader
int ecat63ReadImageheader(FILE *fp, int blk, ECAT63_imageheader *h)
Definition: ecat63r.c:152
ecat63_mainheader::sw_version
short int sw_version
Definition: ecat63.h:75
ecat63Datatype
char * ecat63Datatype(short int dtype)
Definition: ecat63p.c:227
ecat63_mainheader::init_bed_position
float init_bed_position
Definition: ecat63.h:98
ecat63_mainheader::num_bed_pos
short int num_bed_pos
Definition: ecat63.h:97
ecat63_normheader::norm_month
short int norm_month
Definition: ecat63.h:150
ecat63_imageheader::decay_corr_fctr
float decay_corr_fctr
Definition: ecat63.h:118
ecat63_mainheader::original_file_name
char original_file_name[20]
Definition: ecat63.h:74
ecat63_scanheader::gate_duration
int gate_duration
Definition: ecat63.h:134
ecat63_imageheader::recon_start_min
short int recon_start_min
Definition: ecat63.h:113
ecat63_scanheader::scan_min
short int scan_min
Definition: ecat63.h:136
ecat63_mainheader::patient_dexterity
char patient_dexterity
Definition: ecat63.h:93
Matval::plane
int plane
Definition: ecat63.h:69
ecat63ReadAttnheader
int ecat63ReadAttnheader(FILE *fp, int blk, ECAT63_attnheader *h)
Definition: ecat63r.c:238
ecat63_scanheader::tot_avg_cor
float tot_avg_cor
Definition: ecat63.h:139
ecat63_scanheader::scale_factor
float scale_factor
Definition: ecat63.h:135
ecat63PrintImageheader
void ecat63PrintImageheader(ECAT63_imageheader *h, FILE *fp)
Definition: ecat63p.c:115
ecat63_normheader::norm_day
short int norm_day
Definition: ecat63.h:150
ecat63_normheader::norm_minute
short int norm_minute
Definition: ecat63.h:150
float2parts
void float2parts(float *buf)
Definition: ecat63p.c:282
ecat63_attnheader::scale_factor
float scale_factor
Definition: ecat63.h:157
ecat63_normheader::norm_hour
short int norm_hour
Definition: ecat63.h:150
ecat63_attnheader::attenuation_coeff
float attenuation_coeff
Definition: ecat63.h:159
ecat63_attnheader::x_radius
float x_radius
Definition: ecat63.h:158
ecat63_mainheader::gantry_tilt
float gantry_tilt
Definition: ecat63.h:85
ecat63ReadMatlist
int ecat63ReadMatlist(FILE *fp, MATRIXLIST *ml)
Definition: ecat63ml.c:97
ecat63_imageheader::filter_params
float filter_params[6]
Definition: ecat63.h:121
ecat63_imageheader::dimension_1
short int dimension_1
Definition: ecat63.h:107
ecat63_scanheader::dimension_1
short int dimension_1
Definition: ecat63.h:129
ecat6PrintSubheader
int ecat6PrintSubheader(ECAT63_mainheader mh, FILE *fp, int plane, int frame, FILE *ofp)
Definition: ecat63p.c:296
ecat63_attnheader::tilt_angle
float tilt_angle
Definition: ecat63.h:158