[Developers] Plugin Beginner

Fernando J. Zunino fernando at zauber.com.ar
Wed Oct 17 02:21:49 CEST 2007


Hi,
I'm trying to solve a problem and I don't know how to do it.

I'll begin with the simple version of the problem.
I want to develop a plugin which given an input cube and two timeslice
coordinates outputs, for each seismic trace, the average of the samples
contained between those two coordinates.

I've take as an example the Tutorial Plugin published in
http://www2.opendtect.org/devel/html/Programmer/plugins.html#tutplugin, 
not the one in
http://www2.opendtect.org/rel/html/Programmer/plugins.html#tutpi.

My idea was to take an input cube and iterate over all its traces using
a SeisTrcReader. Then with every SeisTrc calculate its average looping
over all its values.
Here I've encountered my first stopper: I could get the values of the
SeisTrc using trcin_.get(i, 0) but I can't get the timeslice coordinate
for the value. This makes impossible the average calculation between two
timeslice coordinates.

The other problem that I've encountered is how to store the average
calculation for every trace. My idea was to use the auxiliary data of an
horizon to store this calculation: Define an horizon with some fixed z
coordinate (a timeslice plane) and for every SeisTrc obtain its (x, y)
coordinate, compute its average and store in the same (x, y) coordinate
of the horizon auxiliary data this calculation.
Here I've encountered another stopper: I couldn't correctly map the
SeisTrc (x, y) coordinate to the horizon (x, y) coordinates.

For example:

Coord3 pos;
pos.x = trcin_.info().coord.x;
pos.y = trcin_.info().coord.y;
pos.z = 1000;

horizon_->setPos(posid_, pos, false);
horizon_->auxdata.setAuxDataVal(dataidx_, posid_, average);


Is this the correct way to do it? Is there another way?

Thanks in advance,
Fernando

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: OpenPGP digital signature
URL: <http://lists.opendtect.org/pipermail/developers/attachments/20071016/b7e55340/attachment.sig>


More information about the Developers mailing list