public interface Dataset extends Node
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getData()
Gets the data from the HDF5 dataset and converts it to a Java object.
|
java.lang.Object |
getData(long[] sliceOffset,
int[] sliceDimensions)
Gets a slice of data from the HDF5 dataset and converts it to a Java object.
|
java.lang.Object |
getDataFlat()
Gets the data from the HDF5 dataset and converts it to a Java object, it differs from
getData() as the
data will be flat (i.e. |
DataLayout |
getDataLayout()
Gets the data layout of this dataset.
|
DataType |
getDataType()
Gets the
DataType that is used to represent the data in the HDF5-file. |
int[] |
getDimensions()
Gets the dimensions of this dataset
|
java.lang.Object |
getFillValue()
Gets the fill value for this dataset or
null if not defined. |
java.util.List<PipelineFilterWithData> |
getFilters()
Gets the filters applied to this dataset with the corresponding filter data.
|
java.lang.Class<?> |
getJavaType()
Gets the Java type that will be used to represent this data.
|
long[] |
getMaxSize()
Gets the max size of this dataset.
|
long |
getSize()
Gets the total number of elements in this dataset.
|
long |
getSizeInBytes()
Gets the size of this dataset.
|
long |
getStorageInBytes()
Gets the size of the storage used for this dataset in bytes.
|
boolean |
isCompound()
Checks if this dataset is a compound dataset.
|
boolean |
isEmpty()
Checks if this dataset is empty i.e holds no data and no storage is
allocated.
|
boolean |
isScalar()
Checks if this dataset is scalar i.e is a single element with no dimensions.
|
boolean |
isVariableLength()
Checks if this dataset is a variable length dataset.
|
getAddress, getAttribute, getAttributes, getFile, getFileAsPath, getHdfFile, getName, getParent, getPath, getType, isAttributeCreationOrderTracked, isGroup, isLink
long getSize()
long getSizeInBytes()
number of elements * size of each element
long getStorageInBytes()
getSizeInBytes()
due to the use of compression.int[] getDimensions()
boolean isScalar()
true
if dataset if scalar false
otherwiseboolean isEmpty()
true
if dataset if empty false
otherwiseboolean isCompound()
true
if this is a compound dataset, false
otherwiseboolean isVariableLength()
true
if this is a variable length dataset, false
otherwiselong[] getMaxSize()
getDimensions()
DataLayout getDataLayout()
java.lang.Object getData()
The returned type will be either:
getJavaType()
if the
dataset is scalar (isScalar()
).getDimensions()
. The type of the array will be the return value of
getJavaType()
.Map
if isCompound()
returns true
null
if the dataset is empty (isEmpty()
).null
if the
dataset is empty.java.lang.Object getDataFlat()
getData()
as the
data will be flat (i.e. 1D). Can offer improved performance over getData()
for multiple dimension
arrays.
The type of the returned array will be that returned by getJavaType()
. The size of the array returned
will be the product of the dataset dimensions. For empty datasets an empty array will be returned. For scalar
datasets an array with a single element will be returned.
java.lang.Object getData(long[] sliceOffset, int[] sliceDimensions)
The returned object will be an array with the dimensions specified by sliceDimensions
and type of
the array will be the return value of getJavaType()
.
sliceOffset
- the position in the dataset the slice starts. Must have length equal to number of dimensionssliceDimensions
- the dimensions of the slice to return. Must have length equal to number of dimensionsInvalidSliceHdfException
- if the sliceOffset
or sliceDimensions
are invalidHdfException
- if the dataset can't be slicedjava.lang.Class<?> getJavaType()
DataType getDataType()
DataType
that is used to represent the data in the HDF5-file.java.lang.Object getFillValue()
null
if not defined. If
it is defined the type will be that returned by getJavaType()
.null
if not definedjava.util.List<PipelineFilterWithData> getFilters()