In this example, we will add a contextual menu to log curve nodes.
This contextual menu create a Segy file with one trace. Each sample in that trace represents a value in the log curve. Null values are converted to a zero amplitude.
You can download this script at the bottom of this page.
INTViewer's Python API doesn't have classes to create virtual seismic data. However, there is a public API Java class "MemorySeismicData" that can be used to create in-memory datasets (see https://sites.google.com/a/geotoolkit.net/intviewer/intviewer-apis-for-data/working-with-seismic/loading-seismic-datasets-in-memory for more information)
As a result, this script mixes Python classes and Java classes, importing 3 java classes:
To convert the Java "MemorySeismicData" into a Python "SeismicData", the SeismicData.Wrapper class is used (see line #35).
To make this Python script available in the contextual menu of node, place it in the Contextual_Log_Curve_Node directory of your "Python Scripts" directory.
Go to Tools->Options->Environment->Python Scripts (or Tools->Options->Python->Scripts in INTViewer 5.2) and click "Refresh from Disk". Your script should be listed automatically.