Skip to content

API / geotoolkit3d / data / reservoir / hexahedral / voxel / VoxelGridData / VoxelGridData

Class: VoxelGridData

voxel.VoxelGridData.VoxelGridData

This class host the VoxelGrid data using hexahedral vector cell structure. Each cell has the same shape within the grid, defined by 3 vectors.<br> One value per cell can be added for both filtering and render coloration purpose.<br> Additionally, multiple additional data can be defined per cell to be used along user-defined filters, allowing for very customizable cell filtering.<br> The cell data format expected by the VoxelGridData constructor:<ul> <li>The voxel cell data format require 3 vectors to define the general cell shape.</li> <li>Cells do not need to be cubes, but opposite faces must be parallel.</li> <li>Cell values need to be passed as a contiguous 3D array, but it is possible to define empty cells by setting its value to NaN or a defined nullvalue.</li> </ul> The cells values are expected in the IJK order, see example<br>

Example

I |------&gt;

A ------- B            __
|\        |\            \
| \       | \            \  J
|  C ------- D     _      v
E -|----- F  |     |
\ |       \ |     | K
\|        \|     |
G ------- H     v

Hierarchy

Table of contents

Constructors
  • [new VoxelGridData(options)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit3d.data-8.reservoir-1.hexahedral.voxel.voxelgriddata.voxelgriddata.md#new voxelgriddata(options))
Methods

Contents

Constructors

new VoxelGridData(options)

• new VoxelGridData(options)

Parameters

Name Type
optionsVolumeData

Overrides

AbstractReservoirData.constructor

Methods

dispose

▸ dispose(): void

Dispose this grid data to allow for garbage collection.

Returns

void


getCellIJKIterator

▸ getCellIJKIterator(): CellIJKIterator

Return a cell iterator for this grid structure, conveniently iterating over each cell index and providing the relevant I,J & K indices.

Returns

CellIJKIterator

the Cell iterator


getCellIJKbyIndex

▸ getCellIJKbyIndex(index, targetIJK?): number[]

Return the IJK index of the cell identified by the given position in the grid, in the format [i, j, k].

Parameters

Name Type Description
indexnumberthe cell index in the grid. Index start at 0, and must be inferior to the total number of cells.
Optional targetIJKnumber[]the optional array to contain the resulting i, j, k indices, to avoid new object creation.

Returns

number[]


getClassName

▸ getClassName(): string

Returns

string

Inherited from

AbstractReservoirData.getClassName


getGridFullVolume

▸ getGridFullVolume(): number

Returns the total volume measure of this grid.<br> Computed by the sum of the volume of every valid cells, ignoring current user filters.<br> The unit of the volume measurement is based on the unit used in cells coordinates, to user discretion. (ex: if cells coordinates are in meters, then the volume will be in cubic meters. If feet, then cubic feet, and so on.)

Returns

number


getIJKCount

▸ getIJKCount(): IJKIndex

Returns the ijk count for this VoxelGridData.

Returns

IJKIndex


getIndexForCell

▸ getIndexForCell(i, j, k): number

Returns the index for the cell based on the given i j k index

Parameters

Name Type
inumber
jnumber
knumber

Returns

number

index for this i j k cell (null if the cell doesn't exist)


getMetaData

▸ getMetaData(): GridMetaData

Return this VoxelGrid's metadata

Returns

GridMetaData

Overrides

AbstractReservoirData.getMetaData


getNumberOfCells

▸ getNumberOfCells(): number

Returns the number of cells in the data object. This also includes cells with NaN and nullvalues.

Returns

number

number of cells

Overrides

AbstractReservoirData.getNumberOfCells


isCellIndexValid

▸ isCellIndexValid(index): boolean

Return true if the given cell index match an existing cell with a valid value, false if not. Ignore user filters.<br> The cell must belong in the grid ijk bounds, and must be a valid value (must be a finite number different from the user-defined nullvalue)

Parameters

Name Type Description
indexnumberthe cell index to check the validity of.

Returns

boolean

true if the cell index is valid, false if not.


getClassName

▸ Static getClassName(): string

Returns

string

Inherited from

AbstractReservoirData.getClassName