diff --git a/CHANGES.MD b/CHANGES.MD index c32ca23..5d75bb7 100644 --- a/CHANGES.MD +++ b/CHANGES.MD @@ -18,6 +18,11 @@ ### Mistie Analysis - fix crash when estimating misties for depth surveys +### wmodpy - OpendTect Python Bindings +A decision was made to discontinue development of these within WMPlugins in favour of moving the code +into the dGB managed OpendTect open source code repository system on Github. The new repository will be +called "odpybind". + ## Release 6.6.9 ### AVOPolarAttrib - Fix attribute calculation on time slices and horizons diff --git a/plugins/EFDAttrib/efdmodesattrib.cc b/plugins/EFDAttrib/efdmodesattrib.cc index 09cd274..d6b5eec 100644 --- a/plugins/EFDAttrib/efdmodesattrib.cc +++ b/plugins/EFDAttrib/efdmodesattrib.cc @@ -37,7 +37,6 @@ void EFDModesAttrib::initClass() mAttrStartInitClassWithDescAndDefaultsUpdate IntParam* nrmodes = new IntParam( nrmodesStr() ); - nrmodes->setLimits( 1, 20 ); nrmodes->setDefaultValue( 5 ); desc->addParam( nrmodes ); diff --git a/plugins/EFDAttrib/efdspectrumattrib.cc b/plugins/EFDAttrib/efdspectrumattrib.cc index c5e1718..0fe55f8 100644 --- a/plugins/EFDAttrib/efdspectrumattrib.cc +++ b/plugins/EFDAttrib/efdspectrumattrib.cc @@ -36,8 +36,6 @@ void EFDSpectrumAttrib::initClass() mAttrStartInitClassWithDescAndDefaultsUpdate IntParam* nrmodes = new IntParam( nrmodesStr() ); - nrmodes->setLimits( 1, 20 ); - nrmodes->setDefaultValue( 5 ); desc->addParam( nrmodes ); FloatParam* step = new FloatParam( stepStr() ); diff --git a/plugins/uiEFDAttrib/uiefdmodesattrib.cc b/plugins/uiEFDAttrib/uiefdmodesattrib.cc index 1548255..450ba71 100644 --- a/plugins/uiEFDAttrib/uiefdmodesattrib.cc +++ b/plugins/uiEFDAttrib/uiefdmodesattrib.cc @@ -24,7 +24,6 @@ #include "survinfo.h" #include "uiattribfactory.h" #include "uiattrsel.h" -#include "uigeninput.h" #include "uibutton.h" #include "uispinbox.h" #include "trckeyzsampling.h" @@ -43,14 +42,15 @@ uiEFDModesAttrib::uiEFDModesAttrib( uiParent* p, bool is2d ) { inpfld_ = createInpFld( is2d ); - IntInpSpec inspec( 5, 1, 20 ); - nrmodesfld_ = new uiGenInput( this, tr("Number of Modes"), inspec ); + nrmodesfld_ = new uiLabeledSpinBox( this, tr("Number of Modes") ); + nrmodesfld_->box()->setInterval(1, 100); + nrmodesfld_->box()->setValue(5); nrmodesfld_->attach( alignedBelow, inpfld_ ); - mAttachCB(nrmodesfld_->valuechanged,uiEFDModesAttrib::nrmodesChgCB); + mAttachCB(nrmodesfld_->box()->valueChanged,uiEFDModesAttrib::nrmodesChgCB); outmodefld_ = new uiLabeledSpinBox(this, tr("Output Mode")); outmodefld_->attach( alignedBelow, nrmodesfld_ ); - outmodefld_->box()->setInterval(0, inspec.value()-1); + outmodefld_->box()->setInterval(0, nrmodesfld_->box()->getIntValue()-1); outmodefld_->box()->setValue(0); uiString butstr = tr("Display EFD Modes panel"); @@ -68,19 +68,18 @@ uiEFDModesAttrib::~uiEFDModesAttrib() void uiEFDModesAttrib::nrmodesChgCB( CallBacker* ) { - const int mxmodes = nrmodesfld_->getIntValue(); + const int mxmodes = nrmodesfld_->box()->getIntValue(); const int selmode = mMIN(mxmodes-1, outmodefld_->box()->getIntValue()); outmodefld_->box()->setInterval( 0, mxmodes-1); outmodefld_->box()->setValue( selmode); } - bool uiEFDModesAttrib::setParameters( const Attrib::Desc& desc ) { if ( desc.attribName() != EFDModesAttrib::attribName() ) return false; - mIfGetInt(EFDModesAttrib::nrmodesStr(), nrmodes, nrmodesfld_->setValue(nrmodes)); + mIfGetInt(EFDModesAttrib::nrmodesStr(), nrmodes, nrmodesfld_->box()->setValue(nrmodes)); nrmodesChgCB(nullptr); return true; } @@ -103,7 +102,7 @@ bool uiEFDModesAttrib::getParameters( Attrib::Desc& desc ) if ( desc.attribName() != EFDModesAttrib::attribName() ) return false; - mSetInt( EFDModesAttrib::nrmodesStr(), nrmodesfld_->getIntValue() ); + mSetInt( EFDModesAttrib::nrmodesStr(), nrmodesfld_->box()->getIntValue() ); return true; } @@ -152,5 +151,5 @@ void uiEFDModesAttrib::showPosDlgCB( CallBacker* ) void uiEFDModesAttrib::fillTestParams( Attrib::Desc* desc ) const { - mSetParam(Int,nrmodes, EFDModesAttrib::nrmodesStr(), nrmodesfld_->getIntValue()) + mSetParam(Int,nrmodes, EFDModesAttrib::nrmodesStr(), nrmodesfld_->box()->getIntValue()) } diff --git a/plugins/uiEFDAttrib/uiefdmodesattrib.h b/plugins/uiEFDAttrib/uiefdmodesattrib.h index 992c372..b1710b7 100644 --- a/plugins/uiEFDAttrib/uiefdmodesattrib.h +++ b/plugins/uiEFDAttrib/uiefdmodesattrib.h @@ -22,7 +22,6 @@ namespace Attrib { class Desc; } class uiAttrSel; -class uiGenInput; class uiLabeledSpinBox; class uiPushButton; @@ -38,14 +37,13 @@ mExpClass(uiEFDAttrib) uiEFDModesAttrib : public uiAttrDescEd, public TestPanelA protected: uiAttrSel* inpfld_; - uiGenInput* nrmodesfld_; + uiLabeledSpinBox* nrmodesfld_; uiLabeledSpinBox* outmodefld_; uiAttribTestPanel* testpanel_ = nullptr; uiPushButton* modepanelbut_; void nrmodesChgCB(CallBacker*); - bool setParameters(const Attrib::Desc&); bool setInput(const Attrib::Desc&); bool setOutput(const Attrib::Desc&); diff --git a/plugins/uiEFDAttrib/uiefdspectrumattrib.cc b/plugins/uiEFDAttrib/uiefdspectrumattrib.cc index d77903a..89f980c 100644 --- a/plugins/uiEFDAttrib/uiefdspectrumattrib.cc +++ b/plugins/uiEFDAttrib/uiefdspectrumattrib.cc @@ -24,7 +24,6 @@ #include "survinfo.h" #include "uiattribfactory.h" #include "uiattrsel.h" -#include "uigeninput.h" #include "uibutton.h" #include "uispinbox.h" #include "trckeyzsampling.h" @@ -42,9 +41,12 @@ uiEFDSpectrumAttrib::uiEFDSpectrumAttrib( uiParent* p, bool is2d ) , TestPanelAdaptor() { inpfld_ = createInpFld( is2d ); + mAttachCB(inpfld_->selectionDone, uiEFDSpectrumAttrib::inputSel); - modesfld_ = new uiGenInput( this, tr("Number of Modes"), IntInpSpec(5, 1, 20)); - modesfld_->attach( alignedBelow, inpfld_ ); + nrmodesfld_ = new uiLabeledSpinBox(this, tr("Number of Modes")); + nrmodesfld_->box()->setInterval(1, 100); + nrmodesfld_->box()->setValue(5); + nrmodesfld_->attach( alignedBelow, inpfld_ ); uiString lbl; const bool zistime = SI().zDomain().isTime(); @@ -57,7 +59,7 @@ uiEFDSpectrumAttrib::uiEFDSpectrumAttrib( uiParent* p, bool is2d ) lbl = tr("Output Wavenumber (/kft)"); freqfld_ = new uiLabeledSpinBox( this, lbl, 1 ); - freqfld_->attach( alignedBelow, modesfld_ ); + freqfld_->attach( alignedBelow, nrmodesfld_ ); freqfld_->box()->doSnap( true ); stepfld_ = new uiLabeledSpinBox( this, uiStrings::sStep(), 1 ); @@ -121,7 +123,7 @@ bool uiEFDSpectrumAttrib::setParameters( const Attrib::Desc& desc ) if ( desc.attribName() != EFDSpectrumAttrib::attribName() ) return false; - mIfGetInt(EFDSpectrumAttrib::nrmodesStr(), nrmodes, modesfld_->setValue(nrmodes)); + mIfGetInt(EFDSpectrumAttrib::nrmodesStr(), nrmodes, nrmodesfld_->box()->setValue(nrmodes)); const float freqscale = zIsTime() ? 1.f : 1000.f; mIfGetFloat(EFDSpectrumAttrib::stepStr(), step, stepfld_->box()->setValue(step*freqscale) ); @@ -149,7 +151,7 @@ bool uiEFDSpectrumAttrib::getParameters( Attrib::Desc& desc ) if ( desc.attribName() != EFDSpectrumAttrib::attribName() ) return false; - mSetInt( EFDSpectrumAttrib::nrmodesStr(), modesfld_->getIntValue() ); + mSetInt( EFDSpectrumAttrib::nrmodesStr(), nrmodesfld_->box()->getIntValue() ); const float freqscale = zIsTime() ? 1.f : 1000.f; mSetFloat( EFDSpectrumAttrib::stepStr(), stepfld_->box()->getFValue()/freqscale ); return true; @@ -216,7 +218,7 @@ void uiEFDSpectrumAttrib::showPosDlgCB( CallBacker* ) void uiEFDSpectrumAttrib::fillTestParams( Attrib::Desc* desc ) const { - mSetParam(Int,nmodes, EFDSpectrumAttrib::nrmodesStr(), modesfld_->getIntValue()) + mSetParam(Int,nmodes, EFDSpectrumAttrib::nrmodesStr(), nrmodesfld_->box()->getIntValue()) //show Frequencies with a step of 1 in Time and 1e-3 in Depth, //independently of what the user can have specified previously diff --git a/plugins/uiEFDAttrib/uiefdspectrumattrib.h b/plugins/uiEFDAttrib/uiefdspectrumattrib.h index 14e34af..ad8a7b4 100644 --- a/plugins/uiEFDAttrib/uiefdspectrumattrib.h +++ b/plugins/uiEFDAttrib/uiefdspectrumattrib.h @@ -22,7 +22,6 @@ namespace Attrib { class Desc; } class uiAttrSel; -class uiGenInput; class uiLabeledSpinBox; class uiPushButton; @@ -39,7 +38,7 @@ mExpClass(uiEFDAttrib) uiEFDSpectrumAttrib : public uiAttrDescEd, public TestPan protected: uiAttrSel* inpfld_; - uiGenInput* modesfld_; + uiLabeledSpinBox* nrmodesfld_; uiLabeledSpinBox* freqfld_; uiLabeledSpinBox* stepfld_; uiAttribTestPanel* testpanel_ = nullptr;