1 #ifndef attribprovider_h 2 #define attribprovider_h 15 #include "attributeenginemod.h" 25 namespace Seis {
class SelData; }
28 #define mMAXDIP 300 * 1e-6 29 #define mMAXDIPSECURE 2000 * 1e-6 30 #define mMAXDIPSECUREDEPTH 6 36 class DataHolderLineBuffer;
48 friend class ProviderTask;
55 virtual bool isOK()
const;
58 const Desc& getDesc()
const;
65 {
return outputinterest_.size(); }
66 void enableOutput(
int output,
bool yn=
true);
67 bool isOutputEnabled(
int output)
const;
68 void setOutputInterestSize(
bool preserve=
false);
69 void enableAllOutputs(
bool yn=
true);
72 virtual bool isSingleTrace()
const;
73 virtual bool usesTracePosition()
const;
74 virtual void setReqBufStepout(
const BinID&,
bool wait=
false);
75 virtual void setDesBufStepout(
const BinID&,
bool wait=
false);
77 {
return reqbufferstepout_; }
79 {
return desbufferstepout_; }
84 {
return desiredvolume_; }
85 void resetDesiredVolume();
92 {
return possiblevolume_; }
93 int getTotalNrPos(
bool);
94 void setCurLineName(
const char*);
95 virtual void adjust2DLineStoredVolume();
99 virtual int moveToNextTrace(
BinID startpos =
BinID(-1,-1),
100 bool firstcheck =
false);
105 void computeNewStartPos(
BinID&);
107 int comparePosAndAlign(Provider*,
bool,Provider*,
110 void resetZIntervals();
113 BinID getCurrentPosition()
const;
114 virtual bool setCurrentPosition(
const BinID&);
115 void updateCurrentInfo();
116 virtual bool needStoredInput()
const;
118 void addLocalCompZIntervals(
122 void updateInputReqs(
int input=-1);
123 virtual void updateStorageReqs(
bool all=
false);
127 void setNeedInterpol(
bool);
130 void computeRefStep();
134 void setRefStep(
float step);
135 float getRefStep()
const;
141 void setRefZ0(
float z0);
144 virtual BinID getStepoutStep()
const;
152 virtual bool prepPriorToOutputSetup();
155 virtual void prepPriorToBoundsCalc();
159 virtual void prepareForComputeData();
176 virtual bool compDistBetwTrcsStats(
bool force=
false);
177 float getApplicableCrlDist(
bool)
const;
178 virtual float getDistBetwTrcs(
bool,
179 const char* linenm =0)
const;
180 BinID getElementStepout()
const;
185 virtual bool checkInpAndParsAtStart();
196 virtual bool getInputOutput(
int input,
TypeSet<int>&)
const;
200 virtual bool getInputData(
const BinID& relpos,
int idx);
211 virtual bool computeData(
const DataHolder& output,
213 int t0,
int nrsamples,
214 int threadidx)
const = 0;
221 int getDataIndex(
int input)
const;
224 void fillInputRangesArray(
240 void removeDataHolder(
const BinID& relpos);
241 void setInput(
int input,Provider*);
243 virtual BinDataDesc getOutputFormat(
int output)
const;
246 void computeDesInputCube(
int inp,
int out,
248 bool usestepout=
true)
const;
253 void setUsedMultTimes();
259 {
return prevtrcnr_ > currentbid_.crl(); }
261 virtual const BinID* desStepout(
int input,
int output)
const;
270 virtual const BinID* reqStepout(
int input,
int output)
const;
303 virtual const Interval<int>* desZSampMargin(
int input,
int output)
const;
315 virtual const Interval<int>* reqZSampMargin(
int input,
int output)
const;
331 float getInterpolInputValue(
const DataHolder&,
334 float getInterpolInputValue(
const DataHolder&,
335 int inputidx,
float sample,
337 float getInputValue(
const DataHolder&,
int inputidx,
338 int sampleidx,
int z0)
const;
340 int outputidx,
int sampleidx,
341 int z0,
float val)
const;
342 float getExtraZFromSampPos(
float)
const;
343 float getExtraZFromSampInterval(
int,
int)
const;
344 virtual bool useInterTrcDist()
const;
346 {
return refz0_ + idx*refstep_; }
348 bool zIsTime()
const;
349 float zFactor()
const;
350 float dipFactor()
const;
351 float inlDist()
const;
352 float crlDist()
const;
353 float lineDist()
const;
354 float trcDist()
const;
358 void stdPrepSteering(
const BinID&);
395 void setDataUnavailableFlag(
bool yn);
396 bool getDataUnavailableFlag()
const;
407 #define mAttrDefCreateInstance(clss) \ 408 Attrib::Provider* clss::createInstance( Attrib::Desc& desc ) \ 410 clss* res = new clss( desc ); \ 412 if ( !res->isOK() ) \ 418 res->unRefNoDelete(); \ 422 #define mAttrStartInitClass \ 423 Attrib::Desc* desc = new Attrib::Desc( attribName()); \ 426 #define mAttrStartInitClassWithUpdate \ 427 Attrib::Desc* desc = new Attrib::Desc( attribName(), updateDesc ); \ 430 #define mAttrStartInitClassWithDescAndDefaultsUpdate \ 431 Attrib::Desc* desc = new Attrib::Desc( attribName(), updateDesc,\ 435 #define mAttrStartInitClassWithDefaultsUpdate \ 436 Attrib::Desc* desc = new Attrib::Desc( attribName(), 0,updateDefaults ); \ 439 #define mAttrEndInitClass \ 440 Attrib::PF().addDesc( desc, createInstance ); \ #define mRefCountImpl(ClassName)
Macro to setup a class with destructor for reference counting.
Definition: refcount.h:163
bool isUsedMultTimes()
Definition: attribprovider.h:257
#define mExpClass(module)
Definition: commondefs.h:160
int getSteeringIndex(const BinID &)
For every position there is a single steering index ...?
Summary for a Seismic object.
Definition: segydirectdef.h:23
#define mMAXDIPSECUREDEPTH
Definition: attribprovider.h:30
ObjectSet< Provider > parents_
Definition: attribprovider.h:361
const BinID & getReqBufStepout() const
Definition: attribprovider.h:76
virtual void initSteering()
Definition: attribprovider.h:149
const Seis::SelData * seldata_
Definition: attribprovider.h:379
Interval< float > extraz_
Definition: attribprovider.h:380
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
virtual void updateCSIfNeeded(TrcKeyZSampling &) const
Definition: attribprovider.h:175
int nrOutputs() const
Definition: attribprovider.h:64
#define mGlobal(module)
Definition: commondefs.h:163
bool is2D(GeomType gt)
Definition: seistype.h:34
int prevtrcnr_
Definition: attribprovider.h:377
virtual bool allowParallelComputation() const
Definition: attribprovider.h:229
Definition: i_layout.h:35
BinID reqbufferstepout_
Definition: attribprovider.h:365
const TrcKeyZSampling * getPossibleVolume() const
Definition: attribprovider.h:91
Implementation of Array2D.
Definition: arrayndimpl.h:102
virtual bool getZStepStoredData(float &step) const
Definition: attribprovider.h:326
BinID trcinfobid_
Definition: attribprovider.h:382
SeisDataPack for 2D and 3D seismic data.
Definition: seisdatapack.h:28
ObjectSet< Provider > inputs_
Definition: attribprovider.h:360
float getRefZ0() const
Definition: attribprovider.h:142
Definition: uistring.h:89
ProviderTask * providertask_
Definition: attribprovider.h:374
Set of BufferString objects.
Definition: bufstringset.h:28
TypeSet< float > exactz_
Definition: attribprovider.h:370
#define mMAXDIPSECURE
Definition: attribprovider.h:29
const BinID & getDesBufStepout() const
Definition: attribprovider.h:78
float maxSecureDip() const
Definition: attribprovider.h:355
Attribute DataHolder Line Buffer.
Definition: attriblinebuffer.h:29
void setUseSC()
Definition: attribprovider.h:124
virtual void fillDataPackWithTrc(RegularSeisDataPack *) const
Definition: attribprovider.h:164
TypeSet< Interval< int > > localcomputezintervals_
Definition: attribprovider.h:368
TypeSet< int > outputinterest_
Definition: attribprovider.h:363
bool needinterp_
Definition: attribprovider.h:390
Set of pointers to objects.
Definition: commontypes.h:32
FixedString Desc()
Definition: keystrs.h:62
void addParent(Provider *prov)
Definition: attribprovider.h:242
Set of (small) copyable elements.
Definition: commontypes.h:30
float getZAtSample(int idx) const
Definition: attribprovider.h:345
const TrcKeyZSampling * getDesiredVolume() const
Definition: attribprovider.h:83
Description of an attribute in an Attrib::DescSet. Each attribute has a name (e.g. "Similarity"), a user reference (e.g. "My similarity"), and at least one output. In addition, it may have parameters and inputs. If it has multiple outputs, only one of the outputs are selected.
Definition: attribdesc.h:89
ObjectSet< Provider > allexistingprov_
Definition: attribprovider.h:369
Desc & desc_
Definition: attribprovider.h:362
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:35
bool useshortcuts_
Definition: attribprovider.h:383
virtual bool getZ0StoredData(float &z0) const
Definition: attribprovider.h:328
float refz0_
Definition: attribprovider.h:385
Information for a seismic trace, AKA trace header info.
Definition: seisinfo.h:27
virtual int minTaskSize() const
Definition: attribprovider.h:232
virtual bool preProcCommonToAllThreads(const DataHolder &out, const BinID &relpos)
Definition: attribprovider.h:203
const SeisTrcInfo * curtrcinfo_
Definition: attribprovider.h:381
contains input (sub-)selection data from a cube or lineset
Definition: seisselection.h:82
bool isNew2DLine() const
Definition: attribprovider.h:258
Index_Type GeomID
Definition: commontypes.h:52
virtual bool doNotReUseDH() const
Definition: attribprovider.h:244
TrcKeyZSampling * desiredvolume_
Definition: attribprovider.h:366
Holds the attribute data.
Definition: attribdataholder.h:43
virtual const SeisTrcInfo * getCurrentTrcInfo() const
Definition: attribprovider.h:112
static uiHor3DInterpol * create(uiParent *)
bool dataunavailableflag_
Definition: attribprovider.h:392
bool alreadymoved_
Definition: attribprovider.h:387
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:30
virtual void prepSteeringForStepout(const BinID &)
Definition: attribprovider.h:150
DataHolderLineBuffer * linebuffer_
Definition: attribprovider.h:375
uiString errmsg_
Definition: attribprovider.h:391
Pos::GeomID geomid_
Definition: attribprovider.h:378
virtual bool finalizeCalculation(bool scs)
Definition: attribprovider.h:233
Reads seismic data into buffers providing a Moving Virtual Subcube of seismic data.
Definition: seiscubeprov.h:56
Provides the actual output to ...
Definition: attribprovider.h:44
BinID currentbid_
Definition: attribprovider.h:376
ObjectSet< Provider > & getInputs()
Definition: attribprovider.h:145
const char * errMsg() const
Definition: horizontracker.h:61
float refstep_
Definition: attribprovider.h:386
Description of binary data.
Definition: bindatadesc.h:43
BinID desbufferstepout_
Definition: attribprovider.h:364
bool isusedmulttimes_
Definition: attribprovider.h:389
TrcKeyZSampling * possiblevolume_
Definition: attribprovider.h:367
BinID getTrcInfoBid() const
Definition: attribprovider.h:146
virtual bool setNrThreads(int idx)
Definition: attribprovider.h:231
Semblance Attribute.
Definition: attribdataholder.h:25