 |
OpendTect
6.3
|
Go to the documentation of this file. 13 #define mInsertStart( idxvar, type, nrfunc ) \ 14 int idxvar = type##Index(type); \ 15 if ( idxvar<-nrtoinsert || idxvar>nrfunc-1+nrtoinsert ) \ 17 errmsg() = toUiString( \ 18 "Cannot insert row or column that is not connected to existing rows."); \ 21 const bool addedinfront = idxvar<0; \ 25 origin_.type() -= step_.type()*nrtoinsert; \ 28 const int curnrrows = nrRows(); \ 29 const int curnrcols = nrCols() 32 #define mReplaceVariable( variable ) \ 33 if ( new##variable ) \ 36 variable = new##variable; \ 40 #define mCloneRowVariable( type, variable, interpolfunc, udf ) \ 41 Array2D<type>* new##variable = variable \ 42 ? new Array2DImpl<type>(curnrrows+nrtoinsert,curnrcols) : 0; \ 43 for ( int idx=0; new##variable && idx<curnrrows+nrtoinsert; idx++ ) \ 45 for ( int idy=0; idy<curnrcols; idy++ ) \ 47 if ( idx>=rowidx && idx<rowidx+nrtoinsert ) \ 49 if ( idx>=curnrrows || idx<nrtoinsert ) \ 50 new##variable->set(idx,idy, udf ); \ 53 const float relrow = origin_.row() + \ 54 ((float) idx-rowidx)/(nrtoinsert+1)*step_.row(); \ 55 const Coord param( relrow, origin_.col()+idy*step_.col() ); \ 56 new##variable->set(idx,idy,(type) interpolfunc); \ 61 const int sourcerow = idx>rowidx ? idx-nrtoinsert : idx; \ 62 new##variable->set(idx,idy,variable->get(sourcerow,idy)); \ 66 mReplaceVariable( variable ) 71 #define mCloneColVariable( type, variable, interpolfunc, udf ) \ 72 Array2D<type>* new##variable = variable \ 73 ? new Array2DImpl<type>(curnrrows,curnrcols+nrtoinsert) : 0; \ 74 for ( int idx=0; new##variable && idx<curnrrows; idx++ ) \ 76 for ( int idy=0; idy<curnrcols+nrtoinsert; idy++ ) \ 78 if ( idy>=colidx && idy<colidx+nrtoinsert ) \ 80 if ( idy>=curnrcols || idy<nrtoinsert ) \ 81 new##variable->set(idx,idy, udf ); \ 84 const float relcol = origin_.col() + \ 85 ((float) idy-colidx)/(nrtoinsert+1)*step_.col(); \ 86 const Coord param( origin_.row()+idx*step_.row(), relcol ); \ 87 new##variable->set(idx,idy,(type) interpolfunc); \ 92 const int sourcecol = idy>colidx ? idy-nrtoinsert : idy; \ 93 new##variable->set(idx,idy,variable->get(idx,sourcecol)); \ 97 mReplaceVariable( variable )
Generated at
for the OpendTect
seismic interpretation project.
Copyright (C): dGB Beheer B. V. 2017