[OpendTect_Users] Batch generation of 2d pictures from atributes

Jaap Glas Jaap.Glas at dgbes.com
Fri Apr 15 17:25:13 CEST 2011


Dear Magnus,


One might consider using OpendTect's CmdDriver plugin to automize the generation
of your pictures. This is what you can do with it at the moment:

(1) Use the CmdRecorder to record the mouse/keyboard actions you perform to
generate one picture. If you want to start from a scene tree already containing
all 2D lines and attributes, I imagine a sequence of actions like:

- Open a 2D viewer in the right-click menu of 1st attribute of 1st 2D line.
- Load the appropriate horizon in there
- Click the snapshot button, fill in the specs and a filename, and click OK
- Close the 2D Viewer.

If you want to start from an empty scene, also loading the 2D line and
loading its attribute (and optionally their removal afterwards) should
be part of this sequence.

(2) Use a text editor to duplicate the sequence of actions 500 times
behind each other in one file. Do not duplicate the file header. In
every next duplicate, one has to adjust the original name of the 2D
line and/or the attribute and/or the horizon name and for sure the
name of the output picture file. This all in order to cover all
the combinations you want to have a picture of. Some text editors
have functionalities that help you to make these changes fast.
One colleague of mine uses the script language AWK to make
such-like changes to command files.

(3) Run your edited command file in the CmdDriver, and 500 pictures
can be generated in one go. (If you have to rerun the file for whatever
reason, emptying the directory with the equally-named pictures written
by an earlier run might save you a lot of errors).

I admit that all this is still quite a bit of work (although a lot less),
especially if you have no experience with these tools already. However,
the next development release OpendTect 4.3 will have a CmdDriver plugin
that supports control flow commands. This means that your recorded
sequence of one picture generation does no longer have to be duplicated
and changed 500 times. From then on, the recorded sequence can be enclosed
by one or more loop commands (for, while), and together with a few
straightforward substitutions in the sequence itself, the job can be
done.

Do not be surprised if I am going to use your problem to demonstrate
this new CmdDriver functionality to our users.


Best regards,

Jaap Glas


-- 
-- dr. Jaap C. Glas
-- Software Engineer
-- dGB Earth Sciences
-- Nijverheidstraat 11-2
-- 7511 JM Enschede, The Netherlands
-- jaap.glas at dgbes.com
-- http://www.dgbes.com
-- Tel: +31 534315155, Fax: +31 534315104



> -------- Original Message --------
> Subject: 	[OpendTect_Users] Batch generation of 2d pictures from atributes
> Date: 	Thu, 14 Apr 2011 15:46:15 +0200
> From: 	Magnus Lidgren <magnus.lidgren at gmail.com>
> To: 	users at opendtect.org
> 
> 
> 
> Dear all,
> 
> I´m struggling with the following problem:
> 
> 1. I am presently working with a 2D line set containing some 35 seismic
> lines.
> In order to analyse these lines I have set up a number of attribues and
> created seismic output for the whole line set and for each attribute
> accordingly.
> 
> 2. For each single line a 2D Horizon is tracked.
> 
> Now I would like to generate pictures for printout, one picture for each
> attribute for every line with corresponding horizons.
> 
> Manually this of course can be done, one picture at the time. But as the
> total number of pictures sums up to about 500 pictures, it would be nice
> if this could be done in some kind of a batch mode.
> 
> Question: Can this be done? 
> Does someone have any clue?
> 
> Best regards
> Magnus Lidgren
> 





More information about the Users mailing list