OpendTect-6_4  6.4
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends | List of all members
SeisTrcTranslator Class Reference
Inheritance diagram for SeisTrcTranslator:
[legend]

Classes

class  ComponentData
 Information for one component. More...
 
class  TargetComponentData
 ComponentData as it should be when the Translator puts it away. More...
 

Public Member Functions

 SeisTrcTranslator (const char *, const char *)
 
virtual ~SeisTrcTranslator ()
 
bool initRead (Conn *, Seis::ReadMode rt=Seis::Prod)
 
bool initWrite (Conn *, const SeisTrc &)
 
virtual ConncurConn ()
 
SeisPacketInfopacketInfo ()
 
const Seis::SelDataselData () const
 
ObjectSet< TargetComponentData > & componentInfo ()
 
const ObjectSet< TargetComponentData > & componentInfo () const
 
const ObjectSet< ComponentData > & inputComponentData () const
 
const SamplingData< float > & inpSD () const
 
int inpNrSamples () const
 
const SamplingData< float > & outSD () const
 
int outNrSamples () const
 
void setSelData (const Seis::SelData *t)
 
bool commitSelections ()
 
virtual bool readInfo (SeisTrcInfo &)
 
virtual bool read (SeisTrc &)
 
virtual bool skip (int nrtrcs=1)
 
virtual bool write (const SeisTrc &)
 
virtual bool close ()
 
uiString errMsg () const
 
virtual bool inlCrlSorted () const
 
virtual int bytesOverheadPerTrace () const
 
virtual void usePar (const IOPar &)
 
int selComp (int nr=0) const
 
int nrSelComps () const
 
SeisTrcgetEmpty ()
 
SeisTrcgetFilled (const BinID &)
 
virtual bool supportsGoTo () const
 
virtual bool goTo (const BinID &)
 
virtual void cleanUp ()
 Prepare for new initialisation. More...
 
virtual bool getGeometryInfo (PosInfo::CubeData &) const
 
bool isPS () const
 
void enforceRegularWrite (bool yn)
 
void enforceSurvinfoWrite (bool yn)
 
const LineKeycurLineKey () const
 
void setCurLineKey (const LineKey &lk)
 
Pos::GeomID curGeomID () const
 
void setCurGeomID (Pos::GeomID gid)
 
virtual bool isUserSelectable (bool) const
 
virtual int estimatedNrTraces () const
 
void setComponentNames (const BufferStringSet &)
 
void getComponentNames (BufferStringSet &) const
 
bool haveWarnings () const
 
const BufferStringSetwarnings () const
 
void setIs2D (bool yn)
 
void setIsPS (bool yn)
 
- Public Member Functions inherited from Translator
uiString sSelObjectIsWrongType ()
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (NotifierAccess &, const CallBack &, bool onlyifnew=false)
 
bool attachCB (NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false)
 
void detachCB (NotifierAccess &, const CallBack &)
 
void detachCB (NotifierAccess *notif, const CallBack &cb)
 
