00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef __xtiffiop_h
00015 #define __xtiffiop_h
00016
00017 #include "tiffiop.h"
00018 #include "xtiffio.h"
00019
00020
00021
00022
00023
00024
00025 #define NUM_XFIELD 8
00026 #define XFIELD_BASE (FIELD_LAST-NUM_XFIELD)
00027
00028
00029 #define FIELD_GEOPIXELSCALE (XFIELD_BASE+0)
00030 #define FIELD_INTERGRAPH_MATRIX (XFIELD_BASE+1)
00031 #define FIELD_GEOTRANSMATRIX (XFIELD_BASE+2)
00032 #define FIELD_GEOTIEPOINTS (XFIELD_BASE+3)
00033 #define FIELD_GEOASCIIPARAMS (XFIELD_BASE+4)
00034 #define FIELD_GEOKEYDIRECTORY (XFIELD_BASE+5)
00035 #define FIELD_GEODOUBLEPARAMS (XFIELD_BASE+6)
00036 #ifdef JPL_TAG_SUPPORT
00037 #define FIELD_JPL_CARTO_IFD (XFIELD_BASE+7)
00038 #endif
00039
00040
00041 typedef enum {
00042 GEO_NUM_DIR=0,
00043 GEO_NUM_DOUBLE,
00044 GEO_NUM_TIEPOINT,
00045 GEO_NUM_PIXELSCALE,
00046 GEO_NUM_MATRIX,
00047 GEO_NUM_IG_MATRIX,
00048 GEO_NUM_TAGS
00049 } geo_count_t;
00050
00051
00052 struct XTIFFDirectory {
00053 uint16 xd_geodimensions[GEO_NUM_TAGS];
00054 uint16* xd_geokeydirectory;
00055 double* xd_geodoubleparams;
00056 char* xd_geoasciiparams;
00057 double* xd_geotiepoints;
00058 double* xd_geopixelscale;
00059 double* xd_geomatrix;
00060 double* xd_intergraph_matrix;
00061 #ifdef JPL_TAG_SUPPORT
00062 uint32 xd_jpl_ifd_offset;
00063 #endif
00064 };
00065 typedef struct XTIFFDirectory XTIFFDirectory;
00066
00067
00068
00069
00070
00071 struct xtiff {
00072 TIFF *xtif_tif;
00073 uint32 xtif_flags;
00074 #define XTIFFP_PRINT 0x00000001
00075 XTIFFDirectory xtif_dir;
00076 TIFFVSetMethod xtif_vsetfield;
00077 TIFFVGetMethod xtif_vgetfield;
00078 TIFFPrintMethod xtif_printdir;
00079 };
00080 typedef struct xtiff xtiff;
00081
00082
00083 #define PARENT(xt,pmember) ((xt)->xtif_ ## pmember)
00084 #define TIFFMEMBER(tf,pmember) ((tf)->tif_ ## pmember)
00085 #define XTIFFDIR(tif) ((xtiff *)TIFFMEMBER(tif,clientdir))
00086
00087
00088 #define XTIFF_INITIALIZED 0x80000000
00089
00090 #endif