SIA tool coding principles and templates

There are several ways for incorporating codes written in C, C++, Fortran, and potentially Java into SIA. C++ provides the easiest, most powerful, and also most natural interface. To create a new module in this format, one only needs to define a class overloading some of the methods of the base SIA_MODULE class:

	CHARSTR module_name();	///< name under which the tools appears in the GUI
	int edit();         	///< Edit phase (parameter input)
	boolean process();  	///< Process phase (data processing)
 	UI_X *X();          	///< Accessor for the graphical object
	boolean call();     	///< custom operation performed by this tool

The input and output trace sequences are always available to the tool from methods:




Class GATHER has methods for accessing its ensembles and traces, and class TRACE includes many methods for managing its contents. 

Note that edit_phase() is called once, reading the parameters from user's input (job script or GUI), and proces_phase() is called repeatedly for as long as data records (e.g., seismic traces) are present  in the flow. process_phase() only returns two values: TRUE, if some kind of "output" of the tool (e.g., a trace passed to the next tool) has been produced, or FALSE if the state of the flow is considered unchanged. This is all. Unlike, for example, in DISCO, no instructions regarding further processing steps need to be passed to the flow monitor.

Code examples and templates:

Copyright (c) 1995-2007, I. B. Morozov
This document updated February 02, 2007