00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _SO_VRSEGY_READER_
00025 #define _SO_VRSEGY_READER_
00026
00027 #include <VolumeViz/readers/SoVolumeReader.h>
00028
00029 struct SoVRSegyTraceIdHeader;
00030
00044 class SoVRSegyTraceHeaderBytePosition
00045 {
00046 public:
00050 SoVRSegyTraceHeaderBytePosition();
00051
00055 enum TraceAttribute {
00056 SEGY_TRACL,
00057 SEGY_TRACR,
00058 SEGY_FLDR,
00059 SEGY_TRACF,
00060 SEGY_EP,
00061 SEGY_CDP,
00062 SEGY_CDPT,
00063 SEGY_TRID,
00064 SEGY_NVS,
00065 SEGY_NHS,
00066 SEGY_DUSE,
00067 SEGY_OFFSET,
00068 SEGY_GELEV,
00069 SEGY_SELEV,
00070 SEGY_SDEPTH,
00071 SEGY_GDEL,
00072 SEGY_SDEL,
00073 SEGY_SWDEP,
00074 SEGY_GWDEP,
00075 SEGY_SCALEL,
00076 SEGY_SCALCO,
00077 SEGY_SX,
00078 SEGY_SY,
00079 SEGY_GX,
00080 SEGY_GY,
00081 SEGY_COUNIT,
00082 SEGY_WEVEL,
00083 SEGY_SWEVEL,
00084 SEGY_SUT,
00085 SEGY_GUT,
00086 SEGY_SSTAT,
00087 SEGY_GSTAT,
00088 SEGY_TSTAT,
00089 SEGY_LAGA,
00090 SEGY_LAGB,
00091 SEGY_DELRT,
00092 SEGY_MUTS,
00093 SEGY_MUTE,
00094 SEGY_NS,
00095 SEGY_DT,
00096 SEGY_GAIN,
00097 SEGY_IGC,
00098 SEGY_IGI,
00099 SEGY_CORR,
00100 SEGY_SFS,
00101 SEGY_SFE,
00102 SEGY_SLEN,
00103 SEGY_STYP,
00104 SEGY_STAS,
00105 SEGY_STAE,
00106 SEGY_TATYP,
00107 SEGY_AFILF,
00108 SEGY_AFILS,
00109 SEGY_NOFILF,
00110 SEGY_NOFILS,
00111 SEGY_LCF,
00112 SEGY_HCF,
00113 SEGY_LCS,
00114 SEGY_HCS,
00115 SEGY_YEAR,
00116 SEGY_DAY,
00117 SEGY_HOUR,
00118 SEGY_MINUTE,
00119 SEGY_SEC,
00120 SEGY_TIMBAS,
00121 SEGY_TRWF,
00122 SEGY_GRNORS,
00123 SEGY_GRNOFR,
00124 SEGY_GRNLOF,
00125 SEGY_GAPS,
00126 SEGY_OTRAV,
00127 SEGY_CDPX,
00128 SEGY_CDPY,
00129 SEGY_INLINENUMBER,
00130 SEGY_CROSSLINENUMBER,
00131 SEGY_SHOTPOINTNUMBER,
00132 SEGY_SHOTPOINTSCALE,
00133 SEGY_TVMU,
00134 SEGY_TRANSDUCTIONCONSTANTM,
00135 SEGY_TRANSDUCTIONCONSTANTP,
00136 SEGY_TRANSDUCTIONUNITS,
00137 SEGY_DTID,
00138 SEGY_TSCALE,
00139
00140 SEGY_NUM_FIELDS,
00141 SEGY_CROSSLINE = SEGY_CDP,
00142 SEGY_INLINE = SEGY_TRACR
00143 };
00144
00148 enum TraceByteFormat {
00150 SEGY_INTEGER8_FORMAT,
00152 SEGY_INTEGER16_FORMAT,
00154 SEGY_INTEGER32_FORMAT,
00156 SEGY_IBM_FLOAT_FORMAT,
00158 SEGY_IEEE_FLOAT_FORMAT
00159 };
00160
00167 void setBytePosition( TraceAttribute attr, uint8_t position );
00168 uint8_t getBytePosition( TraceAttribute attr ) const;
00169
00174 uint8_t getByteLength( TraceAttribute attr ) const;
00175
00183 void setByteFormat( TraceAttribute attr, TraceByteFormat format );
00184 TraceByteFormat getByteFormat( TraceAttribute attr ) const;
00185
00191 int getFieldValue( TraceAttribute attr, const SoVRSegyTraceIdHeader &trHdr ) const;
00192
00193 private:
00194 void resetObject();
00195
00196 private:
00197 uint8_t m_BytePos[SEGY_NUM_FIELDS];
00198 TraceByteFormat m_ByteFmt[SEGY_NUM_FIELDS];
00199 };
00200
00214 struct SoVRSegyFileHeader
00215 {
00216
00217 public:
00219 int jobid;
00221 int lino;
00223 int reno;
00225 short ntrpr;
00227 short nart;
00229 unsigned short hdt;
00231 unsigned short dto;
00233 unsigned short hns;
00235 unsigned short nso;
00246 short format;
00248 short fold;
00260 short tsort;
00265 short vscode;
00267 short hsfs;
00269 short hsfe;
00271 short hslen;
00277 short hstyp;
00279 short schn;
00282 short hstas;
00285 short hstae;
00290 short htatyp;
00294 short hcorr;
00299 short bgrcv;
00305 short rcvm;
00309 short mfeet;
00315 short polyt;
00331 short vpol;
00333 short hunass1[120];
00335 unsigned short formatRevisionNumber;
00342 short fixedLengthTraceFlag;
00345 short numTextHeaderExt;
00347 short hunass2[47];
00348 };
00349
00350
00364 struct SoVRSegyTraceIdHeader
00365 {
00366
00367 public:
00369 int tracl;
00371 int tracr;
00373 int fldr;
00375 int tracf;
00377 int ep;
00379 int cdp;
00381 int cdpt;
00441 short trid;
00443 short nvs;
00445 short nhs;
00449 short duse;
00452 int offset;
00454 int gelev;
00456 int selev;
00458 int sdepth;
00460 int gdel;
00462 int sdel;
00464 int swdep;
00466 int gwdep;
00469 short scalel;
00472 short scalco;
00474 int sx;
00476 int sy;
00478 int gx;
00480 int gy;
00489 short counit;
00491 short wevel;
00493 short swevel;
00495 short sut;
00497 short gut;
00499 short sstat;
00501 short gstat;
00503 short tstat;
00511 short laga;
00515 short lagb;
00521 short delrt;
00523 short muts;
00525 short mute;
00527 unsigned short ns;
00529 unsigned short dt;
00535 short gain;
00537 short igc;
00539 short igi;
00543 short corr;
00545 short sfs;
00547 short sfe;
00549 short slen;
00554 short styp;
00556 short stas;
00558 short stae;
00560 short tatyp;
00562 short afilf;
00564 short afils;
00566 short nofilf;
00568 short nofils;
00570 short lcf;
00572 short hcf;
00574 short lcs;
00576 short hcs;
00578 short year;
00580 short day;
00582 short hour;
00584 short minute;
00586 short sec;
00592 short timbas;
00594 short trwf;
00596 short grnors;
00598 short grnofr;
00600 short grnlof;
00602 short gaps;
00606 short otrav;
00608 int cdpX;
00610 int cdpY;
00612 int inlineNumber;
00614 int crosslineNumber;
00616 int shotPointNumber;
00618 short shotPointScale;
00630 short tvmu;
00632 int transductionConstantM;
00634 short transductionConstantP;
00646 short transductionUnits;
00648 short dtid;
00651 short tscale;
00653 short unass[12];
00654 };
00655
00656 #endif // _SO_VRSEGY_READER_
00657
00658
00659