 |
OpendTect
6.6
|
Go to the documentation of this file.
27 #define mComputeTrendAandB( sz ) { \
28 aval = mCast(T,( (fT)sz * crosssum - sum * sumindexes ) / \
29 ( (fT)sz * sumsqidx - sumindexes * sumindexes ) );\
30 bval = mCast(T,( sum * sumsqidx - sumindexes * crosssum ) / \
31 ( (fT)sz * sumsqidx - sumindexes * sumindexes ) ); }
36 template <
class T,
class fT>
40 if ( out && in_.
info() !=
out_.info() )
53 const T* inpptr = in_.
getData();
54 T* outptr =
out_.getData();
56 if ( inpptr && outptr )
59 for (
int idx=0; idx<sz; idx++ )
61 const T value = inpptr[idx];
70 const fT fidx =
mCast(fT,idx);
72 sumsqidx += fidx * fidx;
73 crosssum += inpptr[idx] * fidx;
82 avg = sum / (fT)count;
84 for (
int idx=0; idx<sz; idx++ )
86 const T value = inpptr[idx];
88 : (trend ? value - (aval*(fT)idx+bval)
95 int index = 0, count = 0;
110 sumsqidx += index * index;
111 crosssum += value * (fT)index;
112 }
while ( iter.
next() );
121 avg = sum / (fT)count;
128 : (trend ?
inpval - avg-(aval*(fT)index+bval)
132 }
while ( iter.
next() );
141 template <
class T,
class fT>
144 return removeLinPart<T,fT>( inout, 0,
false );
149 template <
class T,
class fT>
152 return removeLinPart<T,fT>( in, &out,
false );
157 template <
class T,
class fT>
160 return removeLinPart<T,fT>( inout, 0,
true );
165 template <
class T,
class fT>
168 return removeLinPart<T,fT>( in, &out,
true );
182 T sum = 0;
int count = 0;
183 for (
int idx=0; idx<sz; idx++ )
185 const T val = in.get( idx );
187 { sum += val; count++; }
205 if ( sz < 1 || !data )
209 for (
int idx=0; idx<sz; idx++ )
211 const T val = data[idx];
212 if ( !
mIsUdf(val) && val > maxval )
228 if ( sz < 1 || !data )
232 for (
int idx=0; idx<sz; idx++ )
234 const T val = data[idx];
235 if ( !
mIsUdf(val) && val < minval )
249 for (
int idx=0; idx<sz; idx++ )
251 const fT val = in.
get( idx );
265 const total_size_type sz = in.
totalSize();
268 for ( total_size_type idx=0; idx<sz; idx++ )
280 for ( total_size_type idx=0; idx<sz; idx++ )
295 }
while( iter.
next() );
320 for (
int idx=0; idx<sz; idx++ )
322 const fT val = in.
get( idx );
327 for (
int idx=0; idx<sz; idx++ )
329 const fT val = in.
get( idx );
359 float paramval=
mUdf(
float));
362 bool isOK()
const {
return window_; }
367 void setValue(
int idx,
float val) { window_[idx]=val; }
379 if ( in->
info() != size_ )
return false;
381 const od_int64 totalsz = size_.getTotalSz();
385 if ( indata && outdata )
387 for (
unsigned long idx = 0; idx<totalsz; idx++ )
389 Type inval = indata[idx];
390 outdata[idx] =
mIsUdf( inval ) ? inval : inval * window_[idx];
398 if ( instorage && outstorage )
400 for (
unsigned long idx = 0; idx < totalsz; idx++ )
404 mIsUdf( inval ) ? inval : inval * window_[idx] );
415 mIsUdf( inval ) ? inval : inval * window_[idx] );
418 }
while ( iter.
next() );
440 float p0,
float p1,
float p2,
441 bool posperiodic =
false )
445 float dist0 = p0 - intpos0;
446 int prevpos0 = intpos0;
455 float dist1 = p1 - intpos1;
456 int prevpos1 = intpos1;
465 float dist2 = p2 - intpos2;
466 int prevpos2 = intpos2;
475 if ( !posperiodic && ( prevpos0 < 0 || prevpos0 > size.
getSize(0) -2 ||
476 prevpos1 < 0 || prevpos1 > size.
getSize(1) -2 ||
477 prevpos2 < 0 || prevpos2 > size.
getSize(2) -2 ))
480 if ( !posperiodic && ( !prevpos0 || prevpos0 > size.
getSize(0) -3 ||
481 !prevpos1 || prevpos1 > size.
getSize(1) -3 ||
482 !prevpos2 || prevpos2 > size.
getSize(2) -3 ))
484 return linearInterpolate3D(
485 array.
get( prevpos0 , prevpos1 , prevpos2 ),
486 array.
get( prevpos0 , prevpos1 , prevpos2+1),
487 array.
get( prevpos0 , prevpos1+1, prevpos2 ),
488 array.
get( prevpos0 , prevpos1+1, prevpos2+1),
489 array.
get( prevpos0+1, prevpos1 , prevpos2 ),
490 array.
get( prevpos0+1, prevpos1 , prevpos2+1),
491 array.
get( prevpos0+1, prevpos1+1, prevpos2 ),
492 array.
get( prevpos0+1, prevpos1+1, prevpos2+1),
493 dist0, dist1, dist2 );
496 int firstpos0 = prevpos0 - 1;
497 int nextpos0 = prevpos0 + 1;
498 int lastpos0 = prevpos0 + 2;
504 int firstpos1 = prevpos1 - 1;
505 int nextpos1 = prevpos1 + 1;
506 int lastpos1 = prevpos1 + 2;
512 int firstpos2 = prevpos2 - 1;
513 int nextpos2 = prevpos2 + 1;
514 int lastpos2 = prevpos2 + 2;
520 return polyInterpolate3D (
521 array.
get( firstpos0 , firstpos1 , firstpos2 ),
522 array.
get( firstpos0 , firstpos1 , prevpos2 ),
523 array.
get( firstpos0 , firstpos1 , nextpos2 ),
524 array.
get( firstpos0 , firstpos1 , lastpos2 ),
526 array.
get( firstpos0 , prevpos1 , firstpos2 ),
527 array.
get( firstpos0 , prevpos1 , prevpos2 ),
528 array.
get( firstpos0 , prevpos1 , nextpos2 ),
529 array.
get( firstpos0 , prevpos1 , lastpos2 ),
531 array.
get( firstpos0 , nextpos1 , firstpos2 ),
532 array.
get( firstpos0 , nextpos1 , prevpos2 ),
533 array.
get( firstpos0 , nextpos1 , nextpos2 ),
534 array.
get( firstpos0 , nextpos1 , lastpos2 ),
536 array.
get( firstpos0 , lastpos1 , firstpos2 ),
537 array.
get( firstpos0 , lastpos1 , prevpos2 ),
538 array.
get( firstpos0 , lastpos1 , nextpos2 ),
539 array.
get( firstpos0 , lastpos1 , lastpos2 ),
542 array.
get( prevpos0 , firstpos1 , firstpos2 ),
543 array.
get( prevpos0 , firstpos1 , prevpos2 ),
544 array.
get( prevpos0 , firstpos1 , nextpos2 ),
545 array.
get( prevpos0 , firstpos1 , lastpos2 ),
547 array.
get( prevpos0 , prevpos1 , firstpos2 ),
548 array.
get( prevpos0 , prevpos1 , prevpos2 ),
549 array.
get( prevpos0 , prevpos1 , nextpos2 ),
550 array.
get( prevpos0 , prevpos1 , lastpos2 ),
552 array.
get( prevpos0 , nextpos1 , firstpos2 ),
553 array.
get( prevpos0 , nextpos1 , prevpos2 ),
554 array.
get( prevpos0 , nextpos1 , nextpos2 ),
555 array.
get( prevpos0 , nextpos1 , lastpos2 ),
557 array.
get( prevpos0 , lastpos1 , firstpos2 ),
558 array.
get( prevpos0 , lastpos1 , prevpos2 ),
559 array.
get( prevpos0 , lastpos1 , nextpos2 ),
560 array.
get( prevpos0 , lastpos1 , lastpos2 ),
563 array.
get( nextpos0 , firstpos1 , firstpos2 ),
564 array.
get( nextpos0 , firstpos1 , prevpos2 ),
565 array.
get( nextpos0 , firstpos1 , nextpos2 ),
566 array.
get( nextpos0 , firstpos1 , lastpos2 ),
568 array.
get( nextpos0 , prevpos1 , firstpos2 ),
569 array.
get( nextpos0 , prevpos1 , prevpos2 ),
570 array.
get( nextpos0 , prevpos1 , nextpos2 ),
571 array.
get( nextpos0 , prevpos1 , lastpos2 ),
573 array.
get( nextpos0 , nextpos1 , firstpos2 ),
574 array.
get( nextpos0 , nextpos1 , prevpos2 ),
575 array.
get( nextpos0 , nextpos1 , nextpos2 ),
576 array.
get( nextpos0 , nextpos1 , lastpos2 ),
578 array.
get( nextpos0 , lastpos1 , firstpos2 ),
579 array.
get( nextpos0 , lastpos1 , prevpos2 ),
580 array.
get( nextpos0 , lastpos1 , nextpos2 ),
581 array.
get( nextpos0 , lastpos1 , lastpos2 ),
584 array.
get( lastpos0 , firstpos1 , firstpos2 ),
585 array.
get( lastpos0 , firstpos1 , prevpos2 ),
586 array.
get( lastpos0 , firstpos1 , nextpos2 ),
587 array.
get( lastpos0 , firstpos1 , lastpos2 ),
589 array.
get( lastpos0 , prevpos1 , firstpos2 ),
590 array.
get( lastpos0 , prevpos1 , prevpos2 ),
591 array.
get( lastpos0 , prevpos1 , nextpos2 ),
592 array.
get( lastpos0 , prevpos1 , lastpos2 ),
594 array.
get( lastpos0 , nextpos1 , firstpos2 ),
595 array.
get( lastpos0 , nextpos1 , prevpos2 ),
596 array.
get( lastpos0 , nextpos1 , nextpos2 ),
597 array.
get( lastpos0 , nextpos1 , lastpos2 ),
599 array.
get( lastpos0 , lastpos1 , firstpos2 ),
600 array.
get( lastpos0 , lastpos1 , prevpos2 ),
601 array.
get( lastpos0 , lastpos1 , nextpos2 ),
602 array.
get( lastpos0 , lastpos1 , lastpos2 ),
603 dist0, dist1, dist2 );
614 const int ndim = destsz.
getNDim();
615 if ( ndim != srcsz.
getNDim() || ndim != copypos.size() )
return false;
617 for (
int idx=0; idx<ndim; idx++ )
629 for (
int idx=0; idx<ndim; idx++ )
631 srcposition[idx] = copypos[idx] + destposition[idx];
637 dest.
setND( destposition.
getPos(), src.get( &srcposition[0] ));
640 }
while ( destposition.
next() );
648 int p0,
int p1,
int p2,
bool srcperiodic=
false )
653 const int destsz0 = destsz.
getSize(0);
654 const int destsz1 = destsz.
getSize(1);
655 const int destsz2 = destsz.
getSize(2);
657 const int srcsz0 = srcsz.
getSize(0);
658 const int srcsz1 = srcsz.
getSize(1);
659 const int srcsz2 = srcsz.
getSize(2);
663 if ( p0 + destsz0 > srcsz0 ||
664 p1 + destsz1 > srcsz1 ||
665 p2 + destsz2 > srcsz2 )
672 for (
int id0=0; id0<destsz0; id0++ )
674 for (
int id1=0; id1<destsz1; id1++ )
676 for (
int id2=0; id2<destsz2; id2++ )
693 bool destperiodic=
false )
698 const int ndim = destsz.
getNDim();
699 if ( ndim != srcsz.
getNDim() || ndim != pastepos.size() )
return false;
701 for (
int idx=0; idx<ndim; idx++ )
703 if ( !destperiodic &&
716 for (
int idx=0; idx<ndim; idx++ )
718 destposition[idx] = pastepos[idx] + srcposition[idx];
724 dest( destposition ) = ptr[ptrpos++];
726 }
while ( srcposition.
next() );
734 int p0,
int p1,
bool destperiodic=
false )
739 const int srcsz0 = srcsz.
getSize(0);
740 const int srcsz1 = srcsz.
getSize(1);
742 const int destsz0 = destsz.
getSize(0);
743 const int destsz1 = destsz.
getSize(1);
747 if ( p0 + srcsz0 > destsz0 ||
748 p1 + srcsz1 > destsz1 )
756 for (
int id0=0; id0<srcsz0; id0++ )
758 for (
int id1=0; id1<srcsz1; id1++ )
772 int p0,
int p1,
int p2,
773 bool destperiodic=
false )
778 const int srcsz0 = srcsz.
getSize(0);
779 const int srcsz1 = srcsz.
getSize(1);
780 const int srcsz2 = srcsz.
getSize(2);
782 const int destsz0 = destsz.
getSize(0);
783 const int destsz1 = destsz.
getSize(1);
784 const int destsz2 = destsz.
getSize(2);
788 if ( p0 + srcsz0 > destsz0 ||
789 p1 + srcsz1 > destsz1 ||
790 p2 + srcsz2 > destsz2 )
798 for (
int id0=0; id0<srcsz0; id0++ )
800 for (
int id1=0; id1<srcsz1; id1++ )
802 for (
int id2=0; id2<srcsz2; id2++ )
851 return canCopyAll() ? 0 : commontks_.nrLines();
858 return tksout_ == tksin_ && in_.getData() &&
859 (
out_.getData() ||
out_.getStorage() );
864 if ( in_.info().getSize(0) != tksin_.nrLines() ||
865 in_.info().getSize(1) != tksin_.nrTrcs() )
870 if (
out_.info().getSize(0) != tksout_.nrLines() ||
871 out_.info().getSize(1) != tksout_.nrTrcs() )
874 if ( !outimpl || !outimpl->setSize( tksout_.nrLines(),
885 if (
out_.getData() )
886 in_.getAll(
out_.getData() );
887 else if (
out_.getStorage() )
888 in_.getAll( *
out_.getStorage() );
900 const bool usearrayptrs = in_.getData() &&
out_.getData() &&
907 const int nrcrl = tks.
nrTrcs();
908 const od_int64 nrbytes = nrcrl *
sizeof(T);
911 const int startcrlidyin = tksin.
trcIdx( startcrl );
912 const int startcrlidyout = tksout.
trcIdx( startcrl );
913 for (
int idx=
mCast(
int,start); idx<=
mCast(
int,stop); idx++)
916 const int inlidxin = tksin.
lineIdx( inl );
917 const int inlidxout = tksout.
lineIdx( inl );
921 in_.info().getOffset(inlidxin,startcrlidyin) );
923 out_.info().getOffset(inlidxout,startcrlidyout) );
930 for (
int idy=0; idy<nrcrl; idy++ )
933 in_.get( inlidxin, startcrlidyin+idy );
934 out_.set( inlidxout, startcrlidyout+idy, val );
981 const Array3DInfoImpl infoin( tkzsin_.hsamp_.nrLines(), \
982 tkzsin_.hsamp_.nrTrcs(), tkzsin_.nrZ() ); \
983 const Array3DInfoImpl infoout( tkzsout_.hsamp_.nrLines(), \
984 tkzsout_.hsamp_.nrTrcs(), tkzsout_.nrZ() );
989 if ( in_.info() != infoin )
992 if (
out_.info() != infoout && !
out_.setInfo(infoout) )
995 if ( tkzsin_.hsamp_.survid_ != tkzsout_.hsamp_.survid_ )
998 if ( !tkzsin_.zsamp_.isCompatible(tkzsout_.zsamp_) )
1012 const int nrzout = infoout.getSize(2);
1014 zrg.limitTo( tkzsin_.zsamp_ );
1015 const int nrztocopy = zrg.
nrSteps() + 1;
1016 const int z0in = tkzsin_.zsamp_.nearestIndex( zrg.start );
1017 const int z0out = tkzsout_.zsamp_.nearestIndex( zrg.start );
1020 const T* inptr = in_.getData();
1021 T* outptr =
out_.getData();
1024 const bool hasarrayptr = inptr && outptr;
1025 const bool hasstorage = instor && outstor;
1026 const bool needgetset = !hasarrayptr && !hasstorage;
1029 infoout.getSize( 1 ) );
1033 const od_int64 offsetout = start * nrzout + z0out;
1034 outptr += offsetout;
1037 for (
od_int64 idx=start; idx<=stop; idx++, iter.
next(),
1038 outptr+=nrzout, validxout+=nrzout,
1039 quickAddToNrDone(idx) )
1041 const int inlidx = iter[0];
1042 const int crlidx = iter[1];
1049 const od_int64 offsetin = needgetset ? 0
1050 : infoin.getOffset( inlidxin, crlidxin, z0in );
1055 else if ( hasstorage )
1057 for (
int idz=0; idz<nrztocopy; idz++ )
1059 outstor->setValue( validxout+idz,
1060 instor->
value(offsetin+idz));
1065 for (
int idz=0, idzin=z0in; idz<nrztocopy; idz++,
1069 in_.get( inlidxin, crlidxin, idzin );
1070 out_.set( inlidx, crlidx, idz, val );
1103 static const char* sKeyOrder() {
return "Polynomial Order"; }
1108 const IDXABLE& valuelistj);
1115 template <
class T>
void apply(
const Coord& pos,
bool dir,T&)
const;
1143 template <
class IDXABLE>
inline
1146 int sz = poslist.size();
1153 for (
int idx=0; idx<sz; idx++ )
1155 if ( !poslist[idx].isDefined() ||
mIsUdf(vals[idx]) )
1158 posnoudf += poslist[idx];
1159 valsnoudf += (double) vals[idx];
1162 sz = valsnoudf.size();
1177 template <
class T>
inline
1183 const double fact = dir ? -1. : 1;
1184 double inp = (double) val;
1192 const double dx = pos.
x -
posc_.
x;
1193 const double dy = pos.
y -
posc_.
y;
1194 inp += fact * (
f1_ * dx +
f2_ * dy );
1201 const double dx2 = dx * dx;
1202 const double dxy = dx * dy;
1203 const double dyy = dy * dy;
1204 inp += fact * (
f11_ * dx2 +
f12_ * dxy +
f22_ * dyy );
1217 bool dosqout=
false,
bool doabs=
false,
1218 bool donormalizesum=
false,
1219 bool dosqrtsum=
false)
1224 , donormalizesum_(donormalizesum)
1225 , dosqrtsum_(dosqrtsum)
1242 template <
class RT,
class AT>
1250 ,
sz_(xvals.info().getTotalSz())
1283 return sumvals_.setSize( nrthreads );
1295 for (
int idx=0; idx<
sumvals_.size(); idx++ )
1331 template <
class RT,
class AT>
inline
1335 RT sumval = 0, comp = 0;
1337 const AT* xvals = xarr_.getData();
1338 const AT* yvals = yarr_ ? yarr_->getData() : 0;
1342 ArrayNDIter* yiter = ( yarr_ && ( yvals || ystor ) ) || !yarr_
1346 const bool doscalexvals = !
mIsUdf(xfact_);
1347 const bool hasyvals = yarr_;
1348 const bool doscaleyvals = !
mIsUdf(yfact_);
1349 for (
od_int64 idx=start; idx<=stop; idx++ )
1351 RT xvalue = xvals ? xvals[idx]
1352 : xstor ? xstor->
value(idx)
1353 : xarr_.getND( xiter->
getPos() );
1354 if ( !noudf_ &&
mIsUdf(xvalue) )
1356 if ( xiter ) xiter->
next();
1357 if ( yiter ) yiter->
next();
1361 if ( setup_.dosqinp_ ) xvalue *= xvalue;
1362 if ( doscalexvals ) xvalue *= xfact_;
1365 RT yvalue = yvals ? yvals[idx]
1366 : ystor ? ystor->
value(idx)
1367 : yarr_->getND( yiter->
getPos() );
1368 if ( !noudf_ &&
mIsUdf(yvalue) )
1370 if ( xiter ) xiter->
next();
1371 if ( yiter ) yiter->
next();
1375 if ( setup_.dosqinp_ ) yvalue *= yvalue;
1376 if ( doscaleyvals ) yvalue *= yfact_;
1377 if ( setup_.doadd_ )
1383 if ( setup_.doabs_ )
1385 else if ( setup_.dosqout_ )
1389 const RT t = sumval + xvalue;
1390 comp = ( t - sumval ) - xvalue;
1393 if ( xiter ) xiter->
next();
1394 if ( yiter ) yiter->
next();
1397 delete xiter;
delete yiter;
1398 sumvals_[threadidx] = count==0 ?
mUdf(
RT) : sumval;
1409 #define mSetResAndContinue(res) \
1412 outvals[idx] = res; \
1413 else if ( outstor ) \
1414 outstor->setValue( idx, res );\
1416 outarr_.setND( outiter->getPos(), res ); \
1418 if ( xiter ) xiter->next(); \
1419 if ( yiter ) yiter->next(); \
1420 if ( outiter ) outiter->next(); \
1428 template <
class OperType,
class ArrType>
1439 ,
sz_(xvals.info().getTotalSz())
1494 template <
class OperType,
class ArrType>
1497 const ArrType* xvals = xarr_.getData();
1498 const ArrType* yvals = yarr_ ? yarr_->getData() : 0;
1499 ArrType* outvals = outarr_.getData();
1504 ArrayNDIter* yiter = ( yarr_ && ( yvals || ystor ) ) || !yarr_
1511 const bool doscalexvals = !
mIsUdf(xfact_);
1512 const bool hasyvals = yarr_;
1513 const bool doscaleyvals = !
mIsUdf(yfact_);
1514 const bool doshiftoutvals = !
mIsUdf(shift_);
1515 for (
od_int64 idx=start; idx<=stop; idx++ )
1517 OperType xvalue = xvals ? xvals[idx]
1518 : xstor ? xstor->
value(idx)
1519 : xarr_.getND( xiter->
getPos() );
1520 if ( !noudf_ &&
mIsUdf(xvalue) )
1523 if ( doscalexvals ) xvalue *= xfact_;
1526 OperType yvalue = yvals ? yvals[idx]
1527 : ystor ? ystor->
value(idx)
1528 : yarr_->getND( yiter->
getPos() );
1529 if ( !noudf_ &&
mIsUdf(yvalue) )
1532 if ( doscaleyvals ) yvalue *= yfact_;
1533 if ( setup_.doadd_ )
1539 if ( doshiftoutvals )
1545 delete xiter;
delete yiter;
delete outiter;
1576 return sumvals_.setSize( nrthreads );
1583 for (
int idx=
mCast(
int,start); idx<=stop; idx++ )
1585 const T value =
vals_[idx];
1605 for (
int idx=0; idx<
sumvals_.size(); idx++ )
1669 bool noudf,
bool parallel )
1680 const T*,arrin,T*,arrout,T,fact,T,shift,
bool,noudf)
1690 double shift,
bool noudf,
bool parallel )
1705 const T*,arr1,
const T*,arr2,T*,out,T,fact1,T,fact2,
bool,noudf)
1708 {
out_[idx] =
mUdf(T);
continue; } \
1716 bool noudf,
bool parallel )
1730 const T*,arr1,
const T*,arr2,T*,out,
bool,noudf)
1733 {
out_[idx] =
mUdf(T);
continue; } \
1767 bool noudf,
bool parallel )
1781 bool noudf,
bool parallel )
1788 return mUdf(
double);
1790 return sumprodexec.
getSum();
1832 return mUdf(
double);
1834 return norm2exec.
getSum();
1929 template <
class T,
class fT>
1931 T& intercept, T& gradient )
1938 const bool hasxvals = inx_;
1943 if ( !inxtmp->
isOK() )
1944 {
delete inxtmp;
return false; }
1946 T* inxvals = inxtmp->
getData();
1950 inxvals[idx] =
mCast(fT,idx);
1960 }
while ( iter.
next() );
1966 T avgxvals =
getAverage( *inx,
false,
true );
1968 {
if ( !hasxvals)
delete inx;
return false; }
1972 removeBias<T,fT>( inyed );
1973 removeBias<T,fT>( inxed );
1976 if ( !crossprodxy.
isOK() )
1977 {
if ( !hasxvals )
delete inx;
return false; }
1979 getProduct( *inx, iny, crossprodxy,
false,
true );
1983 intercept = avgyvals - gradient * avgxvals;
2013 , undefidxs_(undefidxs)
2024 , undefidxs_(undefidxs)
2027 , totalnr_(inp.info().getTotalSz()/inp.info().getSize(2))
2032 return tr(
"Replacing undefined values");
2043 trcssampling_ = trcssampling;
2055 undefidxs_->setEmpty();
2062 const bool isrect = tks_ && trcssampling_
2063 ? trcssampling_->isFullyRectAndReg()
2066 const int nrtrcsp = info.
getSize( inp_.get1DDim() );
2067 T* dataptr = inp_.getData();
2069 const bool hasarrayptr = dataptr;
2070 const bool hasstorage = datastor;
2071 const bool neediterator = !hasarrayptr && !hasstorage;
2072 const od_int64 offset = start * nrtrcsp;
2080 const T replval = replval_;
2081 for (
od_int64 idx=start; idx<=stop; idx++,
2082 quickAddToNrDone(idx))
2084 const bool hastrcdata = isrect ? true
2085 : trcssampling_->isValid(idx,*tks_);
2088 for (
int idz=0; idz<nrtrcsp; idz++ )
2090 const int* pos = iter ? iter->
getPos() : 0;
2091 const T val = hasarrayptr ? *dataptr
2093 ? datastor->
value( validx )
2094 : inp_.getND( pos );
2097 if ( hasarrayptr ) dataptr++;
2098 else if ( hasstorage ) validx++;
2107 *undefidxs_ += idx*nrtrcsp + idz;
2112 *dataptr++ = replval;
2113 else if ( hasstorage )
2114 datastor->
setValue( validx++, replval );
2117 inp_.setND( pos, replval );
2129 else if ( hasstorage )
2131 for (
int idz=0; idz<nrtrcsp; idz++ )
2132 datastor->
setValue( validx++, replval );
2136 for (
int idz=0; idz<nrtrcsp; idz++ )
2138 inp_.setND( iter->
getPos(), replval );
2176 , undefidxs_(undefidxs)
2178 , totalnr_(undefidxs.
size())
2193 T* outpptr = outp_.getData();
2199 const T udfval =
mUdf(T);
2201 for (
od_int64 idx=start; idx<=stop; idx++,
2202 quickAddToNrDone(idx) )
2206 outpptr[sidx] = udfval;
2207 else if ( outpstor )
2208 outpstor->
setValue( sidx, udfval );
2212 outp_.setND( pos, udfval );
2237 , trcssampling_(trcssampling)
2258 const int nrtrcsp = info.
getSize( outp_.get1DDim() );
2259 T* outpptr = outp_.getData();
2261 const bool hasarrayptr = outpptr;
2262 const bool hasstorage = outstor;
2263 const od_int64 offset = start * nrtrcsp;
2273 for (
od_int64 idx=start; idx<=stop; idx++ )
2275 if ( trcssampling_.isValid(idx,tks_) )
2277 if ( hasarrayptr ) outpptr+=nrtrcsp;
2278 else if ( hasstorage ) validx+=nrtrcsp;
2289 else if ( hasstorage )
2291 for (
int idz=0; idz<nrtrcsp; idz++ )
2296 const int inlidx = (*hiter)[0];
2297 const int crlidx = (*hiter)[1];
2298 for (
int idz=0; idz<nrtrcsp; idz++ )
2299 outp_.set( inlidx, crlidx, idz,
mUdf(T) );
2331 , tailmute_(tailmute)
2340 return tr(
"Extracting mute positions");
2349 trcssampling_ = trcssampling;
2360 const int data1ddim = data_.get1DDim();
2361 if ( ( data1ddim != 1 && data1ddim != 2 ) ||
2362 topmute_.get1DDim() != data1ddim-1 ||
2363 tailmute_.get1DDim() != data1ddim-1 )
2366 topmute_.setAll( 0 );
2368 mCast(
int,data_.info().getTotalSz()/totalnr_);
2369 tailmute_.setAll( nrz-1 );
2376 const bool isrect = tks_ && trcssampling_
2377 ? trcssampling_->isFullyRectAndReg()
2379 const T* dataptr = data_.getData();
2380 int* topmuteptr = topmute_.getData();
2381 int* tailmuteptr = tailmute_.getData();
2385 const bool hasarrayptr = dataptr && topmuteptr &&
2387 const bool hasstorage = datastor && topmutestor &&
2389 const bool neediterator = !hasarrayptr && !hasstorage;
2391 const int zidx = data_.get1DDim();
2392 const int nrtrcsp = info.
getSize( zidx );
2393 const od_int64 offset = start * nrtrcsp;
2397 topmuteptr += start;
2398 tailmuteptr += start;
2402 const int ndim = info.
getNDim();
2403 const bool is2d = ndim == 2;
2404 const int nrlines = is2d ? 1 : info.
getSize(0);
2405 const int nrtrcs = info.
getSize( is2d ? 0 : 1 );
2412 const T zeroval =
mCast(T,0);
2417 for (
od_int64 idx=start; idx<=stop; idx++,
2418 quickAddToNrDone(idx) )
2420 const bool hastrcdata = isrect ? true
2421 : trcssampling_->isValid(idx,*tks_);
2430 if ( hasstorage ) validx+=nrtrcsp;
2436 const int* hpos = hiter ? hiter->
getPos() : 0;
2439 for (
int ipos=0; ipos<ndim; ipos++ )
2440 pos[ipos] = hpos[ipos];
2444 bool allnull =
true;
2445 for (
int idz=0; idz<nrtrcsp; idz++ )
2447 if ( hiter ) pos[zidx] = idz;
2448 const T val = hasarrayptr
2451 ? datastor->
value( validx++ )
2452 : data_.getND( pos );
2453 if ( val == zeroval )
2458 *topmuteptr++ = idz;
2459 dataptr += nrtrcsp-idz-2;
2461 else if ( hasstorage )
2464 validx += nrtrcsp-idz-2;
2467 topmute_.setND( hpos, idz );
2477 *topmuteptr++ = nrtrcsp;
2478 *tailmuteptr++ = -1;
2480 else if ( hasstorage )
2482 topmutestor->
setValue( idx, nrtrcsp );
2483 tailmutestor->setValue( idx, -1 );
2487 topmute_.setND( hpos, nrtrcsp );
2488 tailmute_.setND( hpos, -1 );
2494 for (
int idz=nrtrcsp-1; idz>=0; idz-- )
2496 if ( hiter ) pos[zidx] = idz;
2497 const T val = hasarrayptr
2500 ? datastor->
value( validx-- )
2501 : data_.getND( pos );
2502 if ( val == zeroval )
2507 *tailmuteptr++ = idz;
2508 dataptr += nrtrcsp-idz+1;
2510 else if ( hasstorage )
2512 tailmutestor->setValue( idx, idz );
2513 validx += nrtrcsp-idz+1;
2516 tailmute_.setND( hpos, idz );
ArrayUdfValReplacer(Array3D< T > &inp, LargeValVec< od_uint64 > *undefidxs)
Definition: arrayndalgo.h:2019
ArrayND< T > & outp_
Definition: arrayndalgo.h:2222
T cumsum_
Definition: arrayndalgo.h:1625
uiString uiMessage() const
will be message() again in 7.x
Definition: arrayndalgo.h:2245
void convertUndefinedIndexList(const TrcKeyZSampling &tkzsin, const TrcKeyZSampling &tkzsout, LargeValVec< od_uint64 > &)
#define od_uint64
Definition: plftypes.h:36
bool doabs_
Definition: arrayndalgo.h:1231
Position info for an entire 3D cube. The LineData's are not sorted.
Definition: posinfo.h:95
Horizontal sampling (inline and crossline range and steps).
Definition: trckeysampling.h:35
float_complex getAverage< float_complex >(const ArrayND< float_complex > &in, bool noudf, bool parallel)
Specialization for complex numbers.
Definition: arrayndalgo.h:1668
BufferString windowtypename_
Definition: arrayndalgo.h:431
T Array3DInterpolate(const Array3D< T > &array, float p0, float p1, float p2, bool posperiodic=false)
Definition: arrayndalgo.h:439
Definition: arrayndalgo.h:1554
TypeSet< RT > sumvals_
Definition: arrayndalgo.h:1322
const TrcKeyZSampling & tkzsout_
Definition: arrayndalgo.h:1079
bool getInterceptGradient(const ArrayND< T > &iny, const ArrayND< T > *inx_, T &intercept, T &gradient)
returns the intercept and gradient of two arrays
Definition: arrayndalgo.h:1930
od_int64 nrIterations() const
Definition: arrayndalgo.h:849
TrcKeySampling hsamp_
Definition: trckeyzsampling.h:60
IdxType & crl()
Definition: posidxpair.h:47
bool isOK() const
Definition: arrayndimpl.h:66
Transfers the common samples from one 2D array to another.
Definition: arrayndalgo.h:819
const Array1DInfo & info() const
Definition: arrayndimpl.h:75
mODTextTranslationClass(ArrOperExec)
void initOrder0(const TypeSet< double > &)
uiString uiNrDoneText() const
will be nrDoneText() in 7.x
Definition: arrayndalgo.h:839
virtual int get1DDim() const
Definition: arraynd.h:398
bool ArrayNDPaste(ArrayND< T > &dest, const ArrayND< T > &src, const TypeSet< int > &pastepos, bool destperiodic=false)
Definition: arrayndalgo.h:691
std::complex< float > float_complex
Definition: odcomplex.h:17
mDeclareEnumUtils(Order) static const char *sKeyOrder()
Definition: arrayndalgo.h:1101
void setScaler(double scaler, bool forx)
Definition: arrayndalgo.h:1262
virtual bool executeParallel(bool parallel)
Is a lock that allows a thread to have exlusive rights to something.
Definition: thread.h:45
double f2_
Definition: arrayndalgo.h:1126
Contains the information about the size of ArrayND, and in what order the data is stored (if accessab...
Definition: arrayndinfo.h:25
const T val1
Definition: arrayndalgo.h:1706
#define mGlobal(module)
Definition: commondefs.h:180
void initOrder1(const TypeSet< Coord > &, const TypeSet< double > &)
double f11_
Definition: arrayndalgo.h:1127
double xfact_
Definition: arrayndalgo.h:1325
bool doWork(od_int64 start, od_int64 stop, int)
Definition: arrayndalgo.h:1007
double getNorm2D(const ArrayND< T > &in, bool noudf, bool parallel)
Definition: arrayndalgo.h:1825
Definition: arrayndalgo.h:2231
#define mGetInfo()
Definition: arrayndalgo.h:980
virtual uint64_t getTotalSz() const
virtual void set(int, T)=0
bool apply(ArrayND< Type > *in, ArrayND< Type > *out_=0) const
Definition: arrayndalgo.h:373
const ArrayND< AT > & xarr_
Definition: arrayndalgo.h:1323
void getProduct(const ArrayND< T > &in1, const ArrayND< T > &in2, ArrayND< T > &out, bool noudf, bool parallel)
computes the product array between two arrays
Definition: arrayndalgo.h:1740
virtual T value(int64_t) const =0
@ None
Definition: arrayndalgo.h:1100
Implementation of Array1D.
Definition: arrayndimpl.h:52
int totalSizeInside(const TrcKeySampling &hrg) const
uiString uiMessage() const
will be message() again in 7.x
Definition: arrayndalgo.h:2030
od_uint64 sz_
Definition: arrayndalgo.h:1319
#define mIsUdf(val)
Use mIsUdf to check for undefinedness of simple types.
Definition: undefval.h:289
uiString uiNrDoneText() const
will be nrDoneText() in 7.x
Definition: arrayndalgo.h:972
int nrSteps() const
Definition: ranges.h:791
#define od_int64
Definition: plftypes.h:35
T getMin(const ArrayND< T > &in)
returns the Minimum of all defined values in the ArrrayND. Returns UDF if empty or only udfs encounte...
Definition: arrayndalgo.h:224
mODTextTranslationClass(ArrayUdfValRestorer) public
Definition: arrayndalgo.h:2171
WindowType
Definition: arrayndalgo.h:351
T getSumX2MY2(const ArrayND< T > &in1, const ArrayND< T > &in2, bool noudf, bool parallel)
returns the sum of subtracted squarred amplitudes of two arrays
Definition: arrayndalgo.h:1912
mODTextTranslationClass(ArrayUdfValReplacer) public
Definition: arrayndalgo.h:2006
T getRMS(const ArrayND< T > &in, bool noudf, bool parallel)
return the RMS of the array
Definition: arrayndalgo.h:1841
#define mExpClass(module)
Definition: commondefs.h:177
ArrayND< ArrType > & outarr_
Definition: arrayndalgo.h:1487
T atIndex(int) const
Definition: ranges.h:695
mODTextTranslationClass(Array3DCopier) public
Definition: arrayndalgo.h:957
virtual void set(int, int, int, T)=0
double shift_
Definition: arrayndalgo.h:1490
double f1_
Definition: arrayndalgo.h:1125
virtual const Array3DInfo & info() const =0
@ Order1
Definition: arrayndalgo.h:1100
#define mDefParallelCalcBody(preop, impl, postop)
Definition: paralleltask.h:278
static uiString sInline(int num=1)
Definition: uistrings.h:406
BinID start_
Definition: trckeysampling.h:142
bool ArrayNDCopy(ArrayND< T > &dest, const ArrayND< T > &src, const TypeSet< int > ©pos, bool srcperiodic=false)
Definition: arrayndalgo.h:608
Definition: arrayndalgo.h:2171
bool doWork(od_int64 start, od_int64 stop, int)
Definition: arrayndalgo.h:2060
LargeValVec< od_uint64 > * undefidxs_
Definition: arrayndalgo.h:2152
Definition: arrayndalgo.h:1211
T * arr()
Definition: valseries.h:362
#define mDynamicCastGet(typ, out, in)
Definition: commondefs.h:148
void setScaler(double scaler, bool forx=true)
Definition: arrayndalgo.h:1451
void getScaledArray(const ArrayND< T > &in, ArrayND< T > *out_, double fact, double shift, bool noudf, bool parallel)
returns a scaled array
Definition: arrayndalgo.h:1689
bool noudf_
Definition: arrayndalgo.h:1621
virtual int getSize(int dim) const =0
bool dosqout_
Definition: arrayndalgo.h:1230
IdxType & trcNr()
Definition: posidxpair.h:48
#define mSetResAndContinue(res)
Definition: arrayndalgo.h:1409
const ValueSeries< T > * getStorage() const
Definition: arraynd.h:45
bool hasUndefs(const Array1D< fT > &in)
Returns whether there are undefs in the Array1D.
Definition: arrayndalgo.h:246
void setReplacementValue(T val)
Definition: arrayndalgo.h:2037
const PosInfo::CubeData & trcssampling_
Definition: arrayndalgo.h:2308
const TrcKeySampling & tksin_
Definition: arrayndalgo.h:946
bool Array2DPaste(Array2D< T > &dest, const Array2D< T > &src, int p0, int p1, bool destperiodic=false)
Definition: arrayndalgo.h:733
bool set(const TypeSet< Coord > &, const IDXABLE &valuelistj)
Definition: arrayndalgo.h:1144
uiString uiMessage() const
will be message() again in 7.x
Definition: arrayndalgo.h:1564
if(!noudf_ &&(mIsUdf(inpval)))
Definition: arrayndalgo.h:1682
Array1D ( Subclass of ArrayND ) is a one dimensional array.
Definition: arraynd.h:111
@ Order2
Definition: arrayndalgo.h:1100
unsigned int Abs(unsigned int i)
Definition: math2.h:79
virtual const Array1DInfo & info() const =0
const od_int64 totalnr_
Definition: arrayndalgo.h:1080
const ArrayND< ArrType > & xarr_
Definition: arrayndalgo.h:1485
bool operator==(const PolyTrend &) const
void setValue(int idx, float val)
Definition: arrayndalgo.h:367
uiString uiMessage() const
will be message() again in 7.x
Definition: arrayndalgo.h:1448
virtual void setND(const int *, T)=0
const ArrayOperExecSetup & setup_
Definition: arrayndalgo.h:1481
void setYVals(const ArrayND< ArrType > &yvals)
Definition: arrayndalgo.h:1450
void initOrder2(const TypeSet< Coord > &, const TypeSet< double > &)
Implementation of ArrayNDInfo.
Definition: arrayndinfo.h:288
Hor+Vert sampling in 3D surveys.
Definition: trckeyzsampling.h:35
const ArrayND< ArrType > * yarr_
Definition: arrayndalgo.h:1486
void setOffset(int64_t no)
Definition: valseries.h:377
od_int64 nrIterations() const
Definition: arrayndalgo.h:2251
void setYVals(const ArrayND< AT > &yvals)
Definition: arrayndalgo.h:1261
Parallel task for computing the element wise operations of one array and optionally a second input ar...
Definition: arrayndalgo.h:1430
double yfact_
Definition: arrayndalgo.h:1489
Threads::Mutex lck_
Definition: arrayndalgo.h:2156
MathFunction based on bend points.
Definition: mathfunc.h:151
CumArrOperExec(const ArrayND< AT > &xvals, bool noudf, const ArrayOperExecSetup &setup)
Definition: arrayndalgo.h:1246
ValueSeries of offsets.
Definition: valseries.h:70
Array3D ( Subclass of ArrayND ) is a three dimensional array.
Definition: arraynd.h:162
Positioning in a seismic survey: inline/crossline or lineNr/trcNr.
Definition: binid.h:31
BinID atIndex(int i0, int i1) const
A cartesian coordinate in 2D space.
Definition: coord.h:25
mODTextTranslationClass(Array3DUdfTrcRestorer) public
Definition: arrayndalgo.h:2231
IdxType & lineNr()
Definition: posidxpair.h:43
CumSumExec(const T *vals, od_int64 sz, bool noudf)
Definition: arrayndalgo.h:1556
static uiString tr(const char *text, const char *disambiguation=nullptr, int pluralnr=-1)
Definition: paralleltask.h:66
T getSumSq(const ArrayND< T > &in, bool noudf, bool parallel)
returns the sum of squarred amplitudes of the array
Definition: arrayndalgo.h:1797
T getAverage(const ArrayND< T > &in, bool noudf, bool parallel)
returns the average amplitude of the array
Definition: arrayndalgo.h:1654
mODTextTranslationClass(Array2DCopier)
virtual const ArrayNDInfo & info() const =0
double f22_
Definition: arrayndalgo.h:1129
Type
Definition: angles.h:26
InterpolType
Definition: mathfunc.h:154
T getSumX2PY2(const ArrayND< T > &in1, const ArrayND< T > &in2, bool noudf, bool parallel)
returns the sum of summed squarred amplitudes of two arrays
Definition: arrayndalgo.h:1895
uiString uiMessage() const
will be message() again in 7.x
Definition: arrayndalgo.h:845
double xfact_
Definition: arrayndalgo.h:1488
bool setGlobalPos(int64_t)
Definition: arraynd.h:293
#define mDeclareAndTryAlloc(tp, var, stmt)
Creates variable, try to alloc and catch bad_alloc.
Definition: commondefs.h:253
od_int64 nrIterations() const
Definition: arrayndalgo.h:2187
Tapers the N-dimentional ArrayND with a windowFunction.
Definition: arrayndalgo.h:349
static bool getOrder(int nrpoints, Order &, uiString *=0)
bool doWork(od_int64, od_int64, int)
Definition: arrayndalgo.h:1495
const PosInfo::CubeData * trcssampling_
Definition: arrayndalgo.h:2154
#define mComputeTrendAandB(sz)
Definition: arrayndalgo.h:27
Definition: arrayndalgo.h:1214
od_int64 nrIterations() const
Definition: arrayndalgo.h:1274
od_int64 nrIterations() const
Definition: arrayndalgo.h:1462
bool isDefined() const
Definition: geometry.h:364
bool doPrepare(int nrthreads)
Definition: arrayndalgo.h:1574
StepInterval< int > lineRange() const
bool getInterSection(const TrcKeySampling &, TrcKeySampling &) const
Returns false if intersection is empty.
uiString uiNrDoneText() const
will be nrDoneText() in 7.x
Definition: arrayndalgo.h:2247
#define mClass(module)
Definition: commondefs.h:181
bool doWork(od_int64, od_int64, int)
Definition: arrayndalgo.h:1332
double yfact_
Definition: arrayndalgo.h:1326
bool Array3DPaste(Array3D< T > &dest, const Array3D< T > &src, int p0, int p1, int p2, bool destperiodic=false)
Definition: arrayndalgo.h:771
mODTextTranslationClass(PolyTrend)
Transfers the common samples from one 3D array to another.
Definition: arrayndalgo.h:957
const int * getPos() const
Definition: arraynd.h:220
bool doWork(od_int64 start, od_int64 stop, int threadidx)
Definition: arrayndalgo.h:1579
static uiString phrJoinStrings(const uiString &a, const uiString &b)
"
T getSum() const
Definition: arrayndalgo.h:1566
int lineIdx(Pos::LineID) const
Definition: trckeysampling.h:231
Iterates through all samples in an ArrayND.
Definition: arraynd.h:209
T replval_
Definition: arrayndalgo.h:2151
bool removeBias(ArrayND< T > &inout)
Removes the bias from an ArrayND.
Definition: arrayndalgo.h:142
Array2DCopier(const Array2D< T > &in, const TrcKeySampling &tksin, const TrcKeySampling &tksout, Array2D< T > &out)
Definition: arrayndalgo.h:821
bool buildWindow(const char *winnm, float pval)
@ CosTaper5
Definition: arrayndalgo.h:352
void setND(const int *pos, T v)
Definition: arraynd.h:116
bool doFinish(bool success)
Definition: arrayndalgo.h:1598
Array2D< T > & out_
Definition: arrayndalgo.h:949
T getAverage(const ArrayND< T > &in)
returns the average of all defined values in the Arrray1D. Returns UDF if empty or only udfs encounte...
Definition: arrayndalgo.h:176
float * getValues() const
Definition: arrayndalgo.h:365
bool isOK() const
Definition: arrayndalgo.h:362
uint64_t totalSize() const
Definition: arraynd.h:87
uiString od_static_tr(const char *function_name, const char *text, const char *disambiguation=nullptr, int pluralnr=-1)
TrcKeySampling commontks_
Definition: arrayndalgo.h:948
ArrayND< T > & inp_
Definition: arrayndalgo.h:2150
uiString uiMessage() const
will be message() again in 7.x
Definition: arrayndalgo.h:970
static uiString sTrcFinished()
Definition: paralleltask.h:89
virtual T get(int p0, int p1, int p2) const =0
od_int64 sz_
Definition: arrayndalgo.h:1620
T getSumProduct(const ArrayND< T > &in1, const ArrayND< T > &in2, bool noudf, bool parallel)
returns the sum of product amplitudes between two vectors
Definition: arrayndalgo.h:1766
bool noudf_
Definition: arrayndalgo.h:1320
uiString uiNrDoneText() const
will be nrDoneText() in 7.x
Definition: arrayndalgo.h:1563
Definition: arrayndalgo.h:2006
float * window_
Definition: arrayndalgo.h:427
double f12_
Definition: arrayndalgo.h:1128
static uiString sDone()
Definition: uistrings.h:348
ArrayOperExecSetup(bool doadd=true, bool dosqinp=false, bool dosqout=false, bool doabs=false, bool donormalizesum=false, bool dosqrtsum=false)
Definition: arrayndalgo.h:1216
bool dosqinp_
Definition: arrayndalgo.h:1229
mDefParallelCalc4Pars(ProdExec, od_static_tr("ProdExec","Array product executor"), const T *, arr1, const T *, arr2, T *, out, bool, noudf) mDefParallelCalcBody(
Array3D< T > & outp_
Definition: arrayndalgo.h:2310
const od_int64 totalnr_
Definition: arrayndalgo.h:2312
void set(T &_to, const F &fr)
template based type conversion
Definition: convert.h:27
Contains the information about the size of Array3D, and in what order the data is stored (if accessab...
Definition: arrayndinfo.h:147
bool doPrepare(int)
Definition: arrayndalgo.h:1466
bool removeTrend(ArrayND< T > &inout)
Removes a linear trend from an ArrayND.
Definition: arrayndalgo.h:158
virtual const Array2DInfo & info() const =0
uiString uiNrDoneText() const
will be nrDoneText() in 7.x
Definition: arrayndalgo.h:2035
od_int64 nrIterations() const
Definition: arrayndalgo.h:2048
T * sysMemValueSet(T *, T, int64_t nrsamp)
Definition: odmemory.h:465
void sysMemCopy(void *, const void *, int64_t)
virtual T getND(const int *) const =0
Generalization of a task that can be run in parallel.
Definition: paralleltask.h:66
bool Array3DCopy(Array3D< T > &dest, const Array3D< T > &src, int p0, int p1, int p2, bool srcperiodic=false)
Definition: arrayndalgo.h:647
bool donormalizesum_
Definition: arrayndalgo.h:1232
bool doPrepare(int)
Definition: arrayndalgo.h:2052
ArrayNDInfoImpl size_
Definition: arrayndalgo.h:428
RT getSum() const
Definition: arrayndalgo.h:1270
void setOrder(PolyTrend::Order t)
Definition: arrayndalgo.h:1106
#define mCast(tp, v)
Definition: commondefs.h:137
int trcIdx(Pos::TraceID) const
Definition: trckeysampling.h:239
virtual bool getArrayPos(uint64_t, int *) const
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size.
Definition: bufstring.h:40
double getSumProductD(const ArrayND< T > &in1, const ArrayND< T > &in2, bool noudf, bool parallel)
Definition: arrayndalgo.h:1780
uiString uiNrDoneText() const
will be nrDoneText() in 7.x
Definition: arrayndalgo.h:1258
@ None
Definition: networkcommon.h:33
const TrcKeyZSampling & tkzsin_
Definition: arrayndalgo.h:1078
ArrayNDWindow(const ArrayNDInfo &, bool rectangular, const char *winnm, float paramval=mUdf(float))
const Array3D< T > & in_
Definition: arrayndalgo.h:1082
const od_int64 totalnr_
Definition: arrayndalgo.h:2223
void add(xT x, yT y)
Definition: mathfunc.h:405
Implementation of Array2D.
Definition: arrayndimpl.h:102
Implementation of Array2DInfo.
Definition: arrayndinfo.h:212
bool doWork(od_int64 start, od_int64 stop, int)
Definition: arrayndalgo.h:2191
uiString uiNrDoneText() const
will be nrDoneText() in 7.x
Definition: arrayndalgo.h:2183
Order order_
Definition: arrayndalgo.h:1123
bool setType(const char *, float paramval=mUdf(float))
String that is able to hold international (UTF-8) strings for the user interface.
Definition: uistring.h:121
bool dosqrtsum_
Definition: arrayndalgo.h:1233
mDefParallelCalc5Pars(ScalingExec, od_static_tr("ScalingExec","Array scaler executor"), const T *, arrin, T *, arrout, T, fact, T, shift, bool, noudf) mDefParallelCalcBody(
const ArrayOperExecSetup & setup_
Definition: arrayndalgo.h:1318
bool removeLinPart(const ArrayND< T > &in_, ArrayND< T > *out, bool trend)
[do not use, helper function]
Definition: arrayndalgo.h:37
ArrayNDWindow(const ArrayNDInfo &, bool rectangular, WindowType=Hamming)
T getSumXMY2(const ArrayND< T > &in1, const ArrayND< T > &in2, bool noudf, bool parallel)
returns the sum of squarred differences of two arrays
Definition: arrayndalgo.h:1877
bool doPrepare(int nrthreads)
Definition: arrayndalgo.h:1278
T dePeriodize(T val, T period)
Definition: periodicvalue.h:25
T y
Definition: geometry.h:68
@ Order0
Definition: arrayndalgo.h:1100
T getNorm2(const ArrayND< T > &in, bool noudf, bool parallel)
return the Norm-2 of the array
Definition: arrayndalgo.h:1812
Order
Definition: arrayndalgo.h:1100
Coord posc_
Definition: arrayndalgo.h:1130
Array3D< T > & out_
Definition: arrayndalgo.h:1083
An ArrayND is an array with a given number of dimensions and a size.
Definition: arraynd.h:33
bool doFinish(bool success)
Definition: arrayndalgo.h:1288
uiString uiMessage() const
will be message() again in 7.x
Definition: arrayndalgo.h:2181
void initCenter(const TypeSet< Coord > &)
const T * vals_
Definition: arrayndalgo.h:1624
T getSum(const ArrayND< T > &in, bool noudf, bool parallel)
returns the sum of all defined values in the Array. Returns UDF if empty or only udfs encountered.
Definition: arrayndalgo.h:1633
const T inpval
Definition: arrayndalgo.h:1681
bool doadd_
Definition: arrayndalgo.h:1228
offset_type total_size_type
Definition: arrayndinfo.h:33
T getResidual(const ArrayND< T > &in1, const ArrayND< T > &in2, bool noudf, bool parallel)
returns the residual differences of two arrays
Definition: arrayndalgo.h:1858
virtual void setValue(int64_t, T)
Definition: valseries.h:45
#define mPlural
Definition: uistrings.h:18
float paramval_
Definition: arrayndalgo.h:432
T x
Definition: geometry.h:67
od_int64 nrIterations() const
Definition: arrayndalgo.h:1570
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:274
virtual int getNDim() const =0
size_type size() const
Definition: typeset.h:321
virtual void set(int, int, T)=0
od_int64 nrIterations() const
Definition: arrayndalgo.h:976
const od_int64 totalnr_
Definition: arrayndalgo.h:2155
void setSampling(const TrcKeySampling &tks, const PosInfo::CubeData *trcssampling)
Definition: arrayndalgo.h:2039
TypeSet< T > sumvals_
Definition: arrayndalgo.h:1623
yT getValue(xT x) const
Definition: mathfunc.h:167
bool doPrepare(int)
Definition: arrayndalgo.h:986
uiString uiMessage() const
will be message() again in 7.x
Definition: arrayndalgo.h:1259
const T val2
Definition: arrayndalgo.h:1706
const TrcKeySampling & tks_
Definition: arrayndalgo.h:2309
bool rectangular_
Definition: arrayndalgo.h:429
static uiString sPosFinished()
Definition: paralleltask.h:88
void getSumArrays(const ArrayND< T > &in1, const ArrayND< T > &in2, ArrayND< T > &out, double fact1, double fact2, bool noudf, bool parallel)
computes the sum array between two arrays with scaling
Definition: arrayndalgo.h:1714
mDefParallelCalc6Pars(SumExec, od_static_tr("SumExec","Array addition executor"), const T *, arr1, const T *, arr2, T *, out, T, fact1, T, fact2, bool, noudf) mDefParallelCalcBody(
bool doPrepare(int)
Definition: arrayndalgo.h:862
void setShift(double shift)
Definition: arrayndalgo.h:1458
bool doWork(od_int64 start, od_int64 stop, int)
Definition: arrayndalgo.h:894
bool doWork(od_int64 start, od_int64 stop, int)
Definition: arrayndalgo.h:2255
T getMax(const ArrayND< T > &in)
returns the Maximum of all defined values in the ArrrayND. Returns UDF if empty or only udfs encounte...
Definition: arrayndalgo.h:201
mODTextTranslationClass(CumSumExec)
void apply(const Coord &pos, bool dir, T &) const
Definition: arrayndalgo.h:1178
const Array2D< T > & in_
Definition: arrayndalgo.h:945
RT cumsum_
Definition: arrayndalgo.h:1327
bool canCopyAll() const
Definition: arrayndalgo.h:856
double f0_
Definition: arrayndalgo.h:1124
bool includes(const TrcKeySampling &, bool ignoresteps=false) const
#define mNINT32(x)
Definition: commondefs.h:58
od_uint64 sz_
Definition: arrayndalgo.h:1482
arrout_[idx]
Definition: arrayndalgo.h:1684
mDeclareEnumUtils(WindowType)
virtual T get(int) const =0
Parallel task for computing the sum of element wise operations of one array and optionally a second i...
Definition: arrayndalgo.h:1244
uiString uiNrDoneText() const
will be nrDoneText() in 7.x
Definition: arrayndalgo.h:1447
mODTextTranslationClass(CumArrOperExec)
const ArrayND< AT > * yarr_
Definition: arrayndalgo.h:1324
const TrcKeySampling * tks_
Definition: arrayndalgo.h:2153
bool noudf_
Definition: arrayndalgo.h:1483
Array2D ( Subclass of ArrayND ) is a two dimensional array.
Definition: arraynd.h:140
const T * getData() const
Definition: arraynd.h:54
const TrcKeySampling & tksout_
Definition: arrayndalgo.h:947
ArrOperExec(const ArrayND< ArrType > &xvals, const ArrayND< ArrType > *yvals, bool noudf, const ArrayOperExecSetup &setup, ArrayND< ArrType > &outvals)
Definition: arrayndalgo.h:1432
float getParamVal() const
Definition: arrayndalgo.h:364
Polynomial trend with order 0 (mean), 1 (linear) or 2 (parabolic) The trend is derived from a set of ...
Definition: arrayndalgo.h:1094
out_[idx]
Definition: arrayndalgo.h:1709
bool resize(const ArrayNDInfo &)
const LargeValVec< od_uint64 > & undefidxs_
Definition: arrayndalgo.h:2221
bool interpUdf(Array1D< fT > &in, typename BendPointBasedMathFunction< fT, fT >::InterpolType ipoltyp=BendPointBasedMathFunction< fT, fT >::Poly)
Definition: arrayndalgo.h:311
Order getOrder() const
Definition: arrayndalgo.h:1113
Generated at
for the OpendTect
seismic interpretation project.
Copyright (C): dGB Beheer B.V. 1995-2021