Defines | Functions | Variables
contrib/mul/vil3d/file_formats/vil3d_gipl_format.cxx File Reference

Reader/Writer for GIPL format images. More...

#include "vil3d_gipl_format.h"
#include <vcl_cstring.h>
#include <vil/vil_stream_read.h>
#include <vil/vil_stream_fstream.h>
#include <vil3d/vil3d_image_view.h>
#include <vil3d/vil3d_new.h>
#include <vil3d/vil3d_property.h>
#include <vil3d/vil3d_image_resource.h>
#include <vcl_vector.h>
#include <vil/vil_open.h>
#include <vsl/vsl_binary_explicit_io.h>
#include <vcl_cassert.h>

Go to the source code of this file.

Defines

#define GIPL_HEADERSIZE   256
#define GIPL_BINARY   1
#define GIPL_CHAR   7
#define GIPL_U_CHAR   8
#define GIPL_U_SHORT   15
#define GIPL_SHORT   16
#define GIPL_U_INT   31
#define GIPL_INT   32
#define GIPL_FLOAT   64
#define GIPL_DOUBLE   65
#define GIPL_C_SHORT   144
#define GIPL_C_INT   160
#define GIPL_C_FLOAT   192
#define GIPL_C_DOUBLE   193
#define GIPL_UNDEFINED_ORIENTATION   0
#define GIPL_UNDEFINED_PROJECTION   1
#define GIPL_AP_PROJECTION   2
#define GIPL_LATERAL_PROJECTION   3
#define GIPL_OBLIQUE_PROJECTION   4
#define GIPL_UNDEFINED_TOMO   8
#define GIPL_AXIAL   9
#define GIPL_CORONAL   10
#define GIPL_SAGITTAL   11
#define GIPL_OBLIQUE_TOMO   12
#define macro(type)

Functions

void ConvertHostToMSB (char *ptr, int nbyte, int nelem=1)

Variables

const unsigned GIPL_MAGIC1 = 719555000
const unsigned GIPL_MAGIC2 = 4026526128U

Detailed Description

Reader/Writer for GIPL format images.

Author:
Tim Cootes - Manchester

Definition in file vil3d_gipl_format.cxx.


Define Documentation

#define GIPL_AP_PROJECTION   2

Definition at line 48 of file vil3d_gipl_format.cxx.

#define GIPL_AXIAL   9

Definition at line 52 of file vil3d_gipl_format.cxx.

#define GIPL_BINARY   1

Definition at line 31 of file vil3d_gipl_format.cxx.

#define GIPL_C_DOUBLE   193

Definition at line 43 of file vil3d_gipl_format.cxx.

#define GIPL_C_FLOAT   192

Definition at line 42 of file vil3d_gipl_format.cxx.

#define GIPL_C_INT   160

Definition at line 41 of file vil3d_gipl_format.cxx.

#define GIPL_C_SHORT   144

Definition at line 40 of file vil3d_gipl_format.cxx.

#define GIPL_CHAR   7

Definition at line 32 of file vil3d_gipl_format.cxx.

#define GIPL_CORONAL   10

Definition at line 53 of file vil3d_gipl_format.cxx.

#define GIPL_DOUBLE   65

Definition at line 39 of file vil3d_gipl_format.cxx.

#define GIPL_FLOAT   64

Definition at line 38 of file vil3d_gipl_format.cxx.

#define GIPL_HEADERSIZE   256

Definition at line 28 of file vil3d_gipl_format.cxx.

#define GIPL_INT   32

Definition at line 37 of file vil3d_gipl_format.cxx.

#define GIPL_LATERAL_PROJECTION   3

Definition at line 49 of file vil3d_gipl_format.cxx.

#define GIPL_OBLIQUE_PROJECTION   4

Definition at line 50 of file vil3d_gipl_format.cxx.

#define GIPL_OBLIQUE_TOMO   12

Definition at line 55 of file vil3d_gipl_format.cxx.

#define GIPL_SAGITTAL   11

Definition at line 54 of file vil3d_gipl_format.cxx.

#define GIPL_SHORT   16

Definition at line 35 of file vil3d_gipl_format.cxx.

#define GIPL_U_CHAR   8

Definition at line 33 of file vil3d_gipl_format.cxx.

#define GIPL_U_INT   31

Definition at line 36 of file vil3d_gipl_format.cxx.

#define GIPL_U_SHORT   15

Definition at line 34 of file vil3d_gipl_format.cxx.

#define GIPL_UNDEFINED_ORIENTATION   0

Definition at line 46 of file vil3d_gipl_format.cxx.

#define GIPL_UNDEFINED_PROJECTION   1

Definition at line 47 of file vil3d_gipl_format.cxx.

#define GIPL_UNDEFINED_TOMO   8

Definition at line 51 of file vil3d_gipl_format.cxx.

#define macro (   type)
Value:
vil3d_image_view< type > im = \
    vil3d_new_image_view_plane_k_j_i(ni, nj, nk, 1, type()); \
  for (unsigned k=0; k<nk; ++k) \
  { \
    if (ni == this->ni()) \
    { \
      is_->seek(GIPL_HEADERSIZE + ((k+k0)*this->nj()*ni + j0*ni) * sizeof(type)); \
      is_->read(&im(0,0,k), nj*ni * sizeof(type)); \
    } \
    else \
      for (unsigned j=0; j<nj; ++j) \
      { \
        is_->seek(GIPL_HEADERSIZE + ((k+k0)*this->nj()*this->ni() + (j+j0)*this->ni() + i0) * sizeof(type)); \
        is_->read(&im(0,j,k), ni * sizeof(type)); \
      } \
  }

Function Documentation

void ConvertHostToMSB ( char *  ptr,
int  nbyte,
int  nelem = 1 
) [inline]

Definition at line 401 of file vil3d_gipl_format.cxx.


Variable Documentation

const unsigned GIPL_MAGIC1 = 719555000

Definition at line 24 of file vil3d_gipl_format.cxx.

const unsigned GIPL_MAGIC2 = 4026526128U

Definition at line 25 of file vil3d_gipl_format.cxx.