Skip to content

Commit

Permalink
Prepare for 6.6.11 release
Browse files Browse the repository at this point in the history
  • Loading branch information
waynegm committed Jan 24, 2023
1 parent 64a66bf commit 8cf1670
Show file tree
Hide file tree
Showing 20 changed files with 293 additions and 320 deletions.
4 changes: 4 additions & 0 deletions CHANGES.MD
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# OpendTect Plugins Release Notes

## Release 6.6.11
### uiGrid2D3DHorizon
- try and fix reported crashes

## Release 6.6.10
### AVOPolarAttrib
- Replace Nans and Infs with Undefined
Expand Down
13 changes: 7 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ set(CMAKE_CXX_STANDARD_REQUIRED True)
set ( OD_SUBSYSTEM "waynegm_plugin" )
set ( OpendTect_DIR "" CACHE PATH "OpendTect directory" )

if(${CMAKE_SOURCE_DIR}/VERSION.txt IS_NEWER_THAN ${CMAKE_SOURCE_DIR}/plugins/wm_include/version.h)
file(STRINGS ${CMAKE_SOURCE_DIR}/VERSION.txt content)
set(delim "===")
set(content "static const char* wm_version = R\"${delim}(${content})${delim}\";")
file(WRITE ${CMAKE_SOURCE_DIR}/plugins/wm_include/version.h "${content}")
endif()

