[Developers] The DataPointSet

Bert Bril Bert.Bril at opendtect.org
Sat May 10 09:53:42 CEST 2008


Hi all,

Going from 2.4 to 3.0, on the architecture level, one of the big  
advancements was the introduction of the DataPack. The DataPack allows  
us to define packs of data that can be shared amongst different parts  
of Opendtect. The interface of DataPack allows us to query memory  
consumption, data pack category and a few more things. DataPacks can  
be managed by a DataPackManager. In principle, you can make your own  
DataPackManagers, but this tool will be the most useful when using one  
of the 'standard' Data Pack Managers.

Helene posted an article centered around FlatDataPacks in August last year:
http://lists.opendtect.org/pipermail/developers/2007-August/000083.html

A standard DataPackManager is usually tied to one type of DataPack.  
The memory handling is through a simple, active reference counting  
scheme (by the DataPackManager), where you can get a reference to the  
pack in two modes: 'obtain' and 'observe_only'. The latter may be  
useful when you want to know whenever a new DataPack is added, but you  
don't want to lock the existence of the DataPack. In the former mode,  
the DataPack is destructed only when the last obtainer releases the  
data pack. We are using DataPacks more and more, for example this year  
I expect we migrate the entire EarthModel management into the DataPack  
system.

In 3.2 (and 3.1.7) a new DataPack is available: the PointDataPack.  
(General/datapointset.h). This DataPack specifies 2D and 3D positioned  
(BinID or trace number with Coordinates) sets of data vectors. An  
implementation of this is the DataPointSet. The DataPointSet  
represents a set of data vectors with full positioning in 2D or 3D. It  
is based upon the PosVecDataSet which in turn is based on the  
BinIDValueSet. Going from there:
* The PosVecDataSet adds meaning to the columns of the BinIDValueSet
* The DataPointSet adds precise positioning (stores offset from BinID  
location), a selection/grouping system, and for 2D: trace numbers. The  
DataPointsSet is either 2D or 3D.

The DataPointSet hides all of the BinIDValueSet interface, and most of  
the PosVecDataSet interface. It is designed to optimize quick and easy  
access to the data, not to optimize changing the data. Every time you  
make one or more changes to the data, you have to prepare the set for  
usage with a call to dataChanged().

Some benefits of the DataPointSet:
* Every vector is always fully positioned
* The availability of a rich editor: uiDataPointSet.
* DataPointSets can be created using the Pos::Provider/Pos::Filter toolkit
* Grouping, selection and removal per vector as a flag, meaning that  
the data point set does not change

I'll get back to this in subsequent postings.


Bert

-- 
-- Bert Bril / OpendTect developer at dGB
-- Nijverheidstraat 11-2, 7511 JM Enschede, The Netherlands
-- mailto:Bert.Bril at opendtect.org , http://opendtect.org
-- Tel: +31 534315155 , Fax: +31 534315104




More information about the Developers mailing list