Adding a Seismic Trace Processor Walkthrough

A seismic trace processor is the implementation of a trace processing algorithm for seismic data. There are two main classes that you can extend to create seismic trace processors. There is the AbstractSeismicProcessor class, which is used when your trace processor depends on the visual that the processor will be applied to. The second class is the AbstractStandaloneSeismicProcessor class. This class is used when the processor does not depend on the visual that the processor is applied to. This class is also the only type of processor that the Seismic Workbench plugin will add to its list of processors. This walkthrough will go over how to create a processor that extends AbstractStandaloneSesimicProcessor, though the steps for extending AbstractSeismicProcessor are very similar.

Reviewing Dependencies

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

  • IntviewerCore
  • SeismicData
  • JSeismicWrapper
  • Utilities API (provided with NetBeans)
  • UI 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 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 mydemoseismictraceprocessor
  • Select option Standalone Module and make sure to specify the INTViewer platform in the NetBeans Platform field.

  • Click Next > and specify com.mycompany.myviewer.mydemoseismictraceprocessor for the Code Name Base and MyDemoSeismicTraceProcessorModule for the Module Display Name.
  • Click on Finish.

  • Register the layer.xml file
  • In the Projects tree view, you should see your project which includes a number of files that have been created for you.

Configuring your Module

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

Create a Processor class

    • In the Projects tree, right click on the module MyDemoSeismicTraceProcessorModule and select New -> Java Class... from the list.
    • Enter DemoProcessor as the Class Name and select com.mycompany.myviewer.mydemoseismictraceprocessor as the Package.
    • In the class editor, indicate that this DemoProcessor class extends AbstractStandaloneSeismicProcessor and implements IPersistent
    • Click the light bulb next to the public class declaration to automatically add AbstractStandaloneSeismic and IPersistent imports to this class
  • Automatically create the skeleton of required methods for this class
    • Customize each method. In this example, no processing has been implemented.

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

Create a ProcessorEditor class

    • In the Projects tree, right click on the module MyDemoTraceProcessorModule and select New -> Java Class... from the list.
    • Enter DemoEditor as the Class Name and select com.mycompany.myviewer.mydemoseismictraceprocessor as the Package.

  • In the class editor, indicate that this DemoEditor class implements ISeismicProcessorEditor
  • Click the light bulb next to the public class declaration to automatically add the ISeismicProcessorEditor import to this class

  • Automatically create the skeleton of required methods for this class

    • Add a constructor and customize each method. In this example the layout is empty and it contains no label or field.
  • The code above is just a blank skeleton with no business logic
  • Now we will extend this example by implementing a static shift which moves all the data vertically downwards by a given time.
  • This feature is already implemented but we will show it again for educational purposes.

Create a DemoEditorPanel GUI

  • First, we will create a new panel to show in the properties.
  • In the Projects tree, right click on the module MyDemoSeismicTraceProcessorModule and select New from the list.
  • In the New subcategory, click on JPanel Form... from the list.
  • Enter DemoEditorPanel as the Class Name and select com.mycompany.myviewer.mydemoseismictraceprocessor as the Package.
  • A Mattisse GUI editor window will open. Click on Palette sidebar, then select Label and drag it over onto the panel.
  • Right-click on the label and select Edit Text. Rename it to "Time Shift".
  • Add a text field as well.
  • Right-click on the text field and select Edit Text. Delete the text.
  • Adjust the look of the GUI to suit your taste.
  • Directly underneath the tab labeled "DemoEditorPanel.java", click the Source button to go straight to the code
  • Much of the code is uneditable because it is generated automatically by the Mattisse editor.
  • Before the generated code, add the following code to get and parse the entered value from the GUI.

Note: At runtime, the panel returned by getPanel will be added in the CENTER of a JPanel with a BorderLayout As a result, the dimensions of your panel as seen on screen might not match its default dimensions. If you want fine control over your editor's dimensions, you can place it inside another JPanel.

  • Now return to the DemoProcessor.java file and add the following methods and fields to handle persistence.
  • Add the following code after the previous code. In reality, processTrace would be where the computation, business logic, or "meat" of the code is.
  • Here, we first get the sample rate from the data. Then we convert a shift in time to a shift in array index.
  • The second part handles a negative time shift.
  • Your algorithm may vary.
  • Finally, go back to DemoEditor.java and adjust it so it contains a DemoEditorPanel instead of a simple JPanel.

You can download the DemoEditor, DemoEditorPanel, and DemoProcessor 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 this page.

Running your Seismic Trace Processor

    • Click the green arrow in the toolbar.
    • Load a seismic X-Section using File -> Open Data in New X-Section Window -> Seismic...
    • Open a seismic data file in the file dialog box
    • Demo Static Shift Processor has been added to the Available processor list in the Trace Processors tab.

More information about seismic trace processors as well as samples are available in the references section.