psihdf.h

Go to the documentation of this file.
00001 /* Gxsm - Gnome X Scanning Microscopy
00002  * universal STM/AFM/SARLS/SPALEED/... controlling and
00003  * data analysis software
00004  * 
00005  * Copyright (C) 1999,2000,2001,2002,2003 Percy Zahl
00006  *
00007  * Authors: Percy Zahl <zahl@users.sf.net>
00008  * additional features: Andreas Klust <klust@users.sf.net>
00009  * WWW Home: http://gxsm.sf.net
00010  *
00011  * This program is free software; you can redistribute it and/or modify
00012  * it under the terms of the GNU General Public License as published by
00013  * the Free Software Foundation; either version 2 of the License, or
00014  * (at your option) any later version.
00015  *
00016  * This program is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  * GNU General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU General Public License
00022  * along with this program; if not, write to the Free Software
00023  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
00024  */
00025 
00026 /* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 8 c-style: "K&R" -*- */
00027 
00028 // assumed by AK
00029 #define MAX_SOURCE_NAME  32
00030 #define MAX_MODE_NAME    8
00031 #define MAX_UNIT_STRING  8
00032 
00033 // defined by AK
00034 #define PSI_HEADER_OFFSET 0x03A0
00035 
00036 
00037 // renamed tagHEADER to psiHEADER and HEADER to PsiHEADER
00038 // to avoid conflict with tagHEADER defined
00039 // for class DatFile in ../gnu/batch.h
00040 
00041 typedef   struct    psiHEADER
00042 {                   
00043   //{{ Do not modify the codes in this block.
00044   short          nHardware;                      //   XL, etc.
00045   short          nSource;                        //   Data source. TOPO, ERROR, LFM, etc.
00046   char           szSourceName[MAX_SOURCE_NAME];
00047   char           szImageMode[MAX_MODE_NAME];     //   AFM, LFM, NCM and MFM etc.    
00048   short          bFastScanDir;                   //   non-zero for forward, 0 for backward.
00049   short          bSlowScanDir;                   //   non-zero when scan up.
00050   short          bXYSwap;                        //   Swap fast-slow scanning dirctions.
00051   short          nCols, nRows;                   //   Image size. 
00052   //DWORD           dwFilter;           
00053   //   Bitwise OR of filter functions applied.
00054   // This flag is not yet well defined.
00055   short          dummy, dummy2;                  //   dummy by AK
00056   short          fLowPass;                       //   LowPass filter strength.
00057   short          b3rdOrder;                      //   3rd order fit applied.
00058   short          bAutoFlatten;                   //   Automatic flatten after imaging.
00059   float          fXScanSize, fYScanSize;         //   Scan size in um.
00060   float          fXOffset, fYOffset;             //   x,y offset in microns.
00061   float          fFastAngle, fSlowAngle;         //   Angle of Fast and slow direction about
00062                                                  //   positive x-axis.   
00063   float          fScanRate;                      //   Scan speed in rows per second. 
00064   float          fSetPoint;                      //   Error signal set point.
00065   char           szSetPointUnit[MAX_UNIT_STRING];
00066   float          fTipBiasVoltage;
00067   float          fSampleBiasVoltage; 
00068   float          fDataGain;                      //   um per data step.
00069   char           szUnit[MAX_UNIT_STRING];
00070   short          nDataMin;                       //   the z-range last used.
00071   short          nDataMax;
00072   //   ----03-02-95----
00073   float          fXSlope;                        // Slope correction amount in X
00074   float          fYSlope;                        // Slope correction amount in Y
00075   //  ----04-04-96----
00076   //}}
00077 }    PsiHEADER;
00078 
00079   
00080   
00081   
00082 //===========================================================================
00083 //
00084 //  PSIHDF.H
00085 //
00086 //      The contents of this file are extracted from original NCSA HDF ver 3.3
00087 //        HDF.H and HDFI.H files. Only the appropriate information are extracted.
00088 //        And some custom informations have been added.
00089 //
00090 //===========================================================================
00091 //  Members:
00092 //
00093 //===========================================================================
00094 //  08/31/94    jLee created
00095 //===========================================================================
00096 
00097 #ifndef   PSIHDF_H
00098 #define   PSIHDF_H
00099   
00100 /*--------------------------------------------------------------------------*/
00101 /*                              MT/NT constants                             */
00102 /*  four MT nibbles represent double, float, int, uchar (from most          */
00103 /*  significant to least significant).                                      */
00104 /*  The values for each nibble are:                                         */
00105 /*      1 - Big Endian                                                      */
00106 /*      2 - VAX                                                             */
00107 /*      3 - Cray                                                            */
00108 /*      4 - Little Endian                                                   */
00109 /*      5 - Convex                                                          */
00110 /*      6 - Fijitsu VP                                                      */
00111 /*--------------------------------------------------------------------------*/
00112 #define     DFMT_SUN            0x1111
00113 #define     DFMT_ALLIANT        0x1111
00114 #define     DFMT_IRIS4          0x1111
00115 #define     DFMT_APOLLO         0x1111
00116 #define     DFMT_IBM6000        0x1111
00117 #define     DFMT_HP9000         0x1111
00118 #define     DFMT_CONVEXNATIVE   0x5511
00119 #define     DFMT_CONVEX         0x1111
00120 #define     DFMT_UNICOS         0x3331
00121 #define     DFMT_CTSS           0x3331
00122 #define     DFMT_VAX            0x2221
00123 #define     DFMT_MIPSEL         0x4441
00124 #define     DFMT_PC             0x4441
00125 #define     DFMT_MAC            0x1111
00126 #define     DFMT_SUN386         0x4441
00127 #define     DFMT_NEXT           0x1111
00128 #define     DFMT_MOTOROLA       0x1111
00129 #define     DFMT_ALPHA          0x4441
00130 #define     DFMT_VP             0x6611
00131 
00132 //typedef int                        bool;
00133 typedef char                       char8;
00134 typedef unsigned char              uchar8;
00135 typedef char                       int8;
00136 typedef unsigned char              uint8;
00137 typedef short int                  int16;
00138 typedef unsigned short int         uint16;
00139 typedef long int                   int32;
00140 typedef unsigned long int          uint32;
00141 typedef int                        intn;
00142 typedef unsigned int               uintn;
00143 typedef float                      float32;
00144 typedef double                     float64;
00145 typedef long                       intf;
00146 
00147   
00148 #define DFNT_HDF      0x00000000    // standard HDF format
00149 #define DFNT_NATIVE   0x00001000    // native format
00150 #define DFNT_CUSTOM   0x00002000    // custom format
00151 #define DFNT_LITEND   0x00004000    // Little Endian format
00152   
00153 //   type info codes
00154 #define DFNT_NONE        0    //   indicates that number type not set
00155 #define DFNT_QUERY       0    //   use this code to find the current type
00156 #define DFNT_VERSION     1    //   current version of NT info
00157   
00158 #define DFNT_FLOAT32     5
00159 #define DFNT_FLOAT       5    //  For backward compat; don't use
00160 #define DFNT_FLOAT64     6
00161 #define DFNT_DOUBLE      6    //  For backward compat; don't use
00162 #define DFNT_FLOAT128    7    //  No current plans for support
00163   
00164 #define DFNT_INT8       20
00165 #define DFNT_UINT8      21
00166 
00167 #define DFNT_INT16      22
00168 #define DFNT_UINT16     23
00169 #define DFNT_INT32      24
00170 #define DFNT_UINT32     25
00171 #define DFNT_INT64      26
00172 #define DFNT_UINT64     27
00173 #define DFNT_INT128     28    //  No current plans for support
00174 #define DFNT_UINT128    30    //  No current plans for support
00175   
00176 #define DFNT_UCHAR8     3 //  3 chosen for backward compatibility
00177 #define DFNT_UCHAR      3     //   uchar=uchar8 for backward combatibility
00178 #define DFNT_CHAR8      4     //   4 chosen for backward compatibility
00179 #define DFNT_CHAR       4     //   uchar=uchar8 for backward combatibility
00180 #define DFNT_CHAR16     42  //  No current plans for support
00181 #define DFNT_UCHAR16    43  //  No current plans for support
00182   
00183 //   class info codes for int
00184 #define        DFNTI_MBO       1   //   Motorola byte order 2's compl
00185 #define DFNTI_VBO       2   //  Vax byte order 2's compl
00186 #define DFNTI_IBO       4   //  Intel byte order 2's compl
00187 
00188 //   class info codes for float
00189 #define DFNTF_NONE      0   //     indicates subclass is not set
00190 #define DFNTF_HDFDEFAULT 1    //  hdf default float format is ieee
00191 #define DFNTF_IEEE      1   //     IEEE format
00192 #define DFNTF_VAX       2   //     Vax format
00193 #define DFNTF_CRAY      3   //     Cray format
00194 #define DFNTF_PC        4   //     PC floats - flipped IEEE
00195 #define DFNTF_CONVEX    5   // CONVEX native format
00196 #define DFNTF_VP        6   //     Fujitsu VP native format
00197   
00198 //   class info codes for char
00199 #define DFNTC_BYTE      0 //  bitwise/numeric field
00200 #define DFNTC_ASCII     1   //     ASCII
00201 #define DFNTC_EBCDIC    5   //  EBCDIC
00202   
00203 //   array order
00204 #define DFO_FORTRAN     1 //  column major order
00205 #define DFO_C           2   //     row major order
00206 
00207 //--------------------------------------------------------------------
00208 //   Sizes of number types
00209 //--------------------------------------------------------------------
00210 
00211 //   first the standard sizes of number types
00212   
00213 #define SIZE_FLOAT32    4
00214 #define SIZE_FLOAT64    8
00215 #define SIZE_FLOAT128  16 //  No current plans for support
00216 
00217 #define SIZE_INT8       1
00218 #define SIZE_UINT8      1
00219 #define SIZE_INT16      2
00220 #define SIZE_UINT16     2
00221 #define SIZE_INT32      4
00222 #define SIZE_UINT32     4
00223 #define SIZE_INT64      8
00224 #define SIZE_UINT64     8
00225 #define SIZE_INT128    16   //     No current plans for support
00226 #define SIZE_UINT128   16   //     No current plans for support
00227 
00228 #define SIZE_CHAR8      1
00229 #define SIZE_CHAR       1   //     For backward compat char8 == char
00230 #define SIZE_UCHAR8     1
00231 #define SIZE_UCHAR      1   //     For backward compat uchar8 == uchar
00232 #define SIZE_CHAR16     2   //     No current plans for support
00233 #define SIZE_UCHAR16    2   //     No current plans for support
00234 
00235 //   tags and refs
00236 #define DFREF_WILDCARD 0
00237 #define DFTAG_WILDCARD 0
00238 #define DFTAG_NULL 1
00239 #define DFTAG_LINKED 20       //   check uniqueness
00240 #define DFTAG_VERSION 30
00241 
00242 //   utility set
00243 #define DFTAG_FID   ((uint16)100) //    File identifier
00244 #define DFTAG_FD    ((uint16)101)  //   File description
00245 #define DFTAG_TID   ((uint16)102)  //   Tag identifier
00246 #define DFTAG_TD    ((uint16)103)  //   Tag descriptor
00247 #define DFTAG_DIL   ((uint16)104)  //   data identifier label
00248 #define DFTAG_DIA   ((uint16)105)  //   data identifier annotation
00249 #define DFTAG_NT    ((uint16)106)  //   number type
00250 #define DFTAG_MT    ((uint16)107)  //   machine type
00251   
00252 //   raster-8 set
00253 #define DFTAG_ID8   ((uint16)200)  //   8-bit Image dimension
00254 #define DFTAG_IP8   ((uint16)201)  //   8-bit Image palette
00255 #define DFTAG_RI8   ((uint16)202)  //   Raster-8 image
00256 #define DFTAG_CI8   ((uint16)203)  //   RLE compressed 8-bit image
00257 #define DFTAG_II8   ((uint16)204)  //   IMCOMP compressed 8-bit image
00258   
00259 //   Raster Image set
00260 #define DFTAG_ID    ((uint16)300)  //   Image DimRec
00261 #define DFTAG_LUT   ((uint16)301)  //   Image Palette
00262 #define DFTAG_RI    ((uint16)302)  //   Raster Image
00263 #define DFTAG_CI    ((uint16)303)  //   Compressed Image
00264   
00265 #define DFTAG_RIG   ((uint16)306)  //   Raster Image Group
00266 #define DFTAG_LD    ((uint16)307)  //   Palette DimRec
00267 #define DFTAG_MD    ((uint16)308)  //   Matte DimRec
00268 #define DFTAG_MA    ((uint16)309)  //   Matte Data
00269 #define DFTAG_CCN   ((uint16)310)  //   color correction
00270 #define DFTAG_CFM   ((uint16)311)  //   color format
00271 #define DFTAG_AR    ((uint16)312)  //   aspect ratio
00272   
00273 #define DFTAG_DRAW  ((uint16)400)  //   Draw these images in sequence
00274 #define DFTAG_RUN   ((uint16)401)  //   run this as a program/script
00275 
00276 #define DFTAG_XYP   ((uint16)500)  //   x-y position
00277 #define DFTAG_MTO   ((uint16)501)  //   machine-type override
00278 
00279 //   Tektronix
00280 #define DFTAG_T14   ((uint16)602)  //   TEK 4014 data
00281 #define DFTAG_T105  ((uint16)603)  //   TEK 4105 data
00282 
00283 //   Scientific Data set
00284 #define DFTAG_SDG   ((uint16)700)  //   Scientific Data Group
00285 #define DFTAG_SDD   ((uint16)701)  //   Scientific Data DimRec
00286 #define DFTAG_SD    ((uint16)702)  //   Scientific Data
00287 #define DFTAG_SDS   ((uint16)703)  //   Scales
00288 #define DFTAG_SDL   ((uint16)704)  //   Labels
00289 #define DFTAG_SDU   ((uint16)705)  //   Units
00290 #define DFTAG_SDF   ((uint16)706)  //   Formats
00291 #define DFTAG_SDM   ((uint16)707)  //   Max/Min
00292 #define DFTAG_SDC   ((uint16)708)  //   Coord sys
00293 #define DFTAG_SDT   ((uint16)709)  //   Transpose
00294 #define DFTAG_SDLNK ((uint16)710)  //   Links related to the dataset
00295 #define DFTAG_NDG   ((uint16)720)  //   Numeric Data Group
00296 #define DFTAG_CAL   ((uint16)731)  //   Calibration information
00297 #define DFTAG_FV    ((uint16)732)  //   Fill Value information
00298 #define DFTAG_BREQ  ((uint16)799)  //   Beginning of required tags
00299 #define DFTAG_EREQ  ((uint16)780)  //   Current end of the range
00300   
00301 //   VSets
00302 #define DFTAG_VG     ((uint16)1965) //  Vgroup
00303 #define DFTAG_VH     ((uint16)1962) //  Vdata Header
00304 #define DFTAG_VS     ((uint16)1963) //  Vdata Storage
00305   
00306 //   compression schemes
00307 #define DFTAG_RLE   ((uint16)11)    //  run length encoding
00308 #define DFTAG_IMC   ((uint16)12)    //  IMCOMP compression alias
00309 #define DFTAG_IMCOMP ((uint16)12)   //  IMCOMP compression
00310 #define DFTAG_JPEG  ((uint16)13)    //  JPEG compression (24-bit data)
00311 #define DFTAG_GREYJPEG  ((uint16)14)//  JPEG compression (8-bit data)
00312   
00313 //   Interlace schemes
00314 #define DFIL_PIXEL   0             //   Pixel Interlacing
00315 #define DFIL_LINE    1             //   Scan Line Interlacing
00316 #define DFIL_PLANE   2             //   Scan Plane Interlacing
00317   
00318 //   SPECIAL CODES
00319 #define SPECIAL_LINKED 1
00320 #define SPECIAL_EXT 2
00321   
00322 //   PARAMETERS
00323   
00324 #define DF_MAXFNLEN 256
00325   
00326 //---------------------------------------------------------------------
00327 //
00328 //   PSI stuffs
00329 //
00330 //----------------------------------------------------------------------
00331 
00332 // changed by AK (reverted byte order)
00333 #define        HDF_MAGIC_NUM ((uint32) 0x0113030E )
00334   
00335 //   Here are our own custom tags
00336 #define        PSITAG_VER     ((uint16)0x8001)    //  Version information
00337 //   | PSITAG_VER | ref_no |[offset:length]|
00338 //                                 +--->|version|
00339 //   ref_no : 16bit reference number
00340 //   version : 32bit integer number, which is composed of
00341 //        major  : MSB 8bit major version number
00342 //        minor  : next 8bit minor version number
00343 //        rev    : LSB 16bit revision number
00344 //   example ver = 4.01.17
00345 //        version = 0x04010011
00346 //        
00347   
00348 //{{ ObsoleteTags_Begin
00349 
00350 #define        PSITAG_ROT     ((uint16)0x8002)    // (x,y) offset, scan directions,
00351                                                   //   ,rotating angle of scanning area.
00352 //   | PSITAG_POS | ref_no |[offset:length]|
00353 //                                 +--->|Rotation|
00354 //   ref_no : 16bit reference number
00355 //   Rotation : |(float32)XOrigin|(float32)YOrigin|
00356 //               |(byte) FastDir|(byte) SlowDir|
00357 //                |(float32)fFastAxisAngle|(float32)fSlowAxisAngle|
00358 //                  ,FastDir=1 for Forward Scan.
00359 //                  ,SlowDir=1 for Scan Up.
00360   
00361 #define        PSITAG_HDW     ((uint16)0x8003)    //  Hardware description
00362 //   | PSITAG_HDW | ref_no |[offset:length]|
00363 //                                 +--->|hardware|
00364 //   ref_no : 16bit reference number
00365 //   hardware : null-teminated text string.
00366   
00367 #define        PSITAG_SRC     ((uint16)0x8004)    // Data source name
00368 //   | PSITAG_SRC | ref_no |[offset:length]|
00369 //                                 +--->|source|
00370 //   ref_no : 16bit reference number
00371 //   source : null-teminated text string.
00372   
00373 #define        PSITAG_SPD     ((uint16)0x8005)    //  Scan speed
00374 //   | PSITAG_SPD | ref_no |[offset:length]|
00375 //                                 +--->|Speed|
00376 //   ref_no : 16bit reference number
00377 //   Speed : |(float32)fScanRate| Speed Unit |
00378 //             ,SpeedUnit = null terminated string.
00379   
00380 #define        PSITAG_SET     ((uint16)0x8006)    //  Z servo set point.
00381 //   | PSITAG_SET | ref_no |[offset:length]|
00382 //                                 +--->|SetPoint|
00383 //   ref_no : 16bit reference number
00384 //   SetPoint :     |(float32)fScanRate| Set Point |
00385 //                  ,SpeedUnit = null terminated string.
00386 
00387 //}} ObsolteTag_End
00388   
00389 #define        PSITAG_HD ((uint16)0x8009)    //  Header block
00390 //   | PSITAG_HD | ref_no |[offset:length]|
00391 //                                 +--->|Header|
00392 //   ref_no : 16bit reference number
00393 //   Header : 
00394 //        Binary header block for this particular version. This header
00395 //        block is a direct dump of the C structure. Hence, the structure
00396 //        is version-dependent. However, this structure is only growing
00397 //        in size to keep old information. Always check PSITAG_VER to get
00398 //        the correct version of writer. Do not assume your sizeof( 
00399 //        Header)   gives you correct size. Always check the length of the
00400 //        tag data.
00401   
00402 #define        PSITAG_SPC     ((uint16)0x800A)    //  1-D Spectroscopy data
00403 //   | PSITAG_SPEC | ref_no |[offset:length]|
00404 //                                 +--->|Line Spectroscopy|
00405 //   ref_no : 16bit reference number, when multiple curves are saved, 
00406 //              this number will be used as index.
00407 //   Line Spectroscopy :
00408 //        General 1-D spectroscopy data ( e.g, I-V , F-D etc ) block for
00409 //        this particular version. This block is a direct dump of the C 
00410 //        structure and binary array. Hence, the content is version
00411 //        -dependent. However, this structure is only growing in size to
00412 //        keep old information. Always check PSITAG_VER to get the correct
00413 //        version of writer. Do not assume your sizeof(...) will give you
00414             //        correct size. Always check the length of the tag data.
00415   
00416 #define        PSITAG_LA ((uint16)0x800B)    //  Line analysis data
00417 //   | PSITAG_LA | ref_no |[offset:length]|
00418 //                                 +--->|Line analysis table|
00419 //   ref_no : 16bit reference number.
00420 //   Line analysis table :
00421 //        The block is a direct dump of the C structure and binary array.
00422 //        Hence, the content may be version dependent.
00423 //        The length of the tag data is fixed size of 16384 bytes for 
00424 //        v1.1.
00425                  
00426 #define        PSITAG_RA ((uint16)0x800C)    //  Region analysis data
00427 //   | PSITAG_RA | ref_no |[offset:length]|
00428 //                                 +--->|Line analysis table|
00429 //   ref_no : 16bit reference number.
00430 //   Region analysis table :
00431 //        The block is a direct dump of the C structure and binary array.
00432 //        Hence, the content may be version dependent.
00433 //        The length of the tag data is fixed size of 32767 bytes for 
00434 //        v1.1.
00435                  
00436 typedef   struct    {
00437   uint16    wTag;
00438   uint16    wRef;
00439   uint32    dwOffset;
00440   uint32    dwLength;
00441 }    DATADESC;
00442 
00443 //   This is the number for all HDF header info before actual binary
00444 //   data block begines.
00445 #define        FILE_HEADER_SIZE 16384
00446 //#define FILE_TEXT_HEADER 8192 // Readable text header info starts here.        
00447 
00448 #define        HDF_NUM_TAGS   64        //   Let's start with 64, which is reasonably
00449                                         //   bigger than we need.
00450 #define        HDF_LEN_TID    128       //   Custome Tag ID string length.
00451 #define        HDF_LEN_UNITS  64        //   Unit string length.
00452 #define        HDF_LEN_HARDWARE 64      //   Hardware string length.
00453 #define        HDF_LEN_SOURCE      64   //   Data source
00454 #define        HDF_LEN_SPEED  64        //   Scan speed and unit string.
00455 #define        HDF_LEN_SET       64     //   Z servo set point and unit string.
00456 #define        HDF_LEN_TITLE     256    //   File title
00457 #define        HDF_LEN_REPLICA     4096 //   Text description of each records.
00458 #define        HDF_LEN_COMMENTS 2048    //   Comments.
00459   
00460 #define   NT_REF_Z            ((uint16)256)  //   DFTAG_NT ref_no for ZData.
00461 #define   NT_REF_X            ((uint16)257)  //   DFTAG_NT ref_no for X-scale.
00462 #define   NT_REF_Y            ((uint16)258)  //   DFTAG_NT ref_no for Y-scale.
00463   
00464 #define   NDG_REF_NUM              2         // NDG group RefNum. 
00465        
00466 //===========================================================================
00467 //   
00468 //   Physical map of sample image file
00469 //
00470 //===========================================================================
00471 
00472 /*
00473 #ifdef    NOT_PROGRAM_CODE_NEVER_BE_COMPILED
00474   
00475               
00476 0    |0x0E|0x03|0x13|0x01|    // Magic number
00477   
00478 //   |(uint16)NumDDs          |(uint32) Offset to Next 
00479      |   
00480 4    | HDF_NUM_TAGS  | 0                          
00481      |
00482   
00483 //     |TAG      |RefNum               |(uint32)Offset  |(uint32)Length          |
00484   10   |DFTAG_MT           |DFMT_PC    |0               |0                  
00485        |
00486   22   |DFTAG_VERSION|1    |<HDFVersion>  |12                      |
00487   34   |DFTAG_TID          |PSITAG_VER         |<VersionTID>       |strlen()      
00488                  |
00489        |DFTAG_TID          |PSITAG_HD          |<HeaderTID>   |strlen()           |
00490        
00491        |PSITAG_VER              |1          |<PsiVer>    |4                  |
00492        |DFTAG_NT                |NT_REF_Z   |<ZNumType>  |4                  |
00493        |DFTAG_NT |NT_REF_X   |<XNumType>       |4                  |
00494        |DFTAG_NT                |NT_REF_Y   |<YNumType>  |4                  |
00495        |PSITAG_HD     |2                  |<Header>                |sizeof( Header )
00496        |
00497   
00498        |DFTAG_SDD               |2          |<Dimension> |22                 |    
00499        |DFTAG_SD                |2          |<Data>           |nNumCol*nNumRows*2 |
00500        |DFTAG_SDL     |2                  |<Labels>           |strlen()    
00501        |
00502        |DFTAG_SDU               |2          |<Units>          |strlen()         |
00503        |DFTAG_SDM               |2          |<MaxMin>    
00504        |8                       |
00505        |DFTAG_SDC               |2          |<Coord>          |strlen()           |
00506        |DFTAG_CAL                    |2          |<Calibration>    |36                 |
00507        |DFTAG_NDG               |2          |<Group>     |4 * 8              |
00508        |DFTAG_FID               |1          |<Title>          |strlen()           |
00509        |DFTAG_FD |1          |<Comments>            |strlen()           |
00510        |DFTAG_NULL         |0          |0                
00511        |0                  |
00512        |DFTAG_NULL         |0          |0           
00513        |0                  |
00514        |DFTAG_NULL    |0             |0                  |0        
00515                  |
00516   
00517 //   -------------------------------------------------------------
00518   
00519   <HDFVersion>
00520   |major_ver|minor_ver|release| NCSA HDF Version 3.2 compatible"
00521   
00522   <VersionTID>
00523    PSI TAG for ProScan Version"
00524   
00525   <HeaderTID>
00526    PSI TAG for binary header block"
00527   
00528   <PsiVer>
00529   |0x04|0x01|0x0001|  //   version 04.01.0001
00530   
00531   <ZNumType>
00532   |DFNT_VERSION|DFNT_INT16|0x10|DFNTI_IBO|
00533   
00534   <XNumType>
00535   |DFNT_VERSION|DFNT_FLOAT32|0x20|DFNTF_PC|
00536   
00537   <YNumType>
00538   |DFNT_VERSION|DFNT_FLOAT32|0x20|DFNTF_PC|
00539   
00540   <Header>
00541   Direct C-structure memory dump.
00542   
00543   <Dimension>
00544   |0x0002|
00545   |(uint32)nNumCols|(uint32)nNumRows|
00546   |DFTAG_NT|NT_REF_Z|DFTAG_NT|NT_REF_X|DFTAG_NT|NT_REF_Y|
00547   
00548   <Labels>
00549    topo\0x-axis\0y-axis\0"
00550   
00551   <Units>
00552    um\0um\0um"
00553   
00554   <MaxMin>
00555   |(int16)nMax|(int16)nMin|0x0000|0x0000|
00556   
00557   <Coord>
00558    Cartesian coordinate system"
00559   
00560   <Calibration>
00561   |(float64)dfCal|(float64)dfCalError|(float64)dfOffset|(float64)dfOffsetError|
00562   |DFNT_FLOAT32|
00563   
00564   <Group>
00565   |PSITAG_HD |0x0002|DFTAG_SDD |0x0002|DFTAG_SD  |0x0002|DFTAG_SDL |0x0002|
00566   |DFTAG_SDU |0x0002|DFTAG_SDM |0x0002|DFTAG_SDC |0x0002|DFTAG_CAL |0x0002|
00567   
00568   <Title>
00569    Sample HDF file"
00570   
00571   <Comments>
00572    User comments"
00573   
00574   <Data>
00575   ....
00576 
00577 #endif  //  NOT_PROGRAM_CODE_NEVER_BE_COMPILED
00578 
00579 */
00580  
00581 #endif  // PSIHDF_H

Generated on Sat Apr 1 09:04:26 2006 for GXSM by  doxygen 1.4.6