[Developers] The new uiPosDataEdit class

Bert Bril Bert.Bril at opendtect.org
Wed May 11 14:37:39 CEST 2005


Hi all,


In the new version 2.0.3 we have added a nice tool for inspection of 
positioned data (e.g. crossplotting). It was made by Duntao Wei and it's 
located in uiTools.

At the moment, the base system has no way for users to access the 
functionality, but in plugins you can easily get hold of it, which is 
what we've done for dGB's NN stuff. On my TODO there is a tool which 
uses this to display the results of extracting attribute values at 
PickSet locations.

The data needs to be in a PosVecDataSet (General/posvecdataset.h), which 
consists of the actual data in a BinIDValueSet (Basic/binidvalset.h) and 
the column definitions in DataColDef objects (General/datacoldef.h).

Then, you can construct a uiPosDataEdit. Because this object can edit 
multiple data sets in different tabs, it accepts an ObjectSet of 
PosVecDataSet's.

I've put a simple one-shot example plugin (38 lines of code) in the 
plugins/uiPDEEx directory on the CVS server. If you don't do CVS, you 
can also unpack this in the directory that contains opendtect-2.0:
ftp://ftp.opendtect.org/pub/tmp/uipdeex.zip
A screen shot is:
ftp://ftp.opendtect.org/pub/tmp/uipdeex.jpg


The code that really does the work looks like this:

     PosVecDataSet vds( "Simple test data" );
     vds.colDef(0).name_ = "Depth below horizon";
     vds.add( new DataColDef( "Porosity", "POR-NPHI" ) );
     vds.data().add( BinID(100,200), 123, 4.56 );
     vds.data().add( BinID(101,201), 223, 5.56 );
     vds.data().add( BinID(101,202), 423, 3.56 );

     ObjectSet<PosVecDataSet> vdss;
     vdss += &vds;
     uiPosDataEdit dlg( ODMainWin(), vdss );
     dlg.go();



Bert

-- 
-- Bert Bril / OpendTect developer at dGB
-- Boulevard 1945 - 24, 7511 AE Enschede, The Netherlands
-- mailto:Bert.Bril at opendtect.org , http://www.opendtect.org
-- Tel: +31 534315155 , Fax: +31 534315104




More information about the Developers mailing list