ecat+ 6.0.0
io.h
Go to the documentation of this file.
1/* This software and supporting documentation are distributed by
2 * Institut Federatif de Recherche 49
3 * CEA/NeuroSpin, Batiment 145,
4 * 91191 Gif-sur-Yvette cedex
5 * France
6 *
7 * This software is governed by the CeCILL-B license under
8 * French law and abiding by the rules of distribution of free software.
9 * You can use, modify and/or redistribute the software under the
10 * terms of the CeCILL-B license as circulated by CEA, CNRS
11 * and INRIA at the following URL "http://www.cecill.info".
12 *
13 * As a counterpart to the access to the source code and rights to copy,
14 * modify and redistribute granted by the license, users are provided only
15 * with a limited warranty and the software's author, the holder of the
16 * economic rights, and the successive licensors have only limited
17 * liability.
18 *
19 * In this respect, the user's attention is drawn to the risks associated
20 * with loading, using, modifying and/or developing or reproducing the
21 * software by the user in light of its specific status of free software,
22 * that may mean that it is complicated to manipulate, and that also
23 * therefore means that it is reserved for developers and experienced
24 * professionals having in-depth computer knowledge. Users are therefore
25 * encouraged to load and test the software's suitability as regards their
26 * requirements in conditions enabling the security of their systems and/or
27 * data to be ensured and, more generally, to use and operate it in the
28 * same conditions as regards security.
29 *
30 * The fact that you are presently reading this means that you have had
31 * knowledge of the CeCILL-B license and that you accept its terms.
32 */
33
34/****************************************************************************
35 * PROJECT : E.C.A.T.S.H.F.J. Library
36 * MODULE NAME : io.h * TYPE : Source
37 * AUTHOR : FROUIN V. * CREATION : 19/05/2000
38 * VERSION : 0.1 * REVISION :
39 * LANGUAGE : C++ * EXAMPLE :
40 * DEVICE :
41 ****************************************************************************
42 *
43 * DESCRIPTION : Ecat6-7 data reader class
44 * Version d'apres codes les codes de C. Comtat.
45 *
46 ****************************************************************************
47 * REVISIONS : DATE | AUTHOR | DESCRIPTION
48 *--------------------|--------------|---------------------------------------
49 * 07/09/2000 | COMTAT C. | Ajout de quatre nouvelles fonctions:
50 * | |
51 * | | ecatOpen.c :
52 * | | EcatVersion
53 * | | EcatUeiCopy
54 * | |
55 * | | ecatWrite.c :
56 * | | EcatWriteVolume_S16
57 * | | EcatWriteVolume_FLOAT
58 *--------------------|--------------|---------------------------------------
59 * | |
60 * 15/01/2013 | RASTELLO.F | Use V72 for version value when ecat7
61 * | | format, for biograph reads
62 * | |
63 ****************************************************************************/
64#ifndef ECATSHFJ_IO_IO_H
65#define ECATSHFJ_IO_IO_H
66
67
68#include <ecat+/io/general.h>
69
70//for biograph reads, use version 7.2 for ecat7 format
71#define V72 72
72
73#ifdef __cplusplus
74 extern "C" {
75#endif
76
77/****************************************************************************/
79 char *fname,
80 char *mode
81 );
82/****************************************************************************/
83
84
85/****************************************************************************/
88 );
89/****************************************************************************/
90
91/****************************************************************************/
93 char *fname
94 );
95/****************************************************************************/
96
97/****************************************************************************/
99 UnifiedEcatInfo *uei_in,
100 UnifiedEcatInfo *uei_out
101 );
102/****************************************************************************/
103
104/****************************************************************************/
106 UnifiedEcatInfo *uei,
107 int t
108 );
109/****************************************************************************/
110
111/****************************************************************************/
113 UnifiedEcatInfo *uei,
114 int t
115 );
116/****************************************************************************/
117
118/****************************************************************************/
120 UnifiedEcatInfo *uei,
121 float *volume,
122 int t
123 );
124/****************************************************************************/
125
126/****************************************************************************/
128 UnifiedEcatInfo *uei,
129 short *volume,
130 int t
131 );
132/****************************************************************************/
133
134
135/****************************************************************************/
136
139 );
140
141
142/****************************************************************************/
143
144
145/****************************************************************************/
147 char *fname,
148 char *mode
149 );
150/****************************************************************************/
151
152
153/****************************************************************************/
156 );
157/****************************************************************************/
158
159/****************************************************************************/
162 int segment,
163 int bed,
164 int gate,
165 int frame
166 );
167/****************************************************************************/
168
169/****************************************************************************/
172 int segment,
173 int bed,
174 int gate,
175 int frame
176 );
177/****************************************************************************/
178
179/****************************************************************************/
182 short indata[],
183 int segment,
184 int bed,
185 int gate,
186 int frame
187 );
188/****************************************************************************/
189/****************************************************************************/
192 float indata[],
193 int segment,
194 int bed,
195 int gate,
196 int frame
197 );
198/****************************************************************************/
199
200
201#define EcatSizeX( u ) ((u)->size.x)
202#define EcatSizeY( u ) ((u)->size.y)
203#define EcatSizeZ( u ) ((u)->size.z)
204#define EcatSizeT( u ) ((u)->size.t)
205#define EcatVoxSizeX( u ) ((u)->voxelsize.x)
206#define EcatVoxSizeY( u ) ((u)->voxelsize.y)
207#define EcatVoxSizeZ( u ) ((u)->voxelsize.z)
208#define EcatVoxSizeT( u ) ((u)->voxelsize.t)
209
210#define EcatCalib( u ) ((u)->calib)
211
212#define EcatVolScale( u, n ) *((u)->scale + *((u)->sortuniqlist +(n)) )
213#define EcatVolStartTime( u, n ) *((u)->start_time + *((u)->sortuniqlist +(n)))
214#define EcatVolDurTime( u, n ) *((u)->duration_time + *((u)->sortuniqlist +(n)) )
215#define EcatRealFrameGate( u, n) *((u)->rawlist + *((u)->sortuniqlist + (n)))
216#define EcatFramed( u ) ((u)->dyn_type == ECATSHFJ_FRAMED ? 1 : 0)
217#define EcatGated( u ) ((u)->dyn_type == ECATSHFJ_GATED ? 1 : 0)
218
219#define EcatCalibUnit( u ) ((u)->calibUnits)
220#define EcatRadiopharmaceutical( u ) ((u)->radiopharmaceutical)
221#define EcatDataCalibrated( u ) ((u)->dataCalibrated)
222#define EcatProcCode( u) ((u)->proc_code)
223#define EcatFileType( u ) ((u)->trueFileType)
224
225#ifdef __cplusplus
226 }
227#endif
228
229#endif
float * EcatReadVolume_FLOAT(UnifiedEcatInfo *uei, int t)
int EcatClose(UnifiedEcatInfo *uei)
UnifiedEcatSinoInfo * EcatSinoOpen(char *fname, char *mode)
int EcatUeiCopy(UnifiedEcatInfo *uei_in, UnifiedEcatInfo *uei_out)
float * EcatSinoRead_FLOAT(UnifiedEcatSinoInfo *uesi, int segment, int bed, int gate, int frame)
short * EcatSinoRead_S16(UnifiedEcatSinoInfo *uesi, int segment, int bed, int gate, int frame)
int EcatWriteSino_FLOAT(UnifiedEcatSinoInfo *uesi, float indata[], int segment, int bed, int gate, int frame)
int EcatWriteSino_S16(UnifiedEcatSinoInfo *uesi, short indata[], int segment, int bed, int gate, int frame)
int EcatVersion(char *fname)
int EcatSinoClose(UnifiedEcatSinoInfo *uesi)
int EcatWriteVolume_FLOAT(UnifiedEcatInfo *uei, float *volume, int t)
void EcatSinoFree(UnifiedEcatSinoInfo *uesi)
UnifiedEcatInfo * EcatOpen(char *fname, char *mode)
short * EcatReadVolume_S16(UnifiedEcatInfo *uei, int t)
int EcatWriteVolume_S16(UnifiedEcatInfo *uei, short *volume, int t)