{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Using The Matlab API","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":"using-the-matlab-api","__idx":0},"children":["Using The Matlab API"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"sending-a-trace-to-matlab","__idx":1},"children":["Sending a Trace to MATLAB"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The MATLAB API enables INTViewer to send & receive data, execute commands, scripts and functions on a MATLAB environment. This walkthrough will go through the basics of sending one trace to MATLAB."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Reviewing Dependencies"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This MATLAB example module will requires the following modules that are part of the INTViewer platofrm:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["IntviewerCore"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["MatlabCore"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Seismic2D"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["SeismicData"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Viewer2D"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Utilities API (provided with NetBeans)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["UI Utilities API (provided with NetBeans)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Lookup API (provided with NetBeans)"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create a new NetBeans module."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["File"]}," -> ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New Project"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In the New Project wizard, select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["NetBeans Modules"]}," from the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Categories"]}," list and ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Module"]}," from the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Projects"]}," list and click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Next >"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Project Name"]},", specify matlabexample"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select option ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Standalone Module"]}," and make sure to specify the INTViewer platform in the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["NetBeans Platform"]}," field."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Next >"]}," and specify matlabexample for the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Code Name Base"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Click on ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Finish"]},"."]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Configuring your module"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["In the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Projects"]}," tree, right-click on the module ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["matlabexample"]}," and select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Properties"]}," from the list."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Under ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Categories"]},", select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Libraries"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Java Platform"]}," JDK1.7."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click on the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Add"]}," button next to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Module Dependencies"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["In the list, select IntviewerCore, Lookup API, MatlabCore, Seismic2D, SeismicData, Utilities API and Viewer2D, and click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["OK"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["OK"]}," in the Project Properties Dialog."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Creating the trace processing class."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["matlabexample"]}," package right and select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New"]}," -> ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Java Class"]}," from the contextual menu."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Name The class ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["SendFirstTraceAction"]}," and click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Finish"]},"."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Make the class extend ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["SystemAction"]}," and implement ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["LookupListener"]}," and add the imports"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Implement all abstract methods, this will create the basic structure of the class for you."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Add a new global variable and the constructor below."]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note"]},": The layerResult will contain the currently selected seismic layer in INTViewer."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create a new method called sendFirstTrace and as shown below"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Fill in the methods created for you previously as shown below"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Adding the action to the layer.xml"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Right click on the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["matlabexample"]}," package and select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New"]}," -> ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Other"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Module Development"]}," click on ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["XML Layer"]}," and click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Next"]},"."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Then click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Finish"]},"."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Modify the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["layer.xml"]}," to look like below. This will create a new Menu called MatlabExample with the action we created in it in INTViewer."]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Running the project"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Run the project, once loaded click on the Connect to MATLAB button."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once connected, the status of the icon will change."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Load seismic data into a new XSection window, then select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["MatlabExample"]}," -> ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Send first trace"]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The trace should now be in the MATLAB environment."]}]},"headings":[{"value":"Using The Matlab API","id":"using-the-matlab-api","depth":1},{"value":"Sending a Trace to MATLAB","id":"sending-a-trace-to-matlab","depth":2}],"frontmatter":{"title":"Using The Matlab API","pageId":"intviewer-tutorial/using-intviewer-components-walkthroughs/using-the-matlab-api","seo":{"title":"Using The Matlab API"}},"lastModified":"2026-10-22T14:32:05.578Z","pagePropGetterError":{"message":"","name":""}},"slug":"/solutions/intviewer/intviewer-tutorial/using-intviewer-components-walkthroughs/using-the-matlab-api","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}