~ubuntu-branches/ubuntu/precise/insighttoolkit/precise

« back to all changes in this revision

Viewing changes to Utilities/nifti/niftilib/nifti1_io.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve M. Robbins
  • Date: 2008-12-19 20:16:49 UTC
  • mfrom: (1.2.1 upstream) (4.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20081219201649-drt97guwl2ryt0cn

* New upstream version.
  - patches/nifti-versioning.patch: Remove.  Applied upstream.
  - control:
  - rules: Update version numbers, package names.

* control: Build-depend on uuid-dev (gdcm uses it).

* copyright: Update download URL.

* rules: Adhere to parallel=N in DEB_BUILD_OPTIONS by setting MAKEFLAGS.

* compat: Set to 7.
* control: Update build-dep on debhelper to version >= 7.

* CMakeCache.txt.debian: Set CMAKE_BUILD_TYPE to "RELEASE" so that we
  build with -O3 (not -O2), necessary to optimize the templated code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
180
180
 
181
181
 
182
182
/*****************************************************************************/
 
183
/*------------------ NIfTI version of ANALYZE 7.5 structure -----------------*/
 
184
 
 
185
/* (based on fsliolib/dbh.h, but updated for version 7.5) */
 
186
 
 
187
typedef struct {
 
188
       /* header info fields - describes the header    overlap with NIfTI */
 
189
       /*                                              ------------------ */
 
190
       int sizeof_hdr;                  /* 0 + 4        same              */
 
191
       char data_type[10];              /* 4 + 10       same              */
 
192
       char db_name[18];                /* 14 + 18      same              */
 
193
       int extents;                     /* 32 + 4       same              */
 
194
       short int session_error;         /* 36 + 2       same              */
 
195
       char regular;                    /* 38 + 1       same              */
 
196
       char hkey_un0;                   /* 39 + 1                40 bytes */
 
197
 
 
198
       /* image dimension fields - describes image sizes */
 
199
       short int dim[8];                /* 0 + 16       same              */
 
200
       short int unused8;               /* 16 + 2       intent_p1...      */
 
201
       short int unused9;               /* 18 + 2         ...             */
 
202
       short int unused10;              /* 20 + 2       intent_p2...      */
 
203
       short int unused11;              /* 22 + 2         ...             */
 
204
       short int unused12;              /* 24 + 2       intent_p3...      */
 
205
       short int unused13;              /* 26 + 2         ...             */
 
206
       short int unused14;              /* 28 + 2       intent_code       */
 
207
       short int datatype;              /* 30 + 2       same              */
 
208
       short int bitpix;                /* 32 + 2       same              */
 
209
       short int dim_un0;               /* 34 + 2       slice_start       */
 
210
       float pixdim[8];                 /* 36 + 32      same              */
 
211
 
 
212
       float vox_offset;                /* 68 + 4       same              */
 
213
       float funused1;                  /* 72 + 4       scl_slope         */
 
214
       float funused2;                  /* 76 + 4       scl_inter         */
 
215
       float funused3;                  /* 80 + 4       slice_end,        */
 
216
                                                     /* slice_code,       */
 
217
                                                     /* xyzt_units        */
 
218
       float cal_max;                   /* 84 + 4       same              */
 
219
       float cal_min;                   /* 88 + 4       same              */
 
220
       float compressed;                /* 92 + 4       slice_duration    */
 
221
       float verified;                  /* 96 + 4       toffset           */
 
222
       int glmax,glmin;                 /* 100 + 8              108 bytes */
 
223
 
 
224
       /* data history fields - optional */
 
225
       char descrip[80];                /* 0 + 80       same              */
 
226
       char aux_file[24];               /* 80 + 24      same              */
 
227
       char orient;                     /* 104 + 1      NO GOOD OVERLAP   */
 
228
       char originator[10];             /* 105 + 10     FROM HERE DOWN... */
 
229
       char generated[10];              /* 115 + 10                       */
 
230
       char scannum[10];                /* 125 + 10                       */
 
231
       char patient_id[10];             /* 135 + 10                       */
 
232
       char exp_date[10];               /* 145 + 10                       */
 
233
       char exp_time[10];               /* 155 + 10                       */
 
234
       char hist_un0[3];                /* 165 + 3                        */
 
235
       int views;                       /* 168 + 4                        */
 
236
       int vols_added;                  /* 172 + 4                        */
 
237
       int start_field;                 /* 176 + 4                        */
 
238
       int field_skip;                  /* 180 + 4                        */
 
239
       int omax, omin;                  /* 184 + 8                        */
 
240
       int smax, smin;                  /* 192 + 8              200 bytes */
 
241
} nifti_analyze75;                                   /* total:  348 bytes */
 
242
 
 
243
 
 
244
/*****************************************************************************/
183
245
/*--------------- Prototypes of functions defined in this file --------------*/
184
246
 
185
247
char *nifti_datatype_string   ( int dt ) ;
210
272
int    nifti_datatype_from_string(const char * name);
211
273
char * nifti_datatype_to_string  (int dtype);
212
274
 
 
275
int   nifti_get_filesize( const char *pathname ) ;
213
276
void  swap_nifti_header ( struct nifti_1_header *h , int is_nifti ) ;
214
 
int   nifti_get_filesize( const char *pathname ) ;
 
277
void  old_swap_nifti_header( struct nifti_1_header *h , int is_nifti );
 
278
int   nifti_swap_as_analyze( nifti_analyze75 *h );
 
279
 
215
280
 
216
281
/* main read/write routines */
217
282
 
347
412
int    nifti_set_type_from_names   (nifti_image * nim);
348
413
int    nifti_add_extension(nifti_image * nim, const char * data, int len,
349
414
                           int ecode );
 
415
int    nifti_compiled_with_zlib    (void);
350
416
int    nifti_copy_extensions (nifti_image *nim_dest,const nifti_image *nim_src);
351
417
int    nifti_free_extensions (nifti_image *nim);
352
418
int  * nifti_get_intlist     (int nvals , const char *str);