Loading Seismic Datasets in Memory
Creating a memory based seismic dataset
You can use class com.interactive.intviewerapi.data.seismic.MemorySeismicData to create a memory based seismic dataset.
In the example below, we create a dataset with random sample values:
MEMORYSEISMICDATA.JAVA
SeismicKeyRange timeKey = new SeismicKeyRange("Time", 0, 5, 0.001);
IFieldDesc inlineFieldDesc = new FieldDesc("INLINE", 1, true);
IFieldDesc xlineFieldDesc = new FieldDesc("XLINE", 2, true);
IFieldDesc cdpXFieldDesc = new FieldDesc("CDPX", 3, false);
IFieldDesc cdpYFieldDesc = new FieldDesc("CDPY", 4, false);
IFieldDesc[] arrayOfFieldDesc = new IFieldDesc[4];
arrayOfFieldDesc[0] = inlineFieldDesc;
arrayOfFieldDesc[1] = xlineFieldDesc;
arrayOfFieldDesc[2] = cdpXFieldDesc;
arrayOfFieldDesc[3] = cdpYFieldDesc;
MemorySeismicData memoryData = new MemorySeismicData("My Data",
ISeismicData.ORDER_XSECTION, 5001, timeKey, arrayOfFieldDesc);
List<Trace> listOfTraces = new ArrayList<Trace>();
for (int inline = 200; inline <= 300; inline++) {
for (int xline = 400; xline <= 600; xline++) {
Trace currentTrace = memoryData.createTrace();
currentTrace.putHeader(1, inline);
currentTrace.putHeader(2, xline);
currentTrace.putHeader(3, inline * xline);
currentTrace.putHeader(4, inline * xline / 4);
Random random = new Random();
float[] samples = new float[5001];
for (int i = 0; i < 5001; i++) {
samples[i] = random.nextFloat();
}
currentTrace.setSamples(samples);
listOfTraces.add(currentTrace);
}
}
memoryData.setTraceList(listOfTraces);
The full API of the MemorySeismicData is available.
Loading a seismic dataset in memory for 2D Seismic Map Layers
A dedicated API allows a dataset to be loaded into memory upon creation of a seismic map layer. This is the programmatic equivalent to the screen a user encounters when a seismic dataset has not been transposed.
The "Inline and Xline Keys" section is displayed only if the dataset has at least 4 keys.
If a dataset has exactly 3 keys, follow this template:
IMapWindow window = IMapWindow.factory.createWindow();
IData data = IData.factory.createNewInstance(...);
NamedProps props = new NamedProps();
props.putProperty(IMapSeismicLayer.LOAD_IN_MEMORY_FORMAT, IMapSeismicLayer.MEMORY_FLOAT);
IMapSeismicLayer.factory.createLayer(window, data, props, false);
If a dataset has at least 4 keys, follow this template:
IMapWindow window = IMapWindow.factory.createWindow();
IData data = IData.factory.createNewInstance(...);
NamedProps props = new NamedProps();
props.putProperty(IMapSeismicLayer.LOAD_IN_MEMORY_FORMAT, IMapSeismicLayer.MEMORY_FLOAT);
props.putProperty(IMapSeismicLayer.INLINE_KEY_NAME, "INLINE");
props.putProperty(IMapSeismicLayer.XLINE_KEY_NAME, "XLINE");
IMapSeismicLayer.factory.createLayer(window, data, props, false);
Loading a seismic dataset in memory for 3D Seismic Volume Objects
You can load a dataset into memory upon creation of a seismic volume object.
The "Inline and Xline Keys" section is displayed only if the dataset has at least 4 keys.
If a dataset has exactly 3 keys, follow this template:
IWindow3D window = IWindow3D.factory.createWindow();
IData data = IData.factory.createNewInstance(...);
NamedProps props = new NamedProps();
props.putProperty(ISeismicVolumeObject3D.LOAD_IN_MEMORY_FORMAT, ISeismicVolumeObject3D.MEMORY_FLOAT);
ISeismicVolumeObject3D.factory.createObject3D(window, data, props, false);
If a dataset has at least 4 keys, follow this template:
IWindow3D window = IWindow3D.factory.createWindow();
IData data = IData.factory.createNewInstance(...);
NamedProps props = new NamedProps();
props.putProperty(ISeismicVolumeObject3D.LOAD_IN_MEMORY_FORMAT, ISeismicVolumeObject3D.MEMORY_FLOAT);
props.putProperty(ISeismicVolumeObject3D.INLINE_KEY_NAME, "INLINE");
props.putProperty(ISeismicVolumeObject3D.XLINE_KEY_NAME, "XLINE");
ISeismicVolumeObject3D.factory.createObject3D(window, data, props, false);