{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Incompatible API Changes In INTViewer 5 2","description":"Accelerate E&P application development and protect your innovation by consuming our Data and Domain APIs / Platform APIs.","lang":"en-US","meta":[{"name":"robots","content":"noindex"}],"llmstxt":{"hide":false}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"incompatible-api-changes-in-intviewer-5-2","__idx":0},"children":["Incompatible API Changes In INTViewer 5 2"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"incompatible-api-changes-in-intviewer-52","__idx":1},"children":["Incompatible API Changes in INTViewer 5.2"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"a-the-cominteractiveintviewerapiiobjectaction-interface-uses-java-generics","__idx":2},"children":["A/ The com.interactive.intviewerapi.IObjectAction interface uses Java generics"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The signature of this interface has changed from:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"public interface IObjectAction {\npublic Action toAction(Object object, int x, int y);\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["to:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"public interface IObjectAction<T extends Object> {\npublic Action toAction(T object, int x, int y);\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This change makes contextual actions easier to write (and more robust) by reducing arbitrary casts."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["It affects sub-classes of IObjectAction such as AbstractObjectAction, AbstractLayerAction and AbstractObject3DAction."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["As a result, contextual actions written prior to INTViewer 5.2 need to be slightly refactored. Here is an example of class extending AbstractLayerAction in INTViewer 5.1.1"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"public class ShowTrendStatisticsAction extends AbstractLayerAction {\n    public ShowTrendStatisticsAction() {\n        super(\"Show Trend Statistics\");\n    }\n    @Override\n    public Action toAction(Object object, int x, int y) {\n        ILayer2D layer = (ILayer2D) object;\n        NamedProps properties = layer.getProperties();\n        Boolean property = properties.getProperty(IXpLayer.SHOW_TREND_STATISTICS);\n        Action action = super.toAction(object, x, y);\n        if (property) {\n            action.putValue(Action.NAME, \"Hide Trend Statistics\");\n        }\n        return action;\n    }\n    @Override\n    protected void performAction(ILayer2D layer, int x, int y) {\n        NamedProps properties = layer.getProperties();\n        Boolean property = properties.getProperty(IXpLayer.SHOW_TREND_STATISTICS);\n        NamedProps props = new NamedProps();\n        props.putProperty(IXpLayer.SHOW_TREND_STATISTICS, !property);\n        layer.setProperties(props);\n    }\n}\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This class should be written this way in INTViewer 5.2:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"public class ShowTrendStatisticsAction extends AbstractLayerAction<IXpLayer> {\n    public ShowTrendStatisticsAction() {\n        super(\"Show Trend Statistics\");\n    }\n    @Override\n    public Action toAction(IXpLayer layer, int x, int y) {\n        NamedProps properties = layer.getProperties();\n        Boolean property = properties.getProperty(IXpLayer.SHOW_TREND_STATISTICS);\n        Action action = super.toAction(layer, x, y);\n        if (property) {\n            action.putValue(Action.NAME, \"Hide Trend Statistics\");\n        }\n        return action;\n    }\n    @Override\n    protected void performAction(IXpLayer layer, int x, int y) {\n        NamedProps properties = layer.getProperties();\n        Boolean property = properties.getProperty(IXpLayer.SHOW_TREND_STATISTICS);\n        NamedProps props = new NamedProps();\n        props.putProperty(IXpLayer.SHOW_TREND_STATISTICS, !property);\n        layer.setProperties(props);\n    }\n}\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"b-the-iseismicreaderfindfirsttrace-method-has-been-replaced-by-iseismicreaderfindtraceswithin","__idx":3},"children":["B/ The ISeismicReader.findFirstTrace method has been replaced by ISeismicReader.findTracesWithin"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This change was made to allow more flexibility in searching through trace selections. It is used to generate multiple ticks when gathers are displayed."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The signature of \"findFirstTrace\" was:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"int findFirstTrace(SeismicRangeQuery query);\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The signature of \"findTracesWithin\" is:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"public enum Scope {\n    SKIP_MISSING_TRACES,\n    KEEP_MISSING_TRACES\n};\npublic enum SearchOrder {\n    ASCENDING_SEARCH_ORDER,\n    DESCENDING_SEARCH_ORDER\n}\n"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"public List<Integer> findTracesWithin(SeismicRangeQuery query, int maxMatchingTraces,\n            Scope scope, SearchOrder searchOrder, ILongTaskProgressMonitor monitor);\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This change affects all classes calling ISeismicReader.findFirstTrace or implementing ISeismicReader."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Code calling findFirstTrace this way:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"ISeismicReader reader ...\nSeismicRangeQuery query = ...\nint traceId = reader.findFirstTrace(query)\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["should be rewritten:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"ISeismicReader reader ...\nSeismicRangeQuery query = ...\nList<Integer> traceIds = reader.findTracesWithin(query, 1, Scope.SKIP_MISSING_TRACES, SearchOrder.ASCENDING);\nint traceId = traceIds.get(0);\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The now-removed findFirstTrace method was always skipping missing traces. This Scope.SKIP_MISSING_TRACES option is present for backward compatibility purposes."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["We found that Scope.KEEP_MISSING_TRACES was a better option for all calls to findTracesWithin: SKIP_MISSING_TRACES is actually not used in INTViewer's code in INTViewer 5.2. If you implement your own ISeismicData/ISeismicReader, you do not need to implement the Scope.SKIP_MISSING_TRACES option unless you explicitly use it."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Code implementing findFirstTrace this way:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"        @Override\n        public int findFirstTrace(SeismicRangeQuery query) {\n            for (int i = 0; i < traceList.size(); i++) {\n                ITrace t = traceList.get(i);\n                if (match(t, query)) {\n                    return i;\n                }\n            }\n            return -1;\n        }\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["should be rewritten:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@Override"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"        public List<Integer> findTracesWithin(SeismicRangeQuery query, int maxNumber, Scope scope, SearchOrder so, ILongTaskProgressMonitor iltpm) {\n            List<Integer> results = new ArrayList<>();\n            if (so == SearchOrder.ASCENDING_SEARCH_ORDER) {\n                for (int i = 0; i < traceList.size(); i++) {\n                    ITrace t = traceList.get(i);\n                    if (match(t, query)) {\n                        results.add(i);\n                        if (results.size() >= maxNumber) {\n                            break;\n                        }\n                    }\n                }\n            } else if (so == SearchOrder.DESCENDING_SEARCH_ORDER) {\n                for (int i = 0; i < traceList.size(); i++) {\n                    int index  = traceList.size() - i - 1;\n                    ITrace t = traceList.get(index);\n                    if (match(t, query)) {\n                        results.add(index);\n                        if (results.size() >= maxNumber) {\n                            break;\n                        }\n                    }\n                }\n            }\n            return results;\n        }\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"c-traces-are-aligned-by-default-in-xsection-windows","__idx":4},"children":["C/ Traces are aligned by default in XSection windows"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Because of the feature described in ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/intviewer/api-reference"},"children":["align_trace_positions"]},", the visualization of seismic layers in XSection windows will differ when these layers are stacked in the same window."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can disable this feature entirely through the Tools->Options->Gui dialog"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can also programmatically set the IXSection.ALIGN_TRACE_POSITIONS property for each XSection window you create."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"d-the-cominteractiveintviewerapipluginstraceprocessoriseismicprocessor-interface-has-changed","__idx":5},"children":["D/ The com.interactive.intviewerapi.plugins.traceprocessor.ISeismicProcessor interface has changed"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The preProcess(ISeismicData, IVisual) method has been deprecated and made final: it cannot be overridden anymore."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you implement ISeismicProcessor by extending com.interactive.intviewerapi.plugins.traceprocessor.AbstractSeismicProcessor directly, override both preProcess(IVisual) and preProcess(ISeismicData) instead. When you override preProcess(IVisual), make sure to call super.preprocess(IVisual) so that preProcess(ISeismicData) gets called."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you extend com.interactive.intviewerapi.plugins.traceprocessor.AbstractStandaloneSeismicProcessor, no change should be required."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"e-the-cominteractiveintviewerapiobjects3diobject3dfactory-interface-has-changed","__idx":6},"children":["E/ The com.interactive.intviewerapi.objects3d.IObject3DFactory interface has changed"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following method has been added:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"    public T createObject3D(V window, U data, IMemento m, boolean runEditor) throws Exception;\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This method replaces the following deprecated method:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"    public T createObject3D(V window, IMemento m) throws Exception;\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The new method allows the passing of \"data\" as a parameter. Passing this parameter is required when copying 3D objects as the dataset identified by the \"data\" instance might not be stored on disk. Depending on the implementation of \"restoreState\", using the \"memento\" parameter alone might create a data duplicate instead of reusing the same data instance."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The new method is used as part of the \"copy layer\" feature for 3D objects. No change was required for 2D layers since 2D layer factories already had this method."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"f-the-cominteractiveintviewerapieditorsiobjecteditornodeprovider-interface-has-been-modified","__idx":7},"children":["F/ The com.interactive.intviewerapi.editors.IObjectEditorNodeProvider interface has been modified"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The method"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"public void setObjectEditorNodeVisible(boolean visible, Class selectedObjectEditorNodeClass)\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["has been changed to"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"public void setObjectEditorNodeVisible(boolean visible, Class<? extends IObjectEditorNode> selectedObjectEditorNodeClass)\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This affects any class extending AbstractLayer2D and AbstractObject3D."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"g-the-default-path-of-file-choosers-has-been-modified","__idx":8},"children":["G/ The default path of file choosers has been modified"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In 5.1.1, most file choosers were using the same DATA_PATH_PROPERTY environment variable as a default"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In 5.2, each chooser has its own environment variable. Seismic has SEISMIC_DATA_PATH_PROPERTY, horizons have HORIZON_DATA_PATH_PROPERTY, etc. The DATA_PATH_PROPERTY environment variable is a default if SEISMIC_DATA_PATH_PROPERTY is not known. If DATA_PATH_PROPERTY is not set, the home directory of the current user is used (instead of the INTViewer installation directory in previous versions)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["These environment variables are listed here:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/intviewer/api-reference"},"children":["environment"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"h-deprecated-methods-and-classes-have-been-removed","__idx":9},"children":["H/ Deprecated methods and classes have been removed"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Methods of com.interactive.intviewerapi.data.DataUtil have been removed"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"DataUtil.getExtensions(java.lang.String mime)\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["use MimeRepository.getDefault().getExtensions(mime) instead"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"DataUtil.getMimeDescription(java.lang.String mime)\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["use MimeRepository.getDefault().getName(mime) instead"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"DataUtil.getMimeTypes(java.lang.String dataType)\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["use MimeRepository.getDefault().getMimeTypes(dataType) instead"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"DataUtil.setExtensions(java.lang.String mime, java.lang.String[] exts)\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["use MimeRepository.getDefault().setExtensions(mime, exts) instead"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"DataUtil.writeData(IData data, FileObject fo, java.lang.String mime)\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["use writeData(data, null, fo, mime, new ILongTaskProgressMonitor.NullProgressMonitor()) instead"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"DataUtil.writeData(IData data, FileObject fo, java.lang.String mime, ILongTaskProgressMonitor m)\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["use writeData(data, null, fo, mime, m) instead"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"DataUtil.writeData(IData data, IDataQuery query, FileObject fo, java.lang.String mime)\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["use writeData(data, query, fo, mime, new ILongTaskProgressMonitor.NullProgressMonitor()) instead"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The com.interactive.intviewerapi.crs.CoordinateSystemUtil class has been removed"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"CoordinateSystemUtil.lookupCoordinateSystemChooserService()\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["use ICoordinateSystemChooserService.Factory.getInstance()"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"CoordinateSystemUtil.lookupCoordinateSystemTransformationService()\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["use ICoordinateSystemTransformationService.Factory.getInstance()"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The com.interactive.intviewerapi.util.ExtensionPoints class has been removed"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the NetBeans \"<this layer in context>\" node in your project to explore graphically all extension points."]}]},"headings":[{"value":"Incompatible API Changes In INTViewer 5 2","id":"incompatible-api-changes-in-intviewer-5-2","depth":1},{"value":"Incompatible API Changes in INTViewer 5.2","id":"incompatible-api-changes-in-intviewer-52","depth":2},{"value":"A/ The com.interactive.intviewerapi.IObjectAction interface uses Java generics","id":"a-the-cominteractiveintviewerapiiobjectaction-interface-uses-java-generics","depth":3},{"value":"B/ The ISeismicReader.findFirstTrace method has been replaced by ISeismicReader.findTracesWithin","id":"b-the-iseismicreaderfindfirsttrace-method-has-been-replaced-by-iseismicreaderfindtraceswithin","depth":3},{"value":"C/ Traces are aligned by default in XSection windows","id":"c-traces-are-aligned-by-default-in-xsection-windows","depth":3},{"value":"D/ The com.interactive.intviewerapi.plugins.traceprocessor.ISeismicProcessor interface has changed","id":"d-the-cominteractiveintviewerapipluginstraceprocessoriseismicprocessor-interface-has-changed","depth":3},{"value":"E/ The com.interactive.intviewerapi.objects3d.IObject3DFactory interface has changed","id":"e-the-cominteractiveintviewerapiobjects3diobject3dfactory-interface-has-changed","depth":3},{"value":"F/ The com.interactive.intviewerapi.editors.IObjectEditorNodeProvider interface has been modified","id":"f-the-cominteractiveintviewerapieditorsiobjecteditornodeprovider-interface-has-been-modified","depth":3},{"value":"G/ The default path of file choosers has been modified","id":"g-the-default-path-of-file-choosers-has-been-modified","depth":3},{"value":"H/ Deprecated methods and classes have been removed","id":"h-deprecated-methods-and-classes-have-been-removed","depth":3}],"frontmatter":{"title":"Incompatible API Changes In INTViewer 5 2","pageId":"intviewer-platform-and-modules/incompatible-api-changes-in-intviewer-5-2","seo":{"title":"Incompatible API Changes In INTViewer 5 2"}},"lastModified":"2026-10-22T14:32:05.577Z","pagePropGetterError":{"message":"","name":""}},"slug":"/solutions/intviewer/intviewer-platform-and-modules/incompatible-api-changes-in-intviewer-5-2","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}