[Developers] Displaying seismics in a 2D viewer

Bert Bril Bert.Bril at opendtect.org
Wed Aug 15 12:18:48 CEST 2007


Hi all,

I just got a support question from someone trying to display seismics
with the SeisSectionViewer class. Unfortunately this class should have
been removed a long time ago; I've now removed these classes from the
CVS repository.

So how *do* you display seismic data?

The easiest way, AFAIK, is to create a DataPack from the traces. An
example of this is present in uiSeisPartServer::handleGatherSubMenu()
(uiSeis/uiseispartserv.cc, around line 300). In this function, two
SeisTrcBuf's are created and displayed in a standalone window.

In short:

1) Put the traces in a new SeisTrcBuf
2) Create a SeisTrcBufDataPack 'around' it
3) Create a uiFlatViewMainWin and set the DataPack
4) Add a uiFlatViewStdControl (or your own control)
5) Go!

The nice thing with DataPack's is that you don't have to worry about the
memory management of the SeisTrcBuf. When the viewer is closed things
will be freed automatically. If you need the SeisTrcBuf in other places
too, just obtain the DataPack once more; the DataPackManager will
release the DataPack only when nobody's is using it anymore. I maybe
back later on DataPacks and why we intend to use them more and more.


/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