ecat 6.0.0
interfile.h
Go to the documentation of this file.
1#ifndef interfile_h
2#define interfile_h
3
4#include "matrix.h"
5#ifdef ultrix
6extern char* strdup();
7#endif
8
9/*
10 * sccsid = "@(#)interfile.h 1.3 UCL-TOPO 96/05/29"
11 *
12 * Copyright (C) 1995 University of Louvain, Louvain-la-Neuve, Belgium
13 *
14 * Author : <Merence Sibomana> Sibomana@topo.ucl.ac.be
15 *
16 * Positron Emission Tomography Laboratory
17 * Universite Catholique de Louvain
18 * Ch. du Cyclotron, 2
19 * B-1348 Louvain-la-Neuve
20 * Belgium
21 *
22 * This program may be used free of charge by the members
23 * of all academic and/or scientific institutions.
24 * ANY OTHER USE IS PROHIBITED.
25 * It may also be included in any package
26 * - provided that this text is not removed from
27 * the source code and that reference to this original
28 * work is done ;
29 * - provided that this package is itself available
30 * for use, free of charge, to the members of all
31 * academic and/or scientific institutions.
32 * Nor the author, nor the Universite Catholique de Louvain, in any
33 * way guarantee that this program will fullfill any particular
34 * requirement, nor even that its use will always be harmless.
35 *
36 *
37 */
38
39/* only one energy window, static tomographic data supported */
40
97
98typedef enum {
106/* My Externsion */
107 CLICHE /* with a fixed colormap */
108} TypeOfData;
109
118
119typedef struct _InterfileItem {
120 int key;
121 char* value;
123
124extern InterfileItem used_keys[];
125
126#if defined(__STDC__) || defined(__cplusplus)
127#if defined(__cplusplus)
128extern "C" {
129/*
130 * high level user functions
131 */
132#endif
133int interfile_write_volume(MatrixFile* mptr, char *image_name,char *header_name,
134 u_char* data_matrix, int size);
135char *is_interfile(const char*);
137MatrixData *interfile_read_slice(FILE*, char** ifh, MatrixData*, int slice,
138 int u_flag);
139int interfile_read(MatrixFile *mptr,int matnum,
140 MatrixData *data, int dtype);
141#if defined(__cplusplus)
142}
143#endif
144#else /* __cplusplus */
145extern char *is_interfile();
146extern int interfile_open();
148extern int interfile_read();
150#endif
151#endif
NumberFormat
Definition interfile.h:110
@ SHORT_FLOAT
Definition interfile.h:113
@ UNSIGNED_INTEGER
Definition interfile.h:111
@ SIGNED_INTEGER
Definition interfile.h:112
@ LONG_FLOAT
Definition interfile.h:114
@ COLOR_PIXEL
Definition interfile.h:116
InterfileKeys
Definition interfile.h:41
@ MATRIX_INITIAL_ELEMENT_1
Definition interfile.h:88
@ LABEL
Definition interfile.h:76
@ DISPLAY_RANGE
Definition interfile.h:84
@ VERSION_OF_KEYS
Definition interfile.h:42
@ NUMBER_OF_BYTES_PER_PIXEL
Definition interfile.h:69
@ MATRIX_INITIAL_ELEMENT_2
Definition interfile.h:89
@ PATIENT_DOB
Definition interfile.h:50
@ NUMBER_OF_IMAGES
Definition interfile.h:62
@ STUDY_TIME
Definition interfile.h:59
@ TOTAL_NUMBER_OF_IMAGES
Definition interfile.h:57
@ REAL_EXTREMA
Definition interfile.h:86
@ IMAGE_NUMBER
Definition interfile.h:75
@ TYPE_OF_DATA
Definition interfile.h:56
@ STUDY_ID
Definition interfile.h:52
@ NUMBER_FORMAT
Definition interfile.h:68
@ IMAGE_EXTREMA
Definition interfile.h:85
@ ORIGINAL_INSTITUTION
Definition interfile.h:44
@ NUMBER_OF_DIMENSIONS
Definition interfile.h:64
@ ATLAS_ORIGIN_1
Definition interfile.h:91
@ MATRIX_SIZE_3
Definition interfile.h:67
@ ATLAS_ORIGIN_3
Definition interfile.h:93
@ MATRIX_SIZE_1
Definition interfile.h:65
@ TOTAL_COUNTS
Definition interfile.h:78
@ SCALE_FACTOR_1
Definition interfile.h:70
@ IMAGE_DURATION
Definition interfile.h:73
@ DATA_ENCODE
Definition interfile.h:55
@ MAXIMUM_PIXEL_COUNT
Definition interfile.h:77
@ PATIENT_SEX
Definition interfile.h:51
@ INTERPOLABILITY
Definition interfile.h:87
@ MATRIX_INITIAL_ELEMENT_3
Definition interfile.h:90
@ COLORTAB
Definition interfile.h:83
@ PATIENT_ID
Definition interfile.h:49
@ TRANSFORMER
Definition interfile.h:94
@ QUANTIFICATION_UNITS
Definition interfile.h:82
@ NAME_OF_DATA_FILE
Definition interfile.h:46
@ SCALE_FACTOR_3
Definition interfile.h:72
@ PROCESS_STATUS
Definition interfile.h:63
@ DATA_OFFSET_IN_BYTES
Definition interfile.h:48
@ IMAGEDATA_BYTE_ORDER
Definition interfile.h:60
@ MATRIX_SIZE_2
Definition interfile.h:66
@ SCALE_FACTOR_2
Definition interfile.h:71
@ DATA_STARTING_BLOCK
Definition interfile.h:47
@ EXAM_TYPE
Definition interfile.h:53
@ IMAGE_START_TIME
Definition interfile.h:74
@ ATLAS_ORIGIN_2
Definition interfile.h:92
@ IMAGE_MODALITY
Definition interfile.h:43
@ STUDY_DATE
Definition interfile.h:58
@ ORIGINATING_SYSTEM
Definition interfile.h:45
@ DATA_COMPRESSION
Definition interfile.h:54
@ NUMBER_OF_WINDOWS
Definition interfile.h:61
@ END_OF_INTERFILE
Definition interfile.h:95
char * is_interfile()
MatrixData * interfile_read_slice()
struct _InterfileItem InterfileItem
int interfile_open()
TypeOfData
Definition interfile.h:98
@ CURVE
Definition interfile.h:103
@ TOMOGRAPHIC
Definition interfile.h:102
@ GATED
Definition interfile.h:101
@ ROI
Definition interfile.h:104
@ CLICHE
Definition interfile.h:107
@ DYNAMIC
Definition interfile.h:100
@ OTHER
Definition interfile.h:105
@ STATIC
Definition interfile.h:99
int interfile_read()
int interfile_write_volume()
InterfileItem used_keys[]
struct matrixdata MatrixData
struct matrix_file MatrixFile