bool isNotifierAttached (NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 

Static Public Member Functions

static bool getRanges (const MultiID &, TrcKeyZSampling &, const char *linekey=0)
 
static bool getRanges (const IOObj &, TrcKeyZSampling &, const char *linekey=0)
 
static bool is2D (const IOObj &, bool only_internal=false)
 
static bool isPS (const IOObj &)
 
static bool isLineSet (const IOObj &)
 
static const char * sKeyIs2D ()
 
static const char * sKeyIsPS ()
 
static const char * sKeyRegWrite ()
 
static const char * sKeySIWrite ()
 
- Static Public Member Functions inherited from Translator
static uiString sNoIoobjMsg ()
 
static uiString sBadConnection ()
 

Protected Member Functions

virtual bool forRead () const
 
void addComp (const DataCharacteristics &, const char *nm=0, int dtype=0)
 
void setDataType (int icomp, int d)
 
virtual bool initRead_ ()
 
virtual bool initWrite_ (const SeisTrc &)
 
virtual bool commitSelections_ ()
 
virtual bool readData (TraceData *extbuf=0)
 
virtual bool prepareWriteBlock (StepInterval< int > &, bool &)
 
virtual bool dumpBlock ()
 will call blockDumped() More...
 
virtual void blockDumped (int nrtrcs)
 
virtual bool writeTrc_ (const SeisTrc &)
 
void prepareComponents (SeisTrc &, int actualsz) const
 
virtual void addWarn (int, const char *)
 
- Protected Member Functions inherited from CallBacker
void detachAllNotifiers ()
 Call from the destructor of your inherited object. More...
 

Protected Attributes

Connconn_
 
SeisPacketInfopinfo_
 
uiString errmsg_
 
BufferStringSetcompnms_
 
Seis::ReadMode read_mode
 
bool is_2d
 
bool is_prestack
 
bool enforce_regular_write
 
bool enforce_survinfo_write
 
SamplingData< float > insd_
 
int innrsamples_
 
ObjectSet< ComponentDatacds_
 
ObjectSet< TargetComponentDatatarcds_
 
const Seis::SelDataseldata_
 
SamplingData< float > outsd_
 
int outnrsamples_
 
Interval< int > samprg_
 
Pos::GeomID geomid_
 
LineKey curlinekey_
 
bool headerdonenew_
 
bool datareaddone_
 
TraceDatastorbuf_
 
LinScalertrcscalebase_
 
const LinScalercurtrcscalebase_
 
SeisTrcBuftrcblock_
 
ComponentData ** inpcds_
 
TargetComponentData ** outcds_
 
TypeSet< int > warnnrs_
 
BufferStringSetwarnings_
 
- Protected Attributes inherited from Translator
BufferString typname_
 
BufferString usrname_
 
TranslatorGroupgroup_
 

Private Member Functions

 mODTextTranslationClass (SeisTrcTranslator)
 
bool initConn (Conn *)
 
void enforceBounds ()
 
bool writeBlock ()
 
bool copyDataToTrace (SeisTrc &)
 

Private Attributes

int * inpfor_
 
int nrout_
 
int prevnr_
 
int lastinlwritten_
 

Friends

class SeisTrcReader
 

Detailed Description

Constructor & Destructor Documentation

SeisTrcTranslator::SeisTrcTranslator ( const char *  ,
const char *   
)
virtual SeisTrcTranslator::~SeisTrcTranslator ( )
virtual

Member Function Documentation

void SeisTrcTranslator::addComp ( const DataCharacteristics ,
const char *  nm = 0,
int  dtype = 0 
)
protected
virtual void SeisTrcTranslator::addWarn ( int  ,
const char *   
)
protectedvirtual

Reimplemented in SEGYSeisTrcTranslator.

virtual void SeisTrcTranslator::blockDumped ( int  nrtrcs)
inlineprotectedvirtual

Reimplemented in CBVSSeisTrcTranslator.

virtual int SeisTrcTranslator::bytesOverheadPerTrace ( ) const
inlinevirtual
virtual void SeisTrcTranslator::cleanUp ( )
virtual

Prepare for new initialisation.

Reimplemented in SEGYDirectSeisTrcTranslator, CBVSSeisTrcTranslator, SEGYSeisTrcTranslator, and BlocksSeisTrcTranslator.

virtual bool SeisTrcTranslator::close ( )
virtual
bool SeisTrcTranslator::commitSelections ( )

If not called, will be called by Translator. For write, this will put tape header (if any)

virtual bool SeisTrcTranslator::commitSelections_ ( )
inlineprotectedvirtual
ObjectSet<TargetComponentData>& SeisTrcTranslator::componentInfo ( )
inline
const ObjectSet<TargetComponentData>& SeisTrcTranslator::componentInfo ( ) const
inline
bool SeisTrcTranslator::copyDataToTrace ( SeisTrc )
private
virtual Conn* SeisTrcTranslator::curConn ( )
inlinevirtual

Reimplemented in SEGYDirectSeisTrcTranslator.

Pos::GeomID SeisTrcTranslator::curGeomID ( ) const
inline
const LineKey& SeisTrcTranslator::curLineKey ( ) const
inline
virtual bool SeisTrcTranslator::dumpBlock ( )
protectedvirtual

will call blockDumped()

void SeisTrcTranslator::enforceBounds ( )
private
void SeisTrcTranslator::enforceRegularWrite ( bool  yn)
inline
void SeisTrcTranslator::enforceSurvinfoWrite ( bool  yn)
inline
uiString SeisTrcTranslator::errMsg ( ) const
inline
virtual int SeisTrcTranslator::estimatedNrTraces ( ) const
inlinevirtual
virtual bool SeisTrcTranslator::forRead ( ) const
protectedvirtual
void SeisTrcTranslator::getComponentNames ( BufferStringSet ) const
SeisTrc* SeisTrcTranslator::getEmpty ( )

Returns an empty trace with the target data characteristics for component 0

SeisTrc* SeisTrcTranslator::getFilled ( const BinID )

Returns a full sized trace with zeros.

virtual bool SeisTrcTranslator::getGeometryInfo ( PosInfo::CubeData ) const
inlinevirtual
static bool SeisTrcTranslator::getRanges ( const MultiID ,
TrcKeyZSampling ,
const char *  linekey = 0 
)
static
static bool SeisTrcTranslator::getRanges ( const IOObj ,
TrcKeyZSampling ,
const char *  linekey = 0 
)
static
virtual bool SeisTrcTranslator::goTo ( const BinID )
inlinevirtual
bool SeisTrcTranslator::haveWarnings ( ) const
bool SeisTrcTranslator::initConn ( Conn )
private
bool SeisTrcTranslator::initRead ( Conn ,
Seis::ReadMode  rt = Seis::Prod 
)

Init functions must be called, because a Conn object must always be available Conn* ptr will become mine, and it may be deleted immediately!After call, component and packet info will be available. Some STT's require a valid IOObj in Conn.

virtual bool SeisTrcTranslator::initRead_ ( )
inlineprotectedvirtual
bool SeisTrcTranslator::initWrite ( Conn ,
const SeisTrc  
)

Conn* ptr will become mine, and it may be deleted immediately! After call, default component and packet info will be generated according to the example trace. Some STT's require a valid IOObj in Conn

virtual bool SeisTrcTranslator::initWrite_ ( const SeisTrc )
inlineprotectedvirtual
virtual bool SeisTrcTranslator::inlCrlSorted ( ) const
inlinevirtual
int SeisTrcTranslator::inpNrSamples ( ) const
inline
const SamplingData<float>& SeisTrcTranslator::inpSD ( ) const
inline
const ObjectSet<ComponentData>& SeisTrcTranslator::inputComponentData ( ) const
inline
static bool SeisTrcTranslator::is2D ( const IOObj ,
bool  only_internal = false 
)
static
static bool SeisTrcTranslator::isLineSet ( const IOObj )
static

Should only be used to filter out old LineSet entries in .omf

static bool SeisTrcTranslator::isPS ( const IOObj )
static
bool SeisTrcTranslator::isPS ( ) const
inline
virtual bool SeisTrcTranslator::isUserSelectable ( bool  ) const
inlinevirtual
SeisTrcTranslator::mODTextTranslationClass ( SeisTrcTranslator  )
private
int SeisTrcTranslator::nrSelComps ( ) const
inline
int SeisTrcTranslator::outNrSamples ( ) const
inline
const SamplingData<float>& SeisTrcTranslator::outSD ( ) const
inline
SeisPacketInfo& SeisTrcTranslator::packetInfo ( )
inline
void SeisTrcTranslator::prepareComponents ( SeisTrc ,
int  actualsz 
) const
protected
virtual bool SeisTrcTranslator::prepareWriteBlock ( StepInterval< int > &  ,
bool &   
)
inlineprotectedvirtual
virtual bool SeisTrcTranslator::read ( SeisTrc )
virtual
virtual bool SeisTrcTranslator::readData ( TraceData extbuf = 0)
inlineprotectedvirtual
virtual bool SeisTrcTranslator::readInfo ( SeisTrcInfo )
inlinevirtual
int SeisTrcTranslator::selComp ( int  nr = 0) const
inline
const Seis::SelData* SeisTrcTranslator::selData ( ) const
inline
void SeisTrcTranslator::setComponentNames ( const BufferStringSet )
void SeisTrcTranslator::setCurGeomID ( Pos::GeomID  gid)
inline
void SeisTrcTranslator::setCurLineKey ( const LineKey lk)
inline
void SeisTrcTranslator::setDataType ( int  icomp,
int  d 
)
inlineprotected
void SeisTrcTranslator::setIs2D ( bool  yn)
inline
void SeisTrcTranslator::setIsPS ( bool  yn)
inline
void SeisTrcTranslator::setSelData ( const Seis::SelData t)
inline

This Seis::SelData is seen as a hint ...

static const char* SeisTrcTranslator::sKeyIs2D ( )
static
static const char* SeisTrcTranslator::sKeyIsPS ( )
static
static const char* SeisTrcTranslator::sKeyRegWrite ( )
static
static const char* SeisTrcTranslator::sKeySIWrite ( )
static
virtual bool SeisTrcTranslator::skip ( int  nrtrcs = 1)
inlinevirtual
virtual bool SeisTrcTranslator::supportsGoTo ( ) const
inlinevirtual
virtual void SeisTrcTranslator::usePar ( const IOPar )
virtual
const BufferStringSet& SeisTrcTranslator::warnings ( ) const
inline
virtual bool SeisTrcTranslator::write ( const SeisTrc )
virtual

Reimplemented in SEGYDirectSeisTrcTranslator.

bool SeisTrcTranslator::writeBlock ( )
private
virtual bool SeisTrcTranslator::writeTrc_ ( const SeisTrc )
inlineprotectedvirtual

Friends And Related Function Documentation

friend class SeisTrcReader
friend

Member Data Documentation

ObjectSet<ComponentData> SeisTrcTranslator::cds_
protected
BufferStringSet* SeisTrcTranslator::compnms_
protected
Conn* SeisTrcTranslator::conn_
protected
LineKey SeisTrcTranslator::curlinekey_
protected
const LinScaler* SeisTrcTranslator::curtrcscalebase_
protected
bool SeisTrcTranslator::datareaddone_
protected
bool SeisTrcTranslator::enforce_regular_write
protected
bool SeisTrcTranslator::enforce_survinfo_write
protected
uiString SeisTrcTranslator::errmsg_
protected
Pos::GeomID SeisTrcTranslator::geomid_
protected
bool SeisTrcTranslator::headerdonenew_
protected
int SeisTrcTranslator::innrsamples_
protected
ComponentData** SeisTrcTranslator::inpcds_
protected
int* SeisTrcTranslator::inpfor_
private
SamplingData<float> SeisTrcTranslator::insd_
protected
bool SeisTrcTranslator::is_2d
protected
bool SeisTrcTranslator::is_prestack
protected
int SeisTrcTranslator::lastinlwritten_
private
int SeisTrcTranslator::nrout_
private
TargetComponentData** SeisTrcTranslator::outcds_
protected
int SeisTrcTranslator::outnrsamples_
protected
SamplingData<float> SeisTrcTranslator::outsd_
protected
SeisPacketInfo& SeisTrcTranslator::pinfo_
protected
int SeisTrcTranslator::prevnr_
private
Seis::ReadMode SeisTrcTranslator::read_mode
protected
Interval<int> SeisTrcTranslator::samprg_
protected
const Seis::SelData* SeisTrcTranslator::seldata_
protected
TraceData* SeisTrcTranslator::storbuf_
protected
ObjectSet<TargetComponentData> SeisTrcTranslator::tarcds_
protected
SeisTrcBuf& SeisTrcTranslator::trcblock_
protected
LinScaler* SeisTrcTranslator::trcscalebase_
protected
BufferStringSet& SeisTrcTranslator::warnings_
protected
TypeSet<int> SeisTrcTranslator::warnnrs_
protected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019