API / geotoolkit / seismic / data / BinaryHeader / BinaryHeader
data.BinaryHeader.BinaryHeader
Define Binary Header.
↳
BinaryHeader
Constructors
Methods
Constructors
• new BinaryHeader(size, headerType)
Creates data header
| Name | Type | Description |
|---|---|---|
size | number | number of bytes |
headerType | HeaderType | type of traceheader |
DataHeader.constructor
Methods
▸ addField(field): void
Add field to fields array
| Name | Type | Description |
|---|---|---|
field | BinaryField | Binary field inside header |
void
▸ containsField(fieldType): boolean
Returns true if fieldType exists in fields array
| Name | Type | Description |
|---|---|---|
fieldType | string | number | type of the field in the array |
boolean
▸ containsFieldByName(fieldName): boolean
Returns true if fieldName exists in fields array
| Name | Type | Description |
|---|---|---|
fieldName | string | name that gives information about the field |
boolean
▸ getByteOrder(): string
Returns byte order. "BIG_ENDIAN" or LITTLE_ENDIAN"
string
▸ getField(fieldType): BinaryField
Returns field with correct fieldType
| Name | Type | Description |
|---|---|---|
fieldType | string | type of the binary field |
▸ getFieldByIdentifier(identifier): BinaryField
Get a field by its identifier
| Name | Type | Description |
|---|---|---|
identifier | string | number | unique header number |
DataHeader.getFieldByIdentifier
▸ getFieldByIndex(index): BinaryField
Returns field for corresponding index
| Name | Type | Description |
|---|---|---|
index | number | index for the array of field data |
▸ getFieldByName(fieldName): BinaryField
Returns field with correct fieldName
| Name | Type | Description |
|---|---|---|
fieldName | string | name that gives information about the field |
▸ getFieldValue(data, headerFieldId): number
Returns field value for a specific field id
| Name | Type | Description |
|---|---|---|
data | number[] | data |
headerFieldId | string | number |
number
▸ getFields(): BinaryField[]
Returns an array of the fields
▸ getHeaderType(): HeaderType
Return identifier (type)
▸ getIndexById(fieldId): number
Returns index of the field by fieldId or -1 if it is not exist
| Name | Type | Description |
|---|---|---|
fieldId | string | number | field id that gives information about the field |
number
▸ getSize(): number
Return size
number
▸ parse(binary): number[]
Returns an array of the parsed fields. Each element in the parsed array has an index, which equals to index of the related field in the array of fields
| Name | Type | Description |
|---|---|---|
binary | ArrayBuffer | binary data |
number[]
▸ parseField(uint8binary, field): number
Parse a specific header
Throws
if field is null, uint8binary is null or if it not supported data format
| Name | Type | Description |
|---|---|---|
uint8binary | Uint8Array | array of 8-bit unsigned integers. |
field | BinaryField | the BinaryField |
number
The header value
▸ setByteOrder(order): BinaryHeader
Set byte order. True if order === "BIG_ENDIAN"
| Name | Type | Description |
|---|---|---|
order | string | the byte order |
this