

I want to change the function of probability density function in Opendtect, from Gaussian to Kernel.
It's going to be a lot of programming, partly in the core OpendTect classes.
First of all you need to make a subclasses of ProbDenFunc that works. The easiest way to go about is to look at how it's done for the Gaussian PDF's (Algo/gaussianprobdenfunc.h and .cc).
Once you have that implemented you'll have to modify the UI classes in uiIo (for example uiEditPDF). Currently, OpendTect only recognises two types: Gaussian and Sampled. There is no factory. So you'll have to adapt the OpendTect base code.
Maybe the best thing to do is to have user specify the parameters of your PDF, then generate a Sampled PDF from that. That could be a quite simple implementation path that can be done from a plugin.
/Bert

Need your advice the script to be edited to change the calculation in dpsdensitycalc.cc just like gaussianprobdenfunc.cc.
DPSDensityCalcND::CalcAreaType areatype = DPSDensityCalcND::All;
if ( createfrmfld_ )
areatype =(DPSDensityCalcND::CalcAreaType) createfrmfld_->currentItem();
DPSDensityCalcND denscalc( dps_, axisparams, pdf.getData(), areatype );
if ( plotter_ )
denscalc.setGroup( plotter_->curGroup() );
uiTaskRunner taskrunner( this );
TaskRunner::execute( &taskrunner, denscalc );
The script of dpsdensitycalc.cc
float DPSDensityCalcND::getVal( int dcid, int drid ) const
{
if ( dcid >= 0 )
{
const float val = dps_.value( dcid, drid );
const UnitOfMeasure* mu = dps_.colDef( dcid ).unit_;
return mu ? mu->userValue(val) : val;
}
else if ( dcid == -1 )
{
const float val = dps_.z( drid );
return val*SI().zDomain().userFactor();
}
return dcid == (float) ( -3 ? dps_.coord(drid).x_ : dps_.coord(drid).y_ );
}
Regards,
Anne Queentina
--
You received this message because you are subscribed to the Google Groups "OpendTect Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+unsubscribe@opendtect.org.
To post to this group, send email to devel...@opendtect.org.
Visit this group at https://groups.google.com/a/opendtect.org/group/developers/.
To view this discussion on the web visit https://groups.google.com/a/opendtect.org/d/msgid/developers/9c7010f7-77a1-17db-c7bc-0fd194cc35aa%40dgbes.com.