[OpendTect_Developers] Help with Fault creation in 3D Seismic Image

Jaap Glas jaap.glas at dgbes.com
Thu Feb 21 17:37:32 CET 2013


Dear Jaideep,

In addition to what my colleague Bert Bril already added to the discussion:

 >> Also, in place of entering seed point, I want to just left-click mouse
 >> button to achieve this. How can this be done?
 >
 > Not really my field of expertise, but you have to beware of the fact that
 > different scenes can have different vertical axes. For example you can have
 > depth scenes in time surveys. Or even some other dimension, like geological time.

The place to start when you want to catch mouse events in the 3D scene is
the file visBase/visevent.h. There is a class EventCatcher defined over
there and a class EventInfo whose instances are supplied by the event
catcher. The Event info contains a 3-D coordinate called "worldpickedpos"
that contains the X,Y,Z coordinates you are looking for.

The EventCatcher for a particular 3D scene is created in visBase/visscene.cc
and passed to many object display classes in the directory visSurvey, like
horizons, faults, fault sticks, etc. All of these need to catch mouse events
when the user is editing them, so their geometry can be adapted accordingly.

Let's for example look at the FaultStickSetDisplay class in
visSurvey/visfaultsticksetdisplay.cc. If the event catcher is set,
it gives the callback function mouseCB() to the notifier eventhappened

eventcatcher_->eventhappened.notify(mCB(this,FaultStickSetDisplay,mouseCB) )

Now if a mouse or keyboard event is happening, it will receive an instance
of the EventInfo class which is handled by the function mouseCB(.). That
instance first has to be unpacked:

mCBCapsuleUnpack(const visBase::EventInfo&,eventinfo,cb)

The first part of the code in mouseCB() checks whether the event is
expected or not. In your case, you will have to check whether it is
a left-mouseclick event and maybe whether the scene object on which
it is picked (e.g. a seismic inline) is appropriate. If you decide
to accept the event:

eventcatcher_->setHandled();

The second part of the code in mouseCB() takes fault stick editing
actions based on the contents in the received eventinfo. In your case,
you can take the "worldpickedpos" of the event, and use the directions
given by Bert Bril to transform it into a position within your seismic
cube.

I understand that you are going to use that position to start "creating"
a fault, but I still do not have a clue about how you want to achieve
this, and what is the difference with the faults you can already create
in OpendTect by means of mouse picking in the 3D scene!


Best regards,

Jaap Glas

-- 
-- dr. Jaap C. Glas
-- Software Engineer
-- dGB Earth Sciences
-- Nijverheidstraat 11-2
-- 7511 JM Enschede, The Netherlands






On 02/20/2013 10:47 AM, Bert Bril wrote:
> Hi all,
>
>
> Jaideep Singh wrote:
>
>
>> Yes, I want to be create a fault in a 3D surface with the fault
>> properties like length in X, Y and Z provided.
>
> Your explanations are pretty vague. Especially software developers hate vague
> specifications ...
>
>
>> Other thing I want to do is change values of seismic volume around a
>> seed point.
>
> This will be *hard*. You cannot, in OpendTect, edit stored seismic data
> in-place. To change it, you will have to create a new line attribute (2D) or a
> new cube (3D). It's not easy at all, you may want to take the Browse/Edit
> functionality in the seismic data manager as an example (uiSeis/uiseisbrowser.cc).
>
>
>> For this, I want to enter seed point coordinates ( which
>> would be in X, Y, Z ?).
>
> In OpendTect, coordinates are X, Y and some kind of Z (depending on where you
> are looking). In general, Z will be the survey's Z dimension, which can be time
> or depth, time in seconds and depth in meters or feet.
>
>
>> If I enter these in X,, Y, Z, what relation does
>> this have in the attribute nextStep() function that is called for every
>> trace.
>
>  From this I conclude that you decided to use the Attribute Engine to access
> your data. I'm not sure whether this is the right choice. I would make the
> choice based on whether you want to extract attributes.
>
> If you look in the Tutorial plugin, you'll see that you can also access seismic
> data as such, directly.
>
>
>> *I'm not sure how to relate X, Y, Z to samples in traces*.
>
> You need to find the trace that contains that sample. There is no universal
> (X,Y,Z) -> sample value function. This is because seismic data is usually not
> accessed in this way, but rather in bundles of traces or trace parts. You figure
> out at what positions you need the traces, and then receive them in the order
> that suits the provider.
>
> If you use the 'direct access' methods, you'll likely use the SeisTrcReader
> combined with a Seis::RangeSelData object:
>
> * For 2D seismics, you'll need to search for this (X,Y) along the line. If you
> happen to know the trace number, life will be a lot easier. The searching can be
> done in the 2D line geometry database S2DPOS().
>
> * For 3D seismics, convert the (X,Y) to inline/crossline using SI().transform().
>
> Setting the RangeSelData will make the reader only deliver the one trace you
> want. The needed sample value is trivial to get unless the Z dimension of the
> trace is not the one you need.
>
>
>> Also, in place of entering seed point, I want to just left-click mouse
>> button to achieve this. How can this be done?
>
> Not really my field of expertise, but you have to beware of the fact that
> different scenes can have different vertical axes. For example you can have
> depth scenes in time surveys. Or even some other dimension, like geological time.
>
>
>
> Bert
>



-- jaap.glas at dgbes.com
-- http://www.dgbes.com
-- Tel: +31 534315155, Fax: +31 534315104




More information about the Developers mailing list