OpendTect  6.6
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
EM::dgbSurfaceWriter Class Reference

Surface Writer. More...

Inheritance diagram for EM::dgbSurfaceWriter:
[legend]

Public Member Functions

 dgbSurfaceWriter (const char *fulluserexpr, const char *filetype, const EM::Surface &surface, bool binary)
 
 dgbSurfaceWriter (const IOObj *ioobj, const char *filetype, const EM::Surface &surface, bool binary)
 
 ~dgbSurfaceWriter ()
 
const char * auxDataInfo (int) const
 
const char * auxDataName (int) const
 
const StepInterval< int > & colInterval () const
 
virtual int nextStep ()
 
int nrAuxVals () const
 
virtual od_int64 nrDone () const
 
int nrSections () const
 
IOParpars ()
 
const StepInterval< int > & rowInterval () const
 
EM::SectionID sectionID (int) const
 
const char * sectionName (int) const
 
void selAuxData (const TypeSet< int > &)
 
void selSections (const TypeSet< EM::SectionID > &, bool add=false)
 
void setColInterval (const StepInterval< int > &)
 
void setRowInterval (const StepInterval< int > &)
 
void setShift (float)
 Shift is added to z values before writing. More...
 
void setWriteOnlyZ (bool yn)
 
virtual od_int64 totalNr () const
 
virtual uiString uiMessage () const
 will be message() again in 7.x More...
 
virtual uiString uiNrDoneText () const
 will be nrDoneText() in 7.x More...
 
bool writeOnlyZ () const
 
- Public Member Functions inherited from ExecutorGroup
 ExecutorGroup (const char *nm, bool parallel=false, bool ownsexecs=true)
 
virtual ~ExecutorGroup ()
 
virtual void add (Executor *)
 
ExecutorgetExecutor (int idx)
 
int nrExecutors ()
 
void setNrDoneText (const uiString &txt)
 If set, will use this and the counted nrdone. More...
 
- Public Member Functions inherited from Executor
 Executor (const char *nm)
 
virtual ~Executor ()
 
virtual int doStep ()
 
virtual bool execute ()
 
bool go (od_ostream &s, bool isfirst=true, bool islast=true, int delaybtwnstepsinms=0)
 
bool go (od_ostream *s=0, bool isfirst=true, bool islast=true, int delaybtwnstepsinms=0)
 
- Public Member Functions inherited from SequentialTask
 SequentialTask (const char *nm=nullptr)
 
virtual ~SequentialTask ()
 
bool execute ()
 
ProgressMeterprogressMeter ()
 
const ProgressMeterprogressMeter () const
 
void setProgressMeter (ProgressMeter *)
 Must be called before execute() More...
 
- Public Member Functions inherited from Task
virtual ~Task ()
 
virtual void controlWork (Control)
 
virtual void enableWorkControl (bool=true)
 Must be called before execute() More...
 
virtual uiRetVal errorWithDetails () const
 
virtual Control getState () const
 
bool workControlEnabled () const
 
- Public Member Functions inherited from NamedCallBacker
 NamedCallBacker (const char *nm=0)
 
 NamedCallBacker (const NamedCallBacker &)
 
virtual Notifier< NamedCallBacker > & objectToBeDeleted () const
 
bool operator== (const NamedCallBacker &oth) const
 
bool operator== (const NamedObject &oth) 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
 
- Public Member Functions inherited from NamedObject
 NamedObject (const char *nm=nullptr)
 
 NamedObject (const NamedObject &oth)
 
virtual ~NamedObject ()
 
virtual BufferString getName () const
 
bool getNameFromPar (const IOPar &)
 
virtual const name_typename () const
 
NamedObjectoperator= (const NamedObject &)
 
bool operator== (const NamedObject &oth) const
 
virtual void setName (const char *nm)
 
- Public Member Functions inherited from ObjectWithName
virtual ~ObjectWithName ()
 
bool hasName (const char *nm) const
 
bool hasName (const name_type &nm) const
 
void putNameInPar (IOPar &) const
 

Protected Member Functions

void finishWriting ()
 
void init (const char *fulluserexp)
 