if((NOT ${EIGEN3_INCLUDE_DIR}) OR (NOT EXISTS ${EIGEN3_INCLUDE_DIR}))
message("Unable to find system Eigen install - will use local")
execute_process(COMMAND git submodule update --init -- external/eigen
Expand Down Expand Up @@ -122,10 +129,4 @@ elseif( ${OD_PLFSUBDIR} STREQUAL "lux64" )
endif()
install(DIRECTORY ${CMAKE_SOURCE_DIR}/bin/python DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/ PATTERN "__pycache__" EXCLUDE)

if(${CMAKE_SOURCE_DIR}/VERSION.txt IS_NEWER_THAN ${CMAKE_SOURCE_DIR}/plugins/wm_include/version.h)
file(READ ${CMAKE_SOURCE_DIR}/VERSION.txt content)
set(delim "===")
set(content "static const char* wm_version = R\"${delim}(\n${content})${delim}\";")
file(WRITE ${CMAKE_SOURCE_DIR}/plugins/wm_include/version.h "${content}")
endif()

4 changes: 2 additions & 2 deletions README.MD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# OpendTect Plugins
# OpendTect Plugins

This is the source code for a collection of plugins for the open source seismic interpretation system [OpendTect](http://www.opendtect.org). All code is provided under the terms of the [GNU General Public License Version 3](./LICENSE.txt).

Expand All @@ -8,7 +8,7 @@ This is the source code for a collection of plugins for the open source seismic
</a>
</p>

As of 5-Jan-2020 code development in the master branch is for OpendTect 6.6. If you are interested in the latest source code for:
This branch is for OpendTect 6.6. If you are interested in source code for:

- OpendTect v6.4 please refer to the 6.4 branch
- OpendTect v5 please refer to the v5-stable branch
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.6.10
6.6.11
26 changes: 10 additions & 16 deletions plugins/uiGrid2D3DHorizon/idwgridder2d.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

#include "paralleltask.h"
#include "survinfo.h"
#include "uitaskrunner.h"

#include "nanoflann_extra.h"


mDefParallelCalc2Pars( IDWGlobalInterpolator, od_static_tr("IDWGlobalInterpolator","IDW global interpolation"),
const wmIDWGridder2D*, interp, Threads::Lock, lock )
mDefParallelCalcBody(
mDefParallelCalcBody(
const TypeSet<Coord>& locs_ = interp_->binLocs_;
const TypeSet<float>& vals_ = interp_->vals_;
const TrcKeySampling& hs_ = interp_->hs_;
Expand Down Expand Up @@ -100,7 +101,7 @@ typedef std::vector<std::pair<size_t,Pos::Ordinate_Type>> RadiusResultSet;

mDefParallelCalc3Pars( IDWLocalInterpolator, od_static_tr("IDWLocalInterpolator","IDW local interpolation"),
const wmIDWGridder2D*, interp, CoordKDTree&, index, Threads::Lock, lock )
mDefParallelCalcBody(
mDefParallelCalcBody(
const TypeSet<Coord>& locs_ = interp_->binLocs_;
const TypeSet<float>& vals_ = interp_->vals_;
const TrcKeySampling& hs_ = interp_->hs_;
Expand Down Expand Up @@ -174,33 +175,26 @@ grid_->set(ix, iy, fval);
wmIDWGridder2D::wmIDWGridder2D()
{}

bool wmIDWGridder2D::executeGridding(TaskRunner* tr)
bool wmIDWGridder2D::executeGridding(uiParent* p)
{
localInterp();
localInterp(p);
const CoordTypeSetAdaptor coords( binLocs_ );
CoordKDTree index( 2, coords );
Threads::Lock lock;

uiTaskRunner uitr(p);
uitr.setCaption((tr("IDW interpolation")));
if ( mIsUdf(maxpoints_) && mIsUdf(searchradius_) ) {
IDWGlobalInterpolator interp( interpidx_.size(), this, lock );
if (tr)
return TaskRunner::execute( tr, interp );
else
interp.execute();
uitr.execute(interp);
} else if ( !mIsUdf(maxpoints_) && mIsUdf(searchradius_) ) {
index.buildIndex();
IDWKNNInterpolator interp( interpidx_.size(), this, index, lock );
if (tr)
return TaskRunner::execute( tr, interp );
else
interp.execute();
uitr.execute(interp);
} else {
index.buildIndex();
IDWLocalInterpolator interp( interpidx_.size(), this, index, lock );
if (tr)
return TaskRunner::execute( tr, interp );
else
interp.execute();
uitr.execute(interp);
}

return true;
Expand Down
11 changes: 6 additions & 5 deletions plugins/uiGrid2D3DHorizon/idwgridder2d.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#ifndef idwgridder2d_h
#ifndef idwgridder2d_h
#define idwgridder2d_h

#include "wmgridder2d.h"
class uiParent;

class IDWGlobalInterpolator;
class IDWLocalInterpolator;
Expand All @@ -12,12 +13,12 @@ class wmIDWGridder2D : public wmGridder2D
friend class IDWGlobalInterpolator;
friend class IDWKNNInterpolator;
friend class IDWLocalInterpolator;

wmIDWGridder2D();
bool executeGridding(TaskRunner*);

bool executeGridding(uiParent*);
protected:

};


Expand Down
17 changes: 8 additions & 9 deletions plugins/uiGrid2D3DHorizon/ltpsgridder2d.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

#include "paralleltask.h"
#include "survinfo.h"
#include "uitaskrunner.h"

class AzimuthBinner
{
Expand Down Expand Up @@ -87,7 +88,7 @@ class AzimuthBinner
typedef std::vector<std::pair<size_t,Pos::Ordinate_Type>> RadiusResultSet;


mDefParallelCalc3Pars( LTPSInterpolator, od_static_tr("LTPSInterpolator","Local Thin-plate Spline interpolation"),
mDefParallelCalc3Pars( LTPSInterpolator, od_static_tr("LTPSInterpolator","LTPS interpolation"),
const wmLTPSGridder2D*, interp, CoordKDTree&, index, Threads::Lock, lock )
mDefParallelCalcBody(
const TypeSet<Coord>& locs_ = interp_->binLocs_;
Expand Down Expand Up @@ -168,22 +169,20 @@ grid_->set(ix, iy, (float)val);
wmLTPSGridder2D::wmLTPSGridder2D()
{}

bool wmLTPSGridder2D::executeGridding(TaskRunner* tr)
bool wmLTPSGridder2D::executeGridding(uiParent* p)
{
localInterp();
localInterp(p);
calcResidual();

const CoordTypeSetAdaptor coords( binLocs_ );
CoordKDTree nfindex( 2, coords );
Threads::Lock lock;
nfindex.buildIndex();
uiTaskRunner uitr(p);
uitr.setCaption(toUiString("Refine grid"));
LTPSInterpolator interp( interpidx_.size(), this, nfindex, lock );
if (tr)
return TaskRunner::execute( tr, interp );
else
interp.execute();

return true;
const bool res = uitr.execute(interp);
return res;
}

void wmLTPSGridder2D::calcResidual()
Expand Down
6 changes: 3 additions & 3 deletions plugins/uiGrid2D3DHorizon/ltpsgridder2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "wmgridder2d.h"

class uiParent;



Expand All @@ -27,8 +27,8 @@ class wmLTPSGridder2D : public wmGridder2D
friend class LTPSInterpolator;
wmLTPSGridder2D();
~wmLTPSGridder2D() {}
bool executeGridding(TaskRunner*);

bool executeGridding(uiParent*);
double basis( double r ) const;

protected:
Expand Down
17 changes: 9 additions & 8 deletions plugins/uiGrid2D3DHorizon/mbagridder2d.cc
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
#include "mbagridder2d.h"
#include "mba.hpp"
#include <array>
#include "uiparent.h"

wmMBAGridder2D::wmMBAGridder2D()
: maxlevels_(10)
{
{
}

bool wmMBAGridder2D::prepareForGridding()
bool wmMBAGridder2D::prepareForGridding(uiParent* p)
{
if (!wmGridder2D::prepareForGridding())
if (!wmGridder2D::prepareForGridding(p))
return false;

return true;
}

bool wmMBAGridder2D::executeGridding(TaskRunner* tr)
bool wmMBAGridder2D::executeGridding(uiParent* p)
{
localInterp(p);
std::vector<mba::point<2>> binLocs(binLocs_.size());
std::vector<float> vals(binLocs_.size());
for (int idx=0; idx<binLocs_.size(); idx++) {
Expand All @@ -26,11 +28,10 @@ bool wmMBAGridder2D::executeGridding(TaskRunner* tr)

mba::point<2> lo = {{ double(hs_.start_.inl()), double(hs_.start_.crl()) }};
mba::point<2> hi = {{ double(hs_.stop_.inl()), double(hs_.stop_.crl()) }};

mba::index<2> grid = {{ 2, 2 }};

mba::MBA<2> interp(lo, hi, grid, binLocs, vals, maxlevels_);

for (od_int64 idx=0; idx<interpidx_.size(); idx++) {
BinID gridBid = hs_.atIndex(interpidx_[idx]);
int ix = hs_.inlIdx(gridBid.inl());
Expand Down
13 changes: 7 additions & 6 deletions plugins/uiGrid2D3DHorizon/mbagridder2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@
#define mbagridder2d_h

#include "wmgridder2d.h"
class uiParent;

class wmMBAGridder2D : public wmGridder2D
{
public:
wmMBAGridder2D();
~wmMBAGridder2D() {}
bool prepareForGridding();
bool executeGridding(TaskRunner*);

bool prepareForGridding(uiParent*);
bool executeGridding(uiParent*);

protected:

int maxlevels_;

};

#endif
Expand Down
7 changes: 4 additions & 3 deletions plugins/uiGrid2D3DHorizon/nrngridder2d.cc
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#include "nrngridder2d.h"
#include "uiparent.h"

wmNRNGridder2D::wmNRNGridder2D()
{
{
}

bool wmNRNGridder2D::executeGridding(TaskRunner* tr)
bool wmNRNGridder2D::executeGridding(uiParent* p)
{
localInterp(false);
localInterp(p, false);

for (int idx=0; idx<interpidx_.size(); idx++) {
BinID gridBid = hs_.atIndex(interpidx_[idx]);
Expand Down
7 changes: 4 additions & 3 deletions plugins/uiGrid2D3DHorizon/nrngridder2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@

#include "wmgridder2d.h"

class uiParent;
// Nearest Neighbour gridder

class wmNRNGridder2D : public wmGridder2D
{
public:
wmNRNGridder2D();
~wmNRNGridder2D() {}
bool executeGridding(TaskRunner*);

bool executeGridding(uiParent*);

};


23 changes: 10 additions & 13 deletions plugins/uiGrid2D3DHorizon/uigrid2d3dhorizonmainwin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ uiGrid2D3DHorizonMainWin::uiGrid2D3DHorizonMainWin( uiParent* p )
enableSaveButton(tr("Display after create"));

IOPar par;
if (par.read(getParFileName(),0)) {
if (par.read(getParFileName(), "grid2d3d")) {
if (inputgrp_)
inputgrp_->usePar( par );
if (gridgrp_)
Expand All @@ -80,7 +80,6 @@ uiGrid2D3DHorizonMainWin::~uiGrid2D3DHorizonMainWin()
BufferString uiGrid2D3DHorizonMainWin::getParFileName()
{
FilePath fp(GetDataDir(), "Misc", "grid2d3d.par");
ErrMsg(fp.fullPath());
return fp.fullPath();
}

Expand All @@ -100,14 +99,14 @@ void uiGrid2D3DHorizonMainWin::tabSelCB( CallBacker* )
bool uiGrid2D3DHorizonMainWin::acceptOK( CallBacker*)
{
IOPar par;
inputgrp_->fillPar( par );
gridgrp_->fillPar( par );
BufferString tmp;
inputgrp_->fillPar(par);
gridgrp_->fillPar(par);
par.dumpPretty(tmp);
ErrMsg(tmp);
par.write(getParFileName(), 0);
par.write(getParFileName(), "grid2d3d");

FixedString method = par.find( wmGridder2D::sKeyMethod() );
FixedString method = par.find(IOPar::compKey(wmGridder2D::sKeyGridDef(), wmGridder2D::sKeyMethod()));
PtrMan<wmGridder2D> interpolator = wmGridder2D::create( method );
if ( !interpolator ) {
ErrMsg("uiGrid2D3DHorizonMainWin::acceptOK - selected interpolation method not found.");
Expand All @@ -126,13 +125,11 @@ bool uiGrid2D3DHorizonMainWin::acceptOK( CallBacker*)
return false;
}

{
if (!interpolator->prepareForGridding())
return false;
uiTaskRunner uitr(this);
uitr.setCaption(tr("Gridding"));
interpolator->executeGridding(&uitr);
}
uiUserShowWait uisw(this, tr("Loading data"));
if (!interpolator->prepareForGridding(this))
return false;

interpolator->executeGridding(this);

RefMan<EM::Horizon3D> hor3d = EM::Horizon3D::createWithConstZ(0.0, interpolator->getTrcKeySampling());
if (!hor3d) {
Expand Down
Loading

0 comments on commit 8cf1670

Please sign in to comment.