Adding a Seismic Generator Walkthrough

A seismic generator is the implementation of a seismic processing algorithm for seismic data. They are somewhat similar to trace processors, but have a few main differences. Trace processors are run only on one trace at a time, and are not meant to change the length of the traces. Seismic generators work on the entire dataset, and can change any aspect of the seismic data that you wish. In fact, you are able to use seismic generators with no data for input, and create seismic data from scratch.

There are two main extension points that you can use to create you own seismic generators.

  • The first is the AbstractSeismicGeneratorFromReader class. This is to create a generator that will receive seismic data as input, and do whatever processing you wish on that data. Use this class for generators that don't modify the dimensions of a dataset. For more complex generations, consider using AbstractSeismicToSeismicGenerator instead.
  • The second is the AbstractVoidToSeismicGenerator class. This is the class that you will use if you do not wish to have any data as your input.

This walkthrough will go through the process of creating a generator using the AbstractSeismicGeneratorFromReader class. We will be using INTViewer's Add Missing Traces generator as an example.

Reviewing Dependencies

The creation of a generator module along with a generator configuration tab requires three INT modules that are part of the INTViewer platform:

  • IntviewerCore
  • SeismicData
  • JSeismicWrapper
  • Utilities API (provided with NetBeans)
  • Lookup API (provided with NetBeans)

See the list of INTViewer modules to load the INTViewer platform and for a description of each module.

Creating your module template using the NetBeans wizard

  • Click File -> New Project
  • In the New Project wizard, select NetBeans Modules from the Categories list and Module from the Projects list and click Next >
  • For Project Name, specify mydemoseismicgenerator
  • Select option Standalone Module and make sure to specify the INTViewer platform in the NetBeans Platform field.
  • Click Next > and specify com.mycompany.myviewer.mydemoseismicgenerator for the Code Name Base and MyDemoSeismicGeneratorModule for the Module Display Name.
  • Click on Finish.
  • In the Projects tree view, you should see your project which includes a number of files that have been created for you.
  • We need to add a layer.xml file. Right-click on the module MyDemoSeismicGeneratorModule and select New from the list, then select Other.
  • In the Module Development folder, select XML Layer and then click Next >.
  • Click Finish.
  • A file layer.xml will be created for you, and placed in your project's main package.

Configuring your module

  • In the Projects tree, right-click on the module MyDemoSeismicGeneratorModule and select Properties from the list.
  • Under Categories, select Libraries.
  • Select Java Platform JDK1.7.
  • Click on the Add button next to Module Dependencies
  • In the list, select IntviewerCore, SeismicData, JSeismicWrapper, Utilities API, Lookup API, and click OK.
  • Click OK in the Project Properties Dialog.

Create a Generator class

  • In the Projects tree, right-click on the module MyDemoSeismicGeneratorModule and select New -> Java Class... from the list.
  • Enter DemoGenerator as the Class Name and select com.mycompany.myviewer.mydemoseismicgenerator as the Package.
  • In the class editor, indicate that this DemoProcessor class extends AbstractSeismicGeneratorFromReader
  • Click the light bulb next to the public class declaration to automatically add the AbstractSeismicGeneratorFromReader import to this class.
  • Automatically create the skeleton of required methods for this class.
  • Customize each method. In this example, no processing has been implemented. We will need to create our own seismic reader to do the processing.

You can download the DemoGenerator.java file from the attachments at the bottom of this page.

Create a GeneratorEditor class

  • In the Projects tree, right-click on the module MyDemoSeismicGeneratorModule and select New -> Java Class... from the list.
  • Enter DemoEditor as the Class Name and select com.mycompany.myviewer.mydemoseismicgenerator as the Package.
  • In the class editor, indicate that this DemoEditor class implements IDataGeneratorEditor<ISeismicData, ISeismicData>
  • Click the light bulb next to the public class declaration to automatically add the IDataGeneratorEditor and ISeismicData imports to this class.
  • Automatically create the skeleton of required methods for this class.
  • Add a constructor, and customize each method.
  • The code for the two classes is just a blank skeleton with no business logic.
  • Now we will extend this example by implementing a clean empty traces generator which will remove any trace which has zero values for the entire trace.
  • This feature is already implemented in INTViewer, but we will show it again for educational purposes.

Create a DemoGeneratorSeismicReader class

  • Create a new class called DemoGeneratorSeismicReader.
  • Have this class extend AbstractGeneratedSeismicReader.
  • Add imports and build the skeleton of the class just as before.
  • Add a constructor.
  • Fill the methods as shown below.
  • This generator does not require any user input, and thus does not use a panel. So DemoEditor.java is just a placeholder class in this instance.
  • Change DemoEditor to reflect the changes made below.
  • Finally, change the DemoGenerator class as follows.

You can download the DemoEditor, DemoGenerator, and DemoGeneratorSeismicReader java files at the bottom of this page.

Customize the layer.xml file

You can download the layer.xml file from the attachments at the bottom of this page.

Running your seismic generator

  • Open any seismic data.
  • Click on Window and select Data to open the data window.
  • Right-click the data in the Data Window.
  • An option for your new seismic generator is now listed.
  • Click the new generator option. INTViewer will ask you where to save the resulting file.
  • Press OK and the seismic generator will be run on the data.

More information about seismic generators is available in the references section.