API / geotoolkit3d / data / reservoir / hexahedral / voxel / VoxelGridData / 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 |------>
A ------- B __
|\ |\ \
| \ | \ \ J
| C ------- D _ v
E -|----- F | |
\ | \ | | K
\| \| |
G ------- H v↳
VoxelGridData
Constructors
- [new VoxelGridData(options)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit3d.data-8.reservoir-1.hexahedral.voxel.voxelgriddata.voxelgriddata.md#new voxelgriddata(options))
Methods
Constructors
• new VoxelGridData(options)
| Name | Type |
|---|---|
options | VolumeData |
AbstractReservoirData.constructor
Methods
▸ dispose(): void
Dispose this grid data to allow for garbage collection.
void
▸ getCellIJKIterator(): CellIJKIterator
Return a cell iterator for this grid structure, conveniently iterating over each cell index and providing the relevant I,J & K indices.
the Cell iterator
▸ 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].
| Name | Type | Description |
|---|---|---|
index | number | the cell index in the grid. Index start at 0, and must be inferior to the total number of cells. |
Optional targetIJK | number[] | the optional array to contain the resulting i, j, k indices, to avoid new object creation. |
number[]
▸ getClassName(): string
string
AbstractReservoirData.getClassName
▸ 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.)
number
▸ getIJKCount(): IJKIndex
Returns the ijk count for this VoxelGridData.
▸ getIndexForCell(i, j, k): number
Returns the index for the cell based on the given i j k index
| Name | Type |
|---|---|
i | number |
j | number |
k | number |
number
index for this i j k cell (null if the cell doesn't exist)
▸ getMetaData(): GridMetaData
Return this VoxelGrid's metadata
AbstractReservoirData.getMetaData
▸ getNumberOfCells(): number
Returns the number of cells in the data object. This also includes cells with NaN and nullvalues.
number
number of cells
AbstractReservoirData.getNumberOfCells
▸ 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)
| Name | Type | Description |
|---|---|---|
index | number | the cell index to check the validity of. |
boolean
true if the cell index is valid, false if not.
▸ Static getClassName(): string
string