Overview of API changes in INTViewer 5.2

New API

1/ An API to plug your own window event handlers.

See: Capturing mouse events at the window level

AbstractViewerWindowEventHandler

2/ An API to create and manipulate analysis rectangles and more generally interactive shapes

IInteractiveShape

IAnalysisRectangle

IAnalysisRectangleModel

AbstractAnalysisRectangleAction

IRectangularAnalysisTool

3/ An API to index seismic data

ISeismicIndexer

See this example.

4/ An API to add your own auxiliary widgets to XSection and Well Log windows.

IAuxiliaryPlotProvider

IAuxiliaryGraphPlotProvider

IAuxiliaryPlotsContainer

IWellLogAuxiliaryPlotProvider.html

IXSectionAuxiliaryPlotProvider.html

AbstractAuxiliaryPlotProvider

AbstractAuxiliaryPlotProviderAction

AbstractAuxiliaryPlotsContainer

AbstractAuxiliaryPlotsContainerAction

AbstractWellLogAuxiliaryPlotProvider.html

AbstractWellLogAuxiliaryPlotsContainer

AbstractXSectionAuxiliaryPlotProvider

AbstractXSectionAuxiliaryPlotsContainer

See this example.

5/ An API to enable or disable trace alignment

The IXSectionWindow.ALIGN_TRACE_POSITIONS property controls whether a window should attempt to align traces for of all seismic datasets in that window. Automatic trace alignment is a new feature of INTViewer 5.2 (see http://intviewer.int.com/intviewer/docs/userguide/latest/file/align_trace_positions.html)

The default value of IXSectionWindow.ALIGN_TRACE_POSITIONS is controlled by the user with this options panel:

If no settings have been changed, the default of IXSectionWindow.ALIGN_TRACE_POSITIONS is true.

6/ An API to test the window system and dock windows into NetBeans modes (see "Window System" paragraph below)

Incompatibilities with 5.1.1

A set of API incompatibilities have been introduced as part of this release.

Your graphics card and driver must support OpenGL 3.2 for cross-plot and 3D visualization. INTViewer 5.1.1 required OpenGL 3.1 with a backward profile with OpenGL2. The "backward profile" requirement has been removed in 5.2.

Window System

INTViewer 5.2 changes the default window system to "tabbed windows". This window system has been available for many years, but wasn't the default until now.

This window system is well suited for activities where multiple datasets are loaded at once, for computers with large or multiple screens. It is based upon NetBeans top components while the previous window system was based upon Swing frames.

As a result of this change, programmers have different controls over the placement and size of their windows. NetBeans uses the concept of Modes to defined areas in the Desktop that windows can dock themselves to. When the "tabbed windows" mode is enabled, the setSize(int, int) and setLocation(int, int) methods of the com.interactive.intviewerapi.windows.IWindow interface have no effect. If you need to dock a window (extending com.interactive.intviewerapi.windows.AbstractWindow) into a NetBeans mode, use the com.interactive.intviewerapi.windows.IWindowManager.setTabbedWindowMode(AbstractWindow, Mode) method.

If your plugins require the legacy layout, you can prompt the user to restart INTViewer in that legacy mode. The com.interactive.intviewerapi.windows.IWindowManager.usedTabbedWindows() method will return true if the new window system is in use. To change the preference programatically, call com.interactive.intviewerapi.util.IntPreferences.setProperty(USE_TABBED_WINDOWS_PROPERTY, "false"). This preference change will only take affect after INTViewer restarts.

You can also set environment variables that will affect the behavior at startup:

  • Setting the DEFAULT_INTVIEWER_WINDOW_SYSTEM environment variable to FRAMES or TABS will set the preference the first time INTViewer is started. Users still have the option to customize the layout in Tools->Options->GUI->Desktop
  • Setting the INTVIEWER_WINDOW_SYSTEM environment variable to FRAMES or TABS will override the preference currently in use

For example, on Windows, to force the window system to FRAMES, add this line at the beginning of your .bat file:

SET INTVIEWER_WINDOW_SYSTEM=FRAMES

To force the window system to TABS, add this line at the beginning of your .bat file:

SET INTVIEWER_WINDOW_SYSTEM=TABS

Here is the new window layout of INTViewer 5.2, as viewed through the NetBeans "Layout of Windows" tool:

Note that the "editor" mode is now split in two modes to give room to the new "analysis" mode. This is the new default placement of all analysis windows, such as Spectrum, FK, FT, Cross-Plot, etc.

NetBeans

INTViewer 5.2 is based upon NetBeans 8.1 while INTViewer 5.1.1 was based upon NetBeans 7.3.1.

Transitioning to the NetBeans 8.1 will be more challenging than former transitions. Several often-used NetBeans modules have been split into two modules (a "Base" and a "UI" module) as part of the NetBeans 8.1 release. This change was recorded by the NetBeans team as https://netbeans.org/bugzilla/show_bug.cgi?id=243100. This change will cause your project to not compile unless project dependencies are updated.

For example. the following project created in INTViewer 5.1.1 will open as follow with INTViewer 5.2 registered as a platform:

The NetBeans IDE reports that the HelpCtx class is unknown:

The reason for this is that the NetBeans org.openide.util.HelpCtx class has been moved from the org.openide.util module to the org.openide.util.ui module. As a result, the following dependencies need to be changed from:

to

The module that used to be known as "Utilities API" in NetBeans 7.3.1 has been renamed "Base Utilities API" in NetBeans 8.1. As a result, the new "Utilities API" module needs to be added to your project.

You will encounter this problem with the following often-used classes, requiring a new "Utilities API" module dependency:

  • org.openide.util.HelpCtx
  • org.openide.util.ImageUtilities
  • org.openide.util.actions.SystemAction
  • org.openide.util.actions.CallableSystemAction
  • org.openide.util.actions.BooleanStateAction
  • org.openide.util.datatransfer.PasteType
  • org.openide.util.Utilities

Likewise, the org.netbeans.api.progress.ProgressUtils class requires a new "Progress API - Swing" module dependency. Another option is to replace calls to ProgressUtils.runXXX (ex: ProgressUtils.runOffEventDispatchThread)by calls to BaseProgressUtils.runXXXX (ex:BaseProgressUtils.runOffEventDispatchThread)

While the 8.2 version of the NetBeans IDE can be used to write INTViewer plugins, our developers found several issues with breakpoints when debugging. We also found performance issues with "Find Usages". NetBeans 8.1 is our preferred version of the NetBeans IDE for now.

Forward compatibility

Future versions of INTViewer will allow trace processors to shift not just samples, but also any visualization attached to a sample. For example, if you draw a horizon at time=1s and the trace processor shifts time by 2 s, the horizon will be shown at 3s.

When you design your own visualizations for XSection window, you will need to take into account whether "sample shifting processors" are enabled. In preparation of this change, the following methods have been added to the ISeismicProcessor interface

    /**
     * Returns the shift to apply to horizon times when this processor is
     * applied. Returns 0 when extending <code>AbstractSeismicProcessor</code>
     * directly.
     *
     * @param trace trace to get time shift value for
     * @param oldTimeValue original time value
     * @return value to shift the trace along time; 0 for no shift
     * @see #canShiftTime
     */
    public float getTimeShift(ITrace trace, float oldTimeValue);
    /**
     * Returns true if this trace processor shifts time values. Returns false
     * when extending <code>AbstractSeismicProcessor</code> directly. All
     * built-in trace processors in INTViewer 5.2 return <code>false</code> for
     * this method as time shifting is an experimental feature.
     *
     * @return <code>true</code> if a shift is applied; <code>false</code>
     * otherwise
     * @see #getTimeShift
     */
    public boolean canShiftTime();

Contact support@int.com to enable this "time shift" experimental feature with your copy of INTViewer 5.2.

Future versions of INTViewer will no longer start on a 32-bit architecture. While this was an unsupported configuration, it was technically possible. Future upgrades to the Flex libraries will require a 64 bit architecture.