Last updated

API / geotoolkit3d / scene / seismic / SliceMaterial / SliceMaterial

Class: SliceMaterial

seismic.SliceMaterial.SliceMaterial

A seismic slice material.

The seismic slice material is supposed to be used in conjunction with Slice.
It is responsible for creating and managing the textures required to render a seismic cross section.

To do so, it will create a SeismicPipeline using the given SeismicReader.

As rasterization process is delegated to the SeismicPipeline, it supports any pipeline configuration (Colormap, interpolation, etc).
At initialization time using 'options.pipeline.options'.
And at runtime using getPipeline().setOptions().

This material also supports an 'overlay' feature that lets you provide a group containing 2D shapes.
The content of this group will be rendered on top of the seismic.
This group model limits and bounds will be automatically set to the correct values.
The group's content should use coordinates in trace/sample domain.
Note that this group will be rasterized in a way similar to how the seismic is rasterized itself.

Example

// Default pipeline configuration is:
{
'normalization': {
'type': NormalizationType.RMS,
'scale': 1
},
'plot': {
'type': {
'wiggle': false,
'interpolateddensity': true
},
'decimationspacing': 5
},
'colors': {
'colormap': SeismicColors.getDefault().createNamedColorMap("WhiteBlack", 320)
}
}

Hierarchy

Table of contents

Constructors
Methods

Contents

Constructors

new SliceMaterial(options)

new SliceMaterial(options)

Parameters

Name Type
optionsOptions

Overrides

EventDispatcher.constructor

Methods

dispose

dispose(): void

Dispose method for SliceMaterial. Specifically for disposing of pipeline memory reference

Returns

void

Overrides

EventDispatcher.dispose


disposeMaterials

disposeMaterials(): void

Dispose Materials

Returns

void


disposeNewMaterials

disposeNewMaterials(): void

Dispose the Materials used for the next tile render. For internal use only.

Returns

void


disposeOverlayDatas

disposeOverlayDatas(): void

Dispose Overlay Datas

Returns

void


getClassName

getClassName(): string

Returns

string

Inherited from

EventDispatcher.getClassName


getOpacity

getOpacity(): number

Get the opacity

Returns

number

The opacity


getOptions

getOptions(): OptionsBaseOut

Get the SliceMaterial options

Returns

OptionsBaseOut


getOverlay

getOverlay(): Group<Node>

Returns a group that can be used to render 2D shapes on top of the seismic slice.
The coordinate system of the group is in trace/samples.

Returns

Group<Node>

The overlay group


getPipeline

getPipeline(): SeismicPipeline

Get the internal pipeline

Returns

SeismicPipeline

The internal pipeline


hasEventListener

hasEventListener(type, callback?): boolean

Check if a list of event listeners for this type contains this listener

Parameters

Name Type Description
typestringtype of event or property
Optional callbackFunctionto be called, if null, check if any callback is registered

Returns

boolean

Inherited from

EventDispatcher.hasEventListener


isDisposed

isDisposed(): boolean

Returns whether this object has been disposed

Returns

boolean

Inherited from

EventDispatcher.isDisposed


isSilent

isSilent(): boolean

Return true if the event dispatcher doesn't notify any events

Returns

boolean

Inherited from

EventDispatcher.isSilent


notify

notify(type, source, args?): SliceMaterial

Notify listeners

Parameters

Name Type Description
typestringevent types
sourceanyof the event
Optional argsanyarguments of the event

Returns

SliceMaterial

this

Inherited from

EventDispatcher.notify


off

off<E>(type?, callback?): SliceMaterial

Detach listener on event. Calling .off() with no arguments removes all attached listeners. Calling .off(type) with no callback removes all attached listeners for specific type.

Type parameters

NameType
Eextends string

Parameters

Name Type Description
Optional typeEtype of the event
Optional callback(eventType: E, sender: SliceMaterial, args: EventMap[E]) => voidfunction to be called

Returns

SliceMaterial

this

Overrides

EventDispatcher.off


on

on<E>(type, callback): SliceMaterial

Attach listener on event that will be called whenever the specified event is delivered to the target

If the callback function is already in the list of event listeners for this target, the function is not added a second time.

If a particular anonymous function is in the list of event listeners registered for a certain target, and then later in the code, an identical anonymous function is given in an "on" call, the second function will also be added to the list of event listeners for that target.

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEtype of event or property
callback(eventType: E, sender: SliceMaterial, args: EventMap[E]) => voidto be called

Returns

SliceMaterial

this

Overrides

EventDispatcher.on


resetTiles

resetTiles(): void

Resets the slice tiles, filling them by the loading color defined by the user. Usually used when updating the slice, such as moving the slice along its axis, thus requiring some time to fetch the new samples and redraw the seismic slice.

Returns

void


setLOD

setLOD(lod, minLod?, maxLod?): Promise<void>

Sets level of details if it is enabled

Deprecated

since 4.1, LOD is temporarily unavailable but will be back soon, with a different API.

Parameters

Name Type Description
lodnumberlevel of details. if level is less then current level the current is used
Optional minLodnumberminimum level of details
Optional maxLodnumbermaximum level of details

Returns

Promise<void>

a new generic promise


setOpacity

setOpacity(value): void

Set opacity property of the slice.

Parameters

Name Type Description
valuenumberthe opacity value from 0 (transparent) to 1 (opaque).

Returns

void


setOptions

setOptions(options): SliceMaterial

Set the SliceMaterial options

Parameters

Name Type
optionsOptionsBase

Returns

SliceMaterial


setSilent

setSilent(bool): SliceMaterial

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode

Returns

SliceMaterial

this

Inherited from

EventDispatcher.setSilent


updateLOD

updateLOD(lod): Promise<void>

Manually update this Slice level of detail. For internal use only.

Parameters

Name Type
lodnumber

Returns

Promise<void>


getClassName

Static getClassName(): string

Returns

string

Inherited from

EventDispatcher.getClassName