OpendTect  6.6
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 ()
 
virtual int bytesOverheadPerTrace () const
 
virtual void cleanUp ()
 Prepare for new initialisation. More...
 
virtual bool close ()
 
bool commitSelections ()
 
ObjectSet< TargetComponentData > & componentInfo ()
 
const ObjectSet< TargetComponentData > & componentInfo () const
 
virtual ConncurConn ()
 
Pos::GeomID curGeomID () const
 
const LineKeycurLineKey () const
 
void enforceRegularWrite (bool yn)
 
void enforceSurvinfoWrite (bool yn)
 
uiString errMsg () const
 
virtual int estimatedNrTraces () const
 
void getComponentNames (BufferStringSet &) const
 
SeisTrcgetEmpty ()
 
SeisTrcgetFilled (const BinID &)
 
virtual bool getGeometryInfo (PosInfo::CubeData &) const
 
virtual bool goTo (const BinID &)
 
bool haveWarnings () const
 
bool initRead (Conn *, Seis::ReadMode rt=Seis::Prod)
 
bool initWrite (Conn *, const SeisTrc &)
 
virtual bool inlCrlSorted () const
 
int inpNrSamples () const
 
const SamplingData< float > & inpSD () const
 
const ObjectSet< ComponentData > & inputComponentData () const
 
bool isPS () const
 
virtual bool isUserSelectable (bool) const
 
int nrSelComps () const
 
int outNrSamples () const
 
const SamplingData< float > & outSD () const
 
SeisPacketInfopacketInfo ()
 
virtual bool read (SeisTrc &)
 
virtual bool readInfo (SeisTrcInfo &)
 
bool readTraceData (TraceData *td=nullptr)
 
int selComp (int nr=0) const
 
const Seis::SelDataselData () const
 
void setComponentNames (const BufferStringSet &)
 
void setCurGeomID (Pos::GeomID gid)
 
void setCurLineKey (const LineKey &lk)
 
void setIs2D (bool yn)
 
void setIsPS (bool yn)
 
void setSelData (const Seis::SelData *t)
 
virtual bool skip (int nrtrcs=1)
 
virtual bool supportsGoTo () const
 
const LinScalertraceScaler () const
 
virtual void usePar (const IOPar &)
 
const BufferStringSetwarnings () const
 
virtual bool write (const SeisTrc &)
 
- Public Member Functions inherited from Translator
 Translator (const char *nm, const char *usr_nm)
 
virtual ~Translator ()
 
virtual const char * connType () const
 
virtual IOObjcreateWriteIOObj (const IOObjContext &, const MultiID &) const
 
virtual const char * defExtension () const
 
const char * getDisplayName () const
 "username [group]" More...
 
virtual TranslatorgetNew () const =0
 
const TranslatorGroupgroup () const
 
virtual const char * iconName () const
 
virtual bool implExists (const IOObj *, bool forread) const
 
virtual bool implManagesObjects (const IOObj *) const
 
virtual bool implReadOnly (const IOObj *) const
 
virtual bool implRemove (const IOObj *) const
 
virtual bool implRename (const IOObj *, const char *, const CallBack *cb=0) const
 
virtual bool implSetReadOnly (const IOObj *, bool) const
 
void setGroup (TranslatorGroup *g)
 
uiString sSelObjectIsWrongType ()
 
const OD::StringtypeName () const
 
const OD::StringuserName () const
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (const NotifierAccess &, const CallBack &, bool onlyifnew=false) const
 
bool attachCB (const NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false) const
 
void detachAllNotifiers () const
 Call from the destructor of your inherited object. More...
 
void detachCB (const NotifierAccess &, const CallBack &) const
 
void detachCB (const NotifierAccess *notif, const CallBack &cb) const
 
virtual bool isCapsule () const
 
bool isNotifierAttached (const NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 
void stopReceivingNotifications () const
 

Static Public Member Functions

static bool getRanges (const IOObj &, TrcKeyZSampling &, const char *linekey=0)
 
static bool getRanges (const MultiID &, TrcKeyZSampling &, const char *linekey=0)
 
static bool is2D (const IOObj &, bool only_internal=false)
 
static bool isLineSet (const IOObj &)
 
static bool isPS (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 const TranslatorgetTemplateInstance (const char *displayname)
 
static uiString sBadConnection ()
 
static uiString sNoIoobjMsg ()
 
- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 

Protected Member Functions

void addComp (const DataCharacteristics &, const char *nm=0, int dtype=0)
 
virtual void addWarn (int, const char *)
 
virtual void blockDumped (int nrtrcs)
 
virtual bool commitSelections_ ()
 
virtual bool dumpBlock ()
 will call blockDumped() More...
 
virtual bool forRead () const
 
virtual bool initRead_ ()
 
virtual bool initWrite_ (const SeisTrc &)
 
void prepareComponents (SeisTrc &, int actualsz) const
 
virtual bool prepareWriteBlock (StepInterval< int > &, bool &)
 
virtual bool readData (TraceData *extbuf=0)
 
void setDataType (int icomp, int d)
 
virtual bool writeTrc_ (const SeisTrc &)
 

Protected Attributes

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

Private Member Functions

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

Private Attributes

int * inpfor_
 
int lastinlwritten_
 
int nrout_
 
int prevnr_
 

Friends

class SeisTrcReader
 

Additional Inherited Members

- Static Protected Member Functions inherited from Translator
static BufferString getAssociatedFileName (const char *fnm, const char *extension)
 
static BufferString getAssociatedFileName (const IOObj &, const char *extension)
 
static bool removeAssociatedFile (const char *fnm, const char *ext)
 
static bool renameAssociatedFile (const char *fnm, const char *ext, const char *newnm)
 
static bool renameLargeFile (const char *fnm, const char *newfnm, const CallBack *cb=0)
 
static bool setPermAssociatedFile (const char *fnm, const char *ext, bool setwritable)
 

Detailed Description

<>

Constructor & Destructor Documentation

◆ SeisTrcTranslator()

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

◆ ~SeisTrcTranslator()

virtual SeisTrcTranslator::~SeisTrcTranslator ( )
virtual

Member Function Documentation

◆ addComp()

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

◆ addWarn()

virtual void SeisTrcTranslator::addWarn ( int  ,
const char *   
)
protectedvirtual

Reimplemented in SEGYSeisTrcTranslator.

◆ blockDumped()

virtual void SeisTrcTranslator::blockDumped ( int  nrtrcs)
inlineprotectedvirtual

Reimplemented in CBVSSeisTrcTranslator.

◆ bytesOverheadPerTrace()

virtual int SeisTrcTranslator::bytesOverheadPerTrace ( ) const
inlinevirtual

◆ cleanUp()

virtual void SeisTrcTranslator::cleanUp ( )
virtual

Prepare for new initialisation.

Reimplemented in CBVSSeisTrcTranslator, BlocksSeisTrcTranslator, SEGYSeisTrcTranslator, and SEGYDirectSeisTrcTranslator.

◆ close()

virtual bool SeisTrcTranslator::close ( )
virtual

◆ commitSelections()

bool SeisTrcTranslator::commitSelections ( )

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

◆ commitSelections_()

virtual bool SeisTrcTranslator::commitSelections_ ( )
inlineprotectedvirtual

◆ componentInfo() [1/2]

ObjectSet<TargetComponentData>& SeisTrcTranslator::componentInfo ( )
inline

◆ componentInfo() [2/2]

const ObjectSet<TargetComponentData>& SeisTrcTranslator::componentInfo ( ) const
inline

◆ copyDataToTrace()

bool SeisTrcTranslator::copyDataToTrace ( SeisTrc )
private

◆ curConn()

virtual Conn* SeisTrcTranslator::curConn ( )
inlinevirtual

Reimplemented in SEGYDirectSeisTrcTranslator.

◆ curGeomID()

Pos::GeomID SeisTrcTranslator::curGeomID ( ) const
inline

◆ curLineKey()

const LineKey& SeisTrcTranslator::curLineKey ( ) const
inline

◆ dumpBlock()

virtual bool SeisTrcTranslator::dumpBlock ( )
protectedvirtual

will call blockDumped()

◆ enforceBounds()

void SeisTrcTranslator::enforceBounds ( )
private

◆ enforceRegularWrite()

void SeisTrcTranslator::enforceRegularWrite ( bool  yn)
inline

◆ enforceSurvinfoWrite()

void SeisTrcTranslator::enforceSurvinfoWrite ( bool  yn)
inline

◆ errMsg()

uiString SeisTrcTranslator::errMsg ( ) const
inline

◆ estimatedNrTraces()

virtual int SeisTrcTranslator::estimatedNrTraces ( ) const
inlinevirtual

◆ forRead()

virtual bool SeisTrcTranslator::forRead ( ) const
protectedvirtual

◆ getComponentNames()

void SeisTrcTranslator::getComponentNames ( BufferStringSet ) const

◆ getEmpty()

SeisTrc* SeisTrcTranslator::getEmpty ( )

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

◆ getFilled()

SeisTrc* SeisTrcTranslator::getFilled ( const BinID )

Returns a full sized trace with zeros.

◆ getGeometryInfo()

virtual bool SeisTrcTranslator::getGeometryInfo ( PosInfo::CubeData ) const
inlinevirtual

◆ getRanges() [1/2]

static bool SeisTrcTranslator::getRanges ( const IOObj ,
TrcKeyZSampling ,
const char *  linekey = 0 
)
static

◆ getRanges() [2/2]

static bool SeisTrcTranslator::getRanges ( const MultiID ,
TrcKeyZSampling ,
const char *  linekey = 0 
)
static

◆ goTo()

virtual bool SeisTrcTranslator::goTo ( const BinID )
inlinevirtual

◆ haveWarnings()

bool SeisTrcTranslator::haveWarnings ( ) const

◆ initConn()

bool SeisTrcTranslator::initConn ( Conn )
private

◆ initRead()

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.

◆ initRead_()

virtual bool SeisTrcTranslator::initRead_ ( )
inlineprotectedvirtual

◆ initWrite()

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

◆ initWrite_()

virtual bool SeisTrcTranslator::initWrite_ ( const SeisTrc )
inlineprotectedvirtual

◆ inlCrlSorted()

virtual bool SeisTrcTranslator::inlCrlSorted ( ) const
inlinevirtual

◆ inpNrSamples()

int SeisTrcTranslator::inpNrSamples ( ) const
inline

◆ inpSD()

const SamplingData<float>& SeisTrcTranslator::inpSD ( ) const
inline

◆ inputComponentData()

const ObjectSet<ComponentData>& SeisTrcTranslator::inputComponentData ( ) const
inline

◆ is2D()

static bool SeisTrcTranslator::is2D ( const IOObj ,
bool  only_internal = false 
)
static

◆ isLineSet()

static bool SeisTrcTranslator::isLineSet ( const IOObj )
static

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

◆ isPS() [1/2]

bool SeisTrcTranslator::isPS ( ) const
inline

◆ isPS() [2/2]

static bool SeisTrcTranslator::isPS ( const IOObj )
static

◆ isUserSelectable()

virtual bool SeisTrcTranslator::isUserSelectable ( bool  ) const
inlinevirtual

◆ nrSelComps()

int SeisTrcTranslator::nrSelComps ( ) const
inline

◆ outNrSamples()

int SeisTrcTranslator::outNrSamples ( ) const
inline

◆ outSD()

const SamplingData<float>& SeisTrcTranslator::outSD ( ) const
inline

◆ packetInfo()

SeisPacketInfo& SeisTrcTranslator::packetInfo ( )
inline

◆ prepareComponents()

void SeisTrcTranslator::prepareComponents ( SeisTrc ,
int  actualsz 
) const
protected

◆ prepareWriteBlock()

virtual bool SeisTrcTranslator::prepareWriteBlock ( StepInterval< int > &  ,
bool &   
)
inlineprotectedvirtual

◆ read()

virtual bool SeisTrcTranslator::read ( SeisTrc )
virtual

◆ readData()

virtual bool SeisTrcTranslator::readData ( TraceData extbuf = 0)
inlineprotectedvirtual

◆ readInfo()

virtual bool SeisTrcTranslator::readInfo ( SeisTrcInfo )
inlinevirtual

◆ readTraceData()

bool SeisTrcTranslator::readTraceData ( TraceData td = nullptr)
inline

◆ selComp()

int SeisTrcTranslator::selComp ( int  nr = 0) const
inline

◆ selData()

const Seis::SelData* SeisTrcTranslator::selData ( ) const
inline

◆ setComponentNames()

void SeisTrcTranslator::setComponentNames ( const BufferStringSet )

◆ setCurGeomID()

void SeisTrcTranslator::setCurGeomID ( Pos::GeomID  gid)
inline

◆ setCurLineKey()

void SeisTrcTranslator::setCurLineKey ( const LineKey lk)
inline

◆ setDataType()

void SeisTrcTranslator::setDataType ( int  icomp,
int  d 
)
inlineprotected

◆ setIs2D()

void SeisTrcTranslator::setIs2D ( bool  yn)
inline

◆ setIsPS()

void SeisTrcTranslator::setIsPS ( bool  yn)
inline

◆ setSelData()

void SeisTrcTranslator::setSelData ( const Seis::SelData t)
inline

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

◆ sKeyIs2D()

static const char* SeisTrcTranslator::sKeyIs2D ( )
static

◆ sKeyIsPS()

static const char* SeisTrcTranslator::sKeyIsPS ( )
static

◆ sKeyRegWrite()

static const char* SeisTrcTranslator::sKeyRegWrite ( )
static

◆ sKeySIWrite()

static const char* SeisTrcTranslator::sKeySIWrite ( )
static

◆ skip()

virtual bool SeisTrcTranslator::skip ( int  nrtrcs = 1)
inlinevirtual

◆ supportsGoTo()

virtual bool SeisTrcTranslator::supportsGoTo ( ) const
inlinevirtual

◆ traceScaler()

const LinScaler* SeisTrcTranslator::traceScaler ( ) const
inline

◆ usePar()

virtual void SeisTrcTranslator::usePar ( const IOPar )
virtual

◆ warnings()

const BufferStringSet& SeisTrcTranslator::warnings ( ) const
inline

◆ write()

virtual bool SeisTrcTranslator::write ( const SeisTrc )
virtual

Reimplemented in SEGYDirectSeisTrcTranslator.

◆ writeBlock()

bool SeisTrcTranslator::writeBlock ( )
private

◆ writeTrc_()

virtual bool SeisTrcTranslator::writeTrc_ ( const SeisTrc )
inlineprotectedvirtual

Friends And Related Function Documentation

◆ SeisTrcReader

friend class SeisTrcReader
friend

Member Data Documentation

◆ cds_

ObjectSet<ComponentData> SeisTrcTranslator::cds_
protected

◆ compnms_

BufferStringSet* SeisTrcTranslator::compnms_
protected

◆ conn_

Conn* SeisTrcTranslator::conn_
protected

◆ curlinekey_

LineKey SeisTrcTranslator::curlinekey_
protected

◆ curtrcscalebase_

const LinScaler* SeisTrcTranslator::curtrcscalebase_
protected

◆ datareaddone_

bool SeisTrcTranslator::datareaddone_
protected

◆ enforce_regular_write

bool SeisTrcTranslator::enforce_regular_write
protected

◆ enforce_survinfo_write

bool SeisTrcTranslator::enforce_survinfo_write
protected

◆ errmsg_

uiString SeisTrcTranslator::errmsg_
protected

◆ geomid_

Pos::GeomID SeisTrcTranslator::geomid_
protected

◆ headerdonenew_

bool SeisTrcTranslator::headerdonenew_
protected

◆ innrsamples_

int SeisTrcTranslator::innrsamples_
protected

◆ inpcds_

ComponentData** SeisTrcTranslator::inpcds_
protected

◆ inpfor_

int* SeisTrcTranslator::inpfor_
private

◆ insd_

SamplingData<float> SeisTrcTranslator::insd_
protected

◆ is_2d

bool SeisTrcTranslator::is_2d
protected

◆ is_prestack

bool SeisTrcTranslator::is_prestack
protected

◆ lastinlwritten_

int SeisTrcTranslator::lastinlwritten_
private

◆ nrout_

int SeisTrcTranslator::nrout_
private

◆ outcds_

TargetComponentData** SeisTrcTranslator::outcds_
protected

◆ outnrsamples_

int SeisTrcTranslator::outnrsamples_
protected

◆ outsd_

SamplingData<float> SeisTrcTranslator::outsd_
protected

◆ pinfo_

SeisPacketInfo& SeisTrcTranslator::pinfo_
protected

◆ prevnr_

int SeisTrcTranslator::prevnr_
private

◆ read_mode

Seis::ReadMode SeisTrcTranslator::read_mode
protected

◆ samprg_

Interval<int> SeisTrcTranslator::samprg_
protected

◆ seldata_

const Seis::SelData* SeisTrcTranslator::seldata_
protected

◆ storbuf_

TraceData* SeisTrcTranslator::storbuf_
protected

◆ tarcds_

ObjectSet<TargetComponentData> SeisTrcTranslator::tarcds_
protected

◆ trcblock_

SeisTrcBuf& SeisTrcTranslator::trcblock_
protected

◆ trcscalebase_

LinScaler* SeisTrcTranslator::trcscalebase_
protected

◆ warnings_

BufferStringSet& SeisTrcTranslator::warnings_
protected

◆ warnnrs_

TypeSet<int> SeisTrcTranslator::warnnrs_
protected

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