API / geotoolkit / seismic / data / AbstractSegyReader / AbstractSegyReader
data.AbstractSegyReader.AbstractSegyReader
Defines an abstract SEG-Y reader
↳
AbstractSegyReader↳↳
SegyReader
Constructors
Methods
Constructors
• Protected new AbstractSegyReader(options?)
Creates reader
| Name | Type | Description |
|---|---|---|
Optional options | Options | options or instance of format to specify the trace data format and location of headers |
SeismicReader.constructor
Methods
▸ Protected copyConstructor(src, deepCopy?): AbstractSegyReader
Copy constructor function.
Function used as part of the cloning mechanism.
Implementations should copy the given instance state to this instance.
| Name | Type | Description |
|---|---|---|
src | AbstractSegyReader | Source to copy from |
Optional deepCopy | boolean | deep copy |
this
▸ dispose(): void
Dispose.
void
▸ getClassName(): string
string
▸ getDataFormat(): SeismicFormat
Return SEG-Y data format
seismic data format
▸ Abstract getFileSize(): number
Return file size in bytes
number
▸ getMetaData(): SeismicMetaData
Returns seismic meta data information
▸ getModelLimits(): Rect
Returns seismic model limits
▸ getNullValue(): number
Returns null value
number
null value
▸ getNumberOfSamples(): number
Returns number of samples
number
SeismicReader.getNumberOfSamples
▸ getNumberOfTraces(): number
Returns number of traces
number
SeismicReader.getNumberOfTraces
▸ getOptions(): any
Returns supported extra options
any
options options
▸ getOriginalMetaData(): SeismicMetaData
Returns seismic original meta data information before any decimation
SeismicReader.getOriginalMetaData
▸ getSampleRate(): number
Returns sample rate
number
▸ getStatistics(): Statistics
Return the currently computed seismic statistics.
Important Note: SEGY Statistics are computed lazily, and first require a call to async method readDataSetStatistics(callback). If statistics are not updated, defaults values will be returned instead and will not reflect the actual stats.
min, max, average, rms
▸ Protected getTaskScheduler(): TaskScheduler
Returns task scheduler
the task scheduler
▸ getTimeStamp(): number
Return the value to indicate if data was changed
number
▸ getTraceHeaderFields(): FieldDesc[]
Returns an array of field descriptors for the dataset read by this seismic reader.
array of header descriptors
SeismicReader.getTraceHeaderFields
▸ Protected getTraceOffset(traceId): number
Return offset in the SEG-Y file
| Name | Type | Description |
|---|---|---|
traceId | number | trace id |
number
position in the file in bytes
▸ hasEventListener(type, callback?): boolean
Check if a list of event listeners for this type contains this listener
| Name | Type | Description |
|---|---|---|
type | string | type of event or property |
Optional callback | Function | to be called, if null, check if any callback is registered |
boolean
SeismicReader.hasEventListener
▸ invalidate(rect?): void
Invalidate data and notify that data is changed
| Name | Type | Description |
|---|---|---|
Optional rect | Rect | optional area of tracers and samples to invalidate. It is not supported now |
void
▸ isDisposed(): boolean
Returns whether this object has been disposed
boolean
▸ isSilent(): boolean
Return true if the event dispatcher doesn't notify any events
boolean
▸ loadMetaData(callback): void
Load SeismicMetaData seismic meta data
| Name | Type | Description |
|---|---|---|
callback | (reader: SeismicReader) => void | method to be called when data is ready |
void
▸ notify<E>(type, source, args?): AbstractSegyReader
Notify listeners
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | event types |
source | SeismicReader | of the event |
Optional args | EventMap[E] | arguments of the event |
this
▸ off<E>(type?, callback?): AbstractSegyReader
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.
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
Optional type | E | type of the event |
Optional callback | (eventType: E, sender: AbstractSegyReader, args: EventMap[E]) => void | function to be called |
this
▸ on<E>(type, callback): AbstractSegyReader
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.
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | type of event or property |
callback | (eventType: E, sender: AbstractSegyReader, args: EventMap[E]) => void | to be called |
this
▸ queryInterface<T>(someInterface): InstanceType<T>
Returns interface, if reader can provide it
| Name | Type |
|---|---|
T | extends Constructor<any> |
| Name | Type | Description |
|---|---|---|
someInterface | T | interface |
InstanceType<T>
internal instance of this interface
▸ Abstract readBinarySection(callback, start, end): void
Read a binary section
| Name | Type | Description |
|---|---|---|
callback | ReadBinarySectionCallback | callback function to return binary data |
start | number | start position in bytes |
end | number | end position in bytes |
void
▸ readDataSetStatistics(callback, calcTraces?): void
Asynchronously read SEG-Y statistics. This method reads maximum calcTraces from data and calculate statistics based on it.
This method must be called to initialize statistics, in order for getStatistics() to return the right values.
| Name | Type | Description |
|---|---|---|
callback | (reader: AbstractSegyReader, statistics: Statistics) => void | method to be called when statistics will be calculated. |
Optional calcTraces | number | number of traces to calculate statistics |
void
▸ Protected readTraceIndices(traceIndices): Promise<Uint8Array[] | ArrayBuffer[]>
This methods is called if it is necessary to read a individual traces. The default implementation calls readBinarySection for each trace in a parallel. The solve of promise can return a array of binary data for each trace or one buffers with data for all requested traces
| Name | Type | Description |
|---|---|---|
traceIndices | number[] | array on trace indices to be loaded |
Promise<Uint8Array[] | ArrayBuffer[]>
▸ Protected readTraceRange(traceFrom, traceTo): Promise<ArrayBuffer | Uint8Array>
This methods is called if it is necessary to read a trace range.
| Name | Type | Description |
|---|---|---|
traceFrom | number | from trace |
traceTo | number | from trace |
Promise<ArrayBuffer | Uint8Array>
▸ select(query, callback): void
Returns seismic trace section
| Name | Type | Description |
|---|---|---|
query | SelectQuery | a query in JSON format. Should contain parameters relevant to the trace, such as "from", "to", "headers", and "samples" |
callback | SelectCallback | callback to be called then section is loaded. This method has QueryResult |
void
▸ setSilent(bool): AbstractSegyReader
Set silent mode
| Name | Type | Description |
|---|---|---|
bool | boolean | flag to enable silent mode |
this
▸ setStatistics(statistics): void
Sets statistics
| Name | Type | Description |
|---|---|---|
statistics | Statistics | min, max, average, rms |
void
▸ update(options?, callback?): void
Update seismic query and returns meta information
| Name | Type | Description |
|---|---|---|
Optional options | Record<string, any> | this specifies the condition of the request |
Optional callback | UpdateCallback | method to be called when data is ready |
void
▸ Protected updateTimeStamp(): void
Update time stamp
void
▸ Static getClassName(): string
string