bool writeDouble (od_ostream &, double, const char *) const
 
bool writeInt16 (od_ostream &, unsigned short, const char *) const
 
bool writeInt32 (od_ostream &, od_int32, const char *) const
 
bool writeInt64 (od_ostream &, od_int64, const char *) const
 
bool writeNewSection (od_ostream &)
 
bool writeRow (od_ostream &)
 
- Protected Member Functions inherited from ExecutorGroup
void findNextSumStop ()
 
virtual bool goToNextExecutor ()
 
- Protected Member Functions inherited from Executor
virtual bool goImpl (od_ostream *, bool, bool, int)
 
- Protected Member Functions inherited from Task
 Task (const char *nm=nullptr)
 
virtual bool shouldContinue ()
 
- Protected Member Functions inherited from NamedCallBacker
void sendDelNotif () const
 

Static Protected Member Functions

static const char * sEOL ()
 
static const char * sEOLTab ()
 
static const char * sTab ()
 

Protected Attributes

TypeSet< int > auxdatasel_
 
bool binary_
 
StepInterval< int > colrange_
 
StreamConnconn_
 
BufferString dbinfo_
 
BufferString filetype_
 
int firstrow_
 
BufferString fulluserexpr_
 
const EM::RowColSurfaceGeometrygeometry_
 
uiString msg_
 
int nrdone_
 
int nrrows_
 
od_int64 nrsectionsoffsetoffset_
 
MultiID objectmid_
 
int oldsectionindex_
 
IOParpar_
 
int rowindex_
 
TypeSet< od_int64 > rowoffsettable_
 
od_int64 rowoffsettableoffset_
 
StepInterval< int > rowrange_
 
int sectionindex_
 
TypeSet< od_int64 > sectionoffsets_
 
TypeSet< EM::SectionIDsectionsel_
 
float shift_
 
const EM::Surfacesurface_
 
StepInterval< int > * writecolrange_
 
bool writeonlyz_
 
StepInterval< int > * writerowrange_
 
bool writingfinished_
 
Interval< int > writtencolrange_
 
Interval< int > writtenrowrange_
 
Interval< float > zrange_
 
- Protected Attributes inherited from ExecutorGroup
int currentexec_
 
TypeSet< int > executorres_
 
ObjectSet< Executor > & executors_
 
uiString nrdonetext_
 
bool ownsexecs_
 
const bool parallel_
 
int sumstart_
 
int sumstop_
 
- Protected Attributes inherited from SequentialTask
int lastupdate_
 
ProgressMeterprogressmeter_
 
- Protected Attributes inherited from Task
Control control_
 
Threads::ConditionVarworkcontrolcondvar_
 
- Protected Attributes inherited from NamedCallBacker
Threads::Atomic< bool > delalreadytriggered_
 
Notifier< NamedCallBackerdelnotif_
 
- Protected Attributes inherited from NamedObject
BufferString name_
 

Additional Inherited Members

- Public Types inherited from Task
enum  Control { Run , Pause , Stop }
 
- Public Types inherited from ObjectWithName
typedef OD::String name_type
 
- Static Public Member Functions inherited from SequentialTask
static int ErrorOccurred ()
 
static int Finished ()
 
static int MoreToDo ()
 
static int WarningAvailable ()
 
- Static Public Member Functions inherited from Task
static uiString stdNrDoneText ()
 
static uiString uiStdNrDoneText ()
 
- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 
- Public Attributes inherited from Executor
Notifier< Executorpoststep
 Only when MoreToDo will be returned. More...
 
Notifier< Executorprestep
 

Detailed Description

Surface Writer.

  1. Construct (no changes are made to filesystem)
  2. Select what you want to write
  3. Do NextStep

    <>

Constructor & Destructor Documentation

◆ dgbSurfaceWriter() [1/2]

EM::dgbSurfaceWriter::dgbSurfaceWriter ( const IOObj ioobj,
const char *  filetype,
const EM::Surface surface,
bool  binary 
)

Sets up object, but does not touch file (that's done in nextStep() )

Parameters
ioobjThe IOObj with info about where to write data.
filetypeThe filetype that should be in the file header.
surfaceThe surface that should be written with data.
binaryIf true, writes in binary, else in ascii

◆ dgbSurfaceWriter() [2/2]

EM::dgbSurfaceWriter::dgbSurfaceWriter ( const char *  fulluserexpr,
const char *  filetype,
const EM::Surface surface,
bool  binary 
)

◆ ~dgbSurfaceWriter()

EM::dgbSurfaceWriter::~dgbSurfaceWriter ( )

Closes the stream

Member Function Documentation

◆ auxDataInfo()

const char* EM::dgbSurfaceWriter::auxDataInfo ( int  ) const

◆ auxDataName()

const char* EM::dgbSurfaceWriter::auxDataName ( int  ) const

◆ colInterval()

const StepInterval<int>& EM::dgbSurfaceWriter::colInterval ( ) const

◆ finishWriting()

void EM::dgbSurfaceWriter::finishWriting ( )
protected

◆ init()

void EM::dgbSurfaceWriter::init ( const char *  fulluserexp)
protected

◆ nextStep()

virtual int EM::dgbSurfaceWriter::nextStep ( )
virtual
Return values
MoreToDo()Not finished. Call me again.
Finished()Nothing more to do.
ErrorOccurred()Something went wrong.
Note
if function returns a value greater than cMoreToDo(), it should be interpreted as cMoreToDo().

Reimplemented from ExecutorGroup.

◆ nrAuxVals()

int EM::dgbSurfaceWriter::nrAuxVals ( ) const

◆ nrDone()

virtual od_int64 EM::dgbSurfaceWriter::nrDone ( ) const
virtual
Note
nrDone is only used for displaying progress and will be compared to totalNr to show user how large part of the task that is finished.

Reimplemented from ExecutorGroup.

◆ nrSections()

int EM::dgbSurfaceWriter::nrSections ( ) const

◆ pars()

IOPar* EM::dgbSurfaceWriter::pars ( )

◆ rowInterval()

const StepInterval<int>& EM::dgbSurfaceWriter::rowInterval ( ) const

◆ sectionID()

EM::SectionID EM::dgbSurfaceWriter::sectionID ( int  ) const

◆ sectionName()

const char* EM::dgbSurfaceWriter::sectionName ( int  ) const

◆ selAuxData()

void EM::dgbSurfaceWriter::selAuxData ( const TypeSet< int > &  )

The specified data will be written. If this function is not called, all avaliable auxdata will be written.

◆ selSections()

void EM::dgbSurfaceWriter::selSections ( const TypeSet< EM::SectionID > &  ,
bool  add = false 
)

The given sectionIDs will be written. If this function is not called, all avaliable sections will be written.

◆ sEOL()

static const char* EM::dgbSurfaceWriter::sEOL ( )
inlinestaticprotected

◆ sEOLTab()

static const char* EM::dgbSurfaceWriter::sEOLTab ( )
inlinestaticprotected

◆ setColInterval()

void EM::dgbSurfaceWriter::setColInterval ( const StepInterval< int > &  )

◆ setRowInterval()

void EM::dgbSurfaceWriter::setRowInterval ( const StepInterval< int > &  )

◆ setShift()

void EM::dgbSurfaceWriter::setShift ( float  )

Shift is added to z values before writing.

◆ setWriteOnlyZ()

void EM::dgbSurfaceWriter::setWriteOnlyZ ( bool  yn)

◆ sTab()

static const char* EM::dgbSurfaceWriter::sTab ( )
inlinestaticprotected

◆ totalNr()

virtual od_int64 EM::dgbSurfaceWriter::totalNr ( ) const
virtual

Reimplemented from ExecutorGroup.

◆ uiMessage()

virtual uiString EM::dgbSurfaceWriter::uiMessage ( ) const
virtual

will be message() again in 7.x

Reimplemented from ExecutorGroup.

◆ uiNrDoneText()

virtual uiString EM::dgbSurfaceWriter::uiNrDoneText ( ) const
virtual

will be nrDoneText() in 7.x

Reimplemented from ExecutorGroup.

◆ writeDouble()

bool EM::dgbSurfaceWriter::writeDouble ( od_ostream ,
double  ,
const char *   
) const
protected

◆ writeInt16()

bool EM::dgbSurfaceWriter::writeInt16 ( od_ostream ,
unsigned short  ,
const char *   
) const
protected

◆ writeInt32()

bool EM::dgbSurfaceWriter::writeInt32 ( od_ostream ,
od_int32  ,
const char *   
) const
protected

◆ writeInt64()

bool EM::dgbSurfaceWriter::writeInt64 ( od_ostream ,
od_int64  ,
const char *   
) const
protected

◆ writeNewSection()

bool EM::dgbSurfaceWriter::writeNewSection ( od_ostream )
protected

◆ writeOnlyZ()

bool EM::dgbSurfaceWriter::writeOnlyZ ( ) const

◆ writeRow()

bool EM::dgbSurfaceWriter::writeRow ( od_ostream )
protected

Member Data Documentation

◆ auxdatasel_

TypeSet<int> EM::dgbSurfaceWriter::auxdatasel_
protected

◆ binary_

bool EM::dgbSurfaceWriter::binary_
protected

◆ colrange_

StepInterval<int> EM::dgbSurfaceWriter::colrange_
protected

◆ conn_

StreamConn* EM::dgbSurfaceWriter::conn_
protected

◆ dbinfo_

BufferString EM::dgbSurfaceWriter::dbinfo_
protected

◆ filetype_

BufferString EM::dgbSurfaceWriter::filetype_
protected

◆ firstrow_

int EM::dgbSurfaceWriter::firstrow_
protected

◆ fulluserexpr_

BufferString EM::dgbSurfaceWriter::fulluserexpr_
protected

◆ geometry_

const EM::RowColSurfaceGeometry* EM::dgbSurfaceWriter::geometry_
protected

◆ msg_

uiString EM::dgbSurfaceWriter::msg_
protected

◆ nrdone_

int EM::dgbSurfaceWriter::nrdone_
protected

◆ nrrows_

int EM::dgbSurfaceWriter::nrrows_
protected

◆ nrsectionsoffsetoffset_

od_int64 EM::dgbSurfaceWriter::nrsectionsoffsetoffset_
protected

◆ objectmid_

MultiID EM::dgbSurfaceWriter::objectmid_
protected

◆ oldsectionindex_

int EM::dgbSurfaceWriter::oldsectionindex_
protected

◆ par_

IOPar* EM::dgbSurfaceWriter::par_
protected

◆ rowindex_

int EM::dgbSurfaceWriter::rowindex_
protected

◆ rowoffsettable_

TypeSet<od_int64> EM::dgbSurfaceWriter::rowoffsettable_
protected

◆ rowoffsettableoffset_

od_int64 EM::dgbSurfaceWriter::rowoffsettableoffset_
protected

◆ rowrange_

StepInterval<int> EM::dgbSurfaceWriter::rowrange_
protected

◆ sectionindex_

int EM::dgbSurfaceWriter::sectionindex_
protected

◆ sectionoffsets_

TypeSet<od_int64> EM::dgbSurfaceWriter::sectionoffsets_
protected

◆ sectionsel_

TypeSet<EM::SectionID> EM::dgbSurfaceWriter::sectionsel_
protected

◆ shift_

float EM::dgbSurfaceWriter::shift_
protected

◆ surface_

const EM::Surface& EM::dgbSurfaceWriter::surface_
protected

◆ writecolrange_

StepInterval<int>* EM::dgbSurfaceWriter::writecolrange_
protected

◆ writeonlyz_

bool EM::dgbSurfaceWriter::writeonlyz_
protected

◆ writerowrange_

StepInterval<int>* EM::dgbSurfaceWriter::writerowrange_
protected

◆ writingfinished_

bool EM::dgbSurfaceWriter::writingfinished_
protected

◆ writtencolrange_

Interval<int> EM::dgbSurfaceWriter::writtencolrange_
protected

◆ writtenrowrange_

Interval<int> EM::dgbSurfaceWriter::writtenrowrange_
protected

◆ zrange_

Interval<float> EM::dgbSurfaceWriter::zrange_
protected

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