[Developers] 2D / 3D separation in opendTect
Helene Payraudeau
helene.payraudeau at dgb-group.com
Thu Dec 21 16:04:04 CET 2006
In past weeks I have made a lot of changes to OpendTect related to the
difference between 2D and 3D surveys.
We want to support surveys with both 2D and 3D data - this is a very
important feature we do not want to lose. On the other hand, if a
survey contains only 2D or only 3D data, we don't want users to be
bothered with choices everywhere. Moreover, supporting 2D/3D changing in
real-time became almost impossible.
Therefore, we have now adopted a new strategy, which can be described as
follows:
1) The user selects, in the survey setup, whether a survey has only 2D
data, only 3D data, or both.
2) When a survey is selected, all menus, buttons and tree items are
re-worked to show only the relevant items
3) If the user has a combined 2D/3D project, there will be 2 attribute
sets (one for 2D and one for 3D), all tree items will be present, menus
for import and export will have '2D' and '3D' subchoices, etc.
For programming, that means that life has become a bit harder in one
way, but also a lot easier in another.
Harder: On survey change, OpendTect menus (if you have them) need to be
re-worked to show only the relevant items. Tool buttons need to be
added/removed/changed. That is, of course, those items that are
top-level OpendTect, not the ones local in your own dialogs (because
they are not alive on survey change).
Easier: Whenever a window pops up, you know up front whether this is for
2D or 3D. Attributes can ask the AttribDescSet whether it's 2D or 3D.
The UI part can be created for 2D or 3D; doesn't need to counter 2D/3D
change after creation.
Before this change, the 'Pol2D' (Only2D,Both2DAnd3D,No2D) was global and
used in a lot of cases. Now it's rarely used, and a member of SurvInfo.
That is because now the user chooses one of 'Both2DAnd3D' before your
dialog is created, by selecting the right menu or button. Typically,
dialogs where this is an issue now have a 'bool is2d' in the
constructor, instead of a 'set2DPolicy()'.
>From a more attributes specific point of view, creating the User Interface should be easier and straight forward, this is the reason why the constructors of the attributes 'User Interfaces now feature a new boolean parameter is2d and does not support the virtual function set2D() anymore. You would then have to slightly modify your Attribute Interface constructor, any attribute can be used as an example.
If you use the CVS access, you can check this right now, otherwise
you'll have to wait for the January release. Chances are big that you
don't need to change a lot, and if so, that things get easier. Except in
the menu/toolbar area. If you want to see how that is done, please look
in the plugins/uiSeisIOSimple/uiseisiosimplepi.cc.
Best regards,
Helene
--
-- dGB Earth Sciences B.V.
-- Nijverheidstraat 11-2, 7511 JM Enschede, The Netherlands
-- mailto: helene.payraudeau at dgb-group.com, http://www.dgb-group.com
-- Tel: +31 53 4315155 , Fax: +31 53 4315104
More information about the Developers
mailing list