Incompatible API Changes in INTViewer 5.1.1

A/ Handling of model coordinates when extending AbstractLayer2D

This change only affects classes that extend com.interactive.intviewerapi.layers.AbstractLayer2D. If you don't implement your own 2D layers, you are not affected.

The following methods have been added to AbstractLayer2D:

public Map<String, Double> buildKeyValuesForPoint(Point2D modelPoint, int deviceX, int deviceY);

public double getDataValue(Point2D modelPoint, int deviceX, int deviceY);

public Map<String, Double> buildLocatorParameter(Point2D modelPoint, int viewportX, int viewportY);

These methods are similar to the following methods that were meant to be overriden prior to INTViewer 5.1.1:

    public Map<String, Double> buildKeyValuesForPoint(int deviceX, int deviceY);
    public double getDataValue(int deviceX, int deviceY);
    public Map<String, Double> buildLocatorParameter(int viewportX, int viewportY);

When extending AbstractLayer2D, make sure to override the methods that require a "modelPoint" parameter instead of the methods that don't require this parameter.

This change was made to improve the accuracy of cursor synchronization between windows.

B/ The "propertyProvider" instance variable of AbstractPropertyProviderShortcutEditor and AbstractPropertyProviderShortcutPanel has been removed

It has been replaced with a weak reference instead.

    protected T propertyProvider;

became

    protected WeakReference<T> propertyProviderWeakRef;

This change typically affects code that extends AbstractVisualAttributesShortcutEditor and AbstractVisualAttributesShortcutPanel. Use the getVisual() method instead.

For code that extends AbstractViewerWindowAttributesShortcutEditor and AbstractViewerWindowAttributesShortcutPanel, use the getViewerWindow() method instead.

For all others cases, use propertyProviderWeakRef.get() instead.

This change was made to facilitate garbage collection when many windows are created in sequence, typically in Python scripts.

C/ Layer.xml registrations for menus and toolbars

The declaration of menu items and toolbars have been normalized in INTViewer's internal layer.xml files to meet NetBeans architecture guidelines.

Example:

    <folder name="Menu">
        <folder name="File">
            <file name="com-interactive-intviewer-control-OpenSessionAction.instance">
                <attr name="position" intvalue="145"/>
            </file>
            <file name="com-interactive-intviewer-control-SaveSessionAction.instance">
                <attr name="position" intvalue="150"/>
            </file>
        </folder>
    </folder>

has been changed to:

    <folder name="Menu">
        <folder name="File">
            <file name="com-interactive-intviewer-control-OpenSessionAction.shadow">
                <attr name="originalFile" stringvalue="Actions/File/com-interactive-intviewer-control-OpenSessionAction.instance"/>
                <attr name="position" intvalue="145"/>
            </file>
            <file name="com-interactive-intviewer-control-SaveSessionAction.shadow">
                <attr name="originalFile" stringvalue="Actions/File/com-interactive-intviewer-control-SaveSessionAction.instance"/>
                <attr name="position" intvalue="150"/>
            </file>
        </folder>
    </folder>

As a result, the syntax to hide INTViewer's menu items has changed from:

    <folder name="Menu">
        <folder name="File">
            <file name="com-interactive-intviewer-control-OpenSessionAction.instance_hidden" />
            <file name="com-interactive-intviewer-control-SaveSessionAction.instance_hidden" />
        </folder>
    </folder>

to

    <folder name="Menu">
        <folder name="File">
            <file name="com-interactive-intviewer-control-OpenSessionAction.shadow_hidden" />
            <file name="com-interactive-intviewer-control-SaveSessionAction.shadow_hidden" />
        </folder>
    </folder>

Note than hiding menu item entries is not sufficient. Users can access the associated feature from the View->Toolbars->Customize dialog unless you also hide the action declarations.

Example:

    <folder name="Actions">
        <folder name="File">
            <file name="com-interactive-intviewer-control-OpenSessionAction.instance_hidden">
                <attr name="position" intvalue="145"/>
            </file>
            <file name="com-interactive-intviewer-control-SaveSessionAction.instance_hidden">
                <attr name="position" intvalue="150"/>
            </file>
        </folder>
    </folder>

This change was made to allow the addition of the Tools->Options->Keymaps dialog.

D/ The API to create a spectrum phase plot has changed

In INTViewer 5.1, you could display a window showing both spectrum amplitude and phase plots using the following lines:

ISpectrumPhaseWindow spectrumPhaseWindow = ISpectrumPhaseWindow.factory.createWindow();
NamedProps windowProps = new NamedProps();
windowProps.putProperty(ISpectrumPhaseWindow.SPECTRUM_TYPE, ISpectrumPhaseWindow.AMPLITUDE);
spectrumPhaseWindow.setProperties(windowProps);
spectrumPhaseWindow.setReferenceLayer(seismicLayer);
NamedProps layerProperties = new NamedProps();
layerProperties.putProperty(ISpectrumPhaseLayer.USE_FULL_SECTION, true);
ISpectrumPhaseLayer layer = ISpectrumPhaseLayer.factory.createLayer(spectrumPhaseWindow, seismicLayer.getData(), layerProperties, false);

In INTViewer 5.1.1, a spectrum plot window represents only one side of the plot. Just combine the two windows for an effect similar to the one obtained in 5.1.

ISpectrumPlotWindow spectrumPlotWindow = ISpectrumPlotWindow.factory.createWindow();

NamedProps windowProps = new NamedProps();
windowProps.putProperty(ISpectrumPlotWindow.SPECTRUM_TYPE, ISpectrumPlotWindow.AMPLITUDE);
spectrumPlotWindow.setProperties(windowProps);
spectrumPlotWindow.setReferenceLayer(seismicLayer);
NamedProps amplitudeLayerProperties = new NamedProps();
amplitudeLayerProperties.putProperty(ISpectrumPlotLayer.USE_FULL_SECTION, true);
ISpectrumPlotLayer layer = ISpectrumPlotLayer.factory.createLayer(spectrumPlotWindow, seismicLayer.getData(), amplitudeLayerProperties, false);
ISpectrumPlotWindow spectrumPhaseWindow = ISpectrumPlotWindow.factory.createWindow();
NamedProps windowProps = new NamedProps();
windowProps.putProperty(ISpectrumPlotWindow.SPECTRUM_TYPE, ISpectrumPlotWindow.PHASE);
spectrumPhaseWindow.setProperties(windowProps);
spectrumPhaseWindow.setReferenceLayer(seismicLayer);
NamedProps phaseLayerProperties = new NamedProps();
phaseLayerProperties.putProperty(ISpectrumPlotLayer.USE_FULL_SECTION, true);
ISpectrumPlotLayer layer = ISpectrumPlotLayer.factory.createLayer(spectrumPhaseWindow, seismicLayer.getData(), phaseLayerProperties, false);
ICombinedWindow combinedWindow = ICombinedWindow.factory.createWindow();
combinedWindow.addViewerWindows(spectrumPlotWindow, spectrumPhaseWindow);

This change was necessary to accommodate the combined-window-based implementation introduced in 5.1.1

E/ IPointSetObject3D.POINTS_RENDERING has been removed as an option of the IPointSetObject3D.RENDERING_TYPE property

The options of IPointSetObject3D.POINTS_RENDERING are now FIXED_SIZE_SYMBOLS_RENDERING and VARIABLE_SIZE_SYMBOLS_RENDERING

To force a point display, set the IPointSetObject3D.SYMBOL_STYLE to "Point"

This change was made to allow the use of symbols in 3D pointset visualizations.

F/ The signature of the ITrendCalculator.calculate method has changed

    public void calculate(IPolylineData polyline, float[] x, float[] y, cgRect limits)

has been changed to:

    public void calculate(float[] x, float[] y, cgRect limits);

To restrict the trend calculation to a subset defined by a polyline, call ITrendCalculator.setPolylineData(IPolylineData polylineData) prior to calling calculate.