Class H5S
Inheritance
Namespace: HDF.PInvoke
Assembly: HDF.PInvoke.dll
Syntax
public sealed class H5S : object
Fields
| Improve this Doc View SourceALL
Declaration
public const int ALL = null
Field Value
Type | Description |
---|---|
System.Int32 |
MAX_RANK
Define user-level maximum number of dimensions
Declaration
public const int MAX_RANK = null
Field Value
Type | Description |
---|---|
System.Int32 |
UNLIMITED
Declaration
public const System.UInt64 UNLIMITED = null
Field Value
Type | Description |
---|---|
System.UInt64 |
Methods
close(System.Int64)
Releases and terminates access to a dataspace. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-Close
Declaration
public static System.Int32 close(System.Int64 space_id)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | space_id | Identifier of dataspace to release. |
Returns
Type | Description |
---|---|
System.Int32 | Returns a non-negative value if successful; otherwise returns a negative value. |
copy(System.Int64)
Creates an exact copy of a dataspace. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-Copy
Declaration
public static System.Int64 copy(System.Int64 space_id)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | space_id | Identifier of dataspace to copy. |
Returns
Type | Description |
---|---|
System.Int64 | Returns a dataspace identifier if successful; otherwise returns a negative value. |
create(H5S.class_t)
Creates a new dataspace of a specified type. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-Create
Declaration
public static System.Int64 create(H5S.class_t type)
Parameters
Type | Name | Description |
---|---|---|
H5S.class_t | type | Type of dataspace to be created. |
Returns
Type | Description |
---|---|
System.Int64 | Returns a dataspace identifier if successful; otherwise returns a negative value. |
create_simple(Int32, System.UInt64*, System.UInt64*)
Creates a new simple dataspace and opens it for access. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-CreateSimple
Declaration
public static System.Int64 create_simple(int rank, System.UInt64*dims, System.UInt64*maxdims)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rank | Number of dimensions of dataspace. |
System.UInt64* | dims | Array specifying the size of each dimension. |
System.UInt64* | maxdims | Array specifying the maximum size of each dimension. |
Returns
Type | Description |
---|---|
System.Int64 | Returns a dataspace identifier if successful; otherwise returns a negative value. |
create_simple(Int32, System.UInt64[], System.UInt64[])
Creates a new simple dataspace and opens it for access. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-CreateSimple
Declaration
public static System.Int64 create_simple(int rank, System.UInt64[] dims, System.UInt64[] maxdims)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | rank | Number of dimensions of dataspace. |
System.UInt64[] | dims | Array specifying the size of each dimension. |
System.UInt64[] | maxdims | Array specifying the maximum size of each dimension. |
Returns
Type | Description |
---|---|
System.Int64 | Returns a dataspace identifier if successful; otherwise returns a negative value. |
decode(Byte[])
Decode a binary object description of data space and return a new object handle. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-Decode
Declaration
public static System.Int64 decode(byte[] buf)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buf | Buffer for the data space object to be decoded. |
Returns
Type | Description |
---|---|
System.Int64 | Returns an object ID(non-negative) if successful; otherwise returns a negative value. |
encode(System.Int64, Byte[], ref System.IntPtr)
Encode a data space object description into a binary buffer. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-Encode
Declaration
public static System.Int32 encode(System.Int64 obj_id, byte[] buf, ref System.IntPtr nalloc)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | obj_id | Identifier of the object to be encoded. |
System.Byte[] | buf | Buffer for the object to be encoded into. If the provided buffer is , only the size of buffer
needed is returned through nalloc .
|
System.IntPtr | nalloc | The size of the allocated buffer or the size of the buffer needed. |
Returns
Type | Description |
---|---|
System.Int32 | Returns a non-negative value if successful; otherwise returns a negative value. |
extent_copy(System.Int64, System.Int64)
Copies the extent of a dataspace. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-ExtentCopy
Declaration
public static System.Int32 extent_copy(System.Int64 dest_space_id, System.Int64 source_space_id)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | dest_space_id | The identifier for the dataspace to which the extent is copied. |
System.Int64 | source_space_id | The identifier for the dataspace from which the extent is copied. |
Returns
Type | Description |
---|---|
System.Int32 | Returns a non-negative value if successful; otherwise returns a negative value. |
extent_equal(System.Int64, System.Int64)
Determines whether two dataspace extents are equal. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-ExtentEqual
Declaration
public static System.Int32 extent_equal(System.Int64 space1_id, System.Int64 space2_id)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | space1_id | First dataspace identifier. |
System.Int64 | space2_id | Second dataspace identifier. |
Returns
Type | Description |
---|---|
System.Int32 | Returns 1 if equal, 0 if unequal, if successful; otherwise returns a negative value. |
get_select_bounds(System.Int64, System.UInt64[], System.UInt64[])
Gets the bounding box containing the current selection. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SelectBounds
Declaration
public static System.Int32 get_select_bounds(System.Int64 space_id, System.UInt64[] start, System.UInt64[] end)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | space_id | Identifier of dataspace to query. |
System.UInt64[] | start | Starting coordinates of the bounding box. |
System.UInt64[] | end | Ending coordinates of the bounding box, i.e., the coordinates of the diagonally opposite corner. |
Returns
Type | Description |
---|---|
System.Int32 | Returns a non-negative value if successful; otherwise returns a negative value. |
Remarks
The
start
and end
buffers must
be large enough to hold the dataspace rank number of coordinates.
get_select_elem_npoints(System.Int64)
Gets the number of points in the current point selection. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SelectElemNPoints
Declaration
public static System.Int64 get_select_elem_npoints(System.Int64 space_id)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | space_id | Identifier of dataspace to query. |
Returns
Type | Description |
---|---|
System.Int64 | Returns the number of points in the current dataspace point selection if successful. Otherwise returns a negative value. |
get_select_elem_pointlist(System.Int64, System.UInt64, System.UInt64, System.UInt64[])
Gets the list of points in a point selection. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SelectElemPointList
Declaration
public static System.Int32 get_select_elem_pointlist(System.Int64 space_id, System.UInt64 startpoint, System.UInt64 numpoints, System.UInt64[] buf)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | space_id | Dataspace identifier of selection to query. |
System.UInt64 | startpoint | Element point to start with. |
System.UInt64 | numpoints | Number of element points to get. |
System.UInt64[] | buf | List of element points selected. |
Returns
Type | Description |
---|---|
System.Int32 | Returns a non-negative value if successful; otherwise returns a negative value. |
get_select_hyper_blocklist(System.Int64, System.UInt64, System.UInt64, System.UInt64[])
Gets the list of hyperslab blocks in a hyperslab selection. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SelectHyperBlockList
Declaration
public static System.Int32 get_select_hyper_blocklist(System.Int64 space_id, System.UInt64 startblock, System.UInt64 numblocks, System.UInt64[] buf)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | space_id | Dataspace identifier of selection to query. |
System.UInt64 | startblock | Hyperslab block to start with. |
System.UInt64 | numblocks | Number of hyperslab blocks to get. |
System.UInt64[] | buf | List of hyperslab blocks selected. |
Returns
Type | Description |
---|---|
System.Int32 |
get_select_hyper_nblocks(System.Int64)
Get number of hyperslab blocks in a hyperslab selection. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SelectHyperNBlocks
Declaration
public static System.Int64 get_select_hyper_nblocks(System.Int64 space_id)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | space_id | Identifier of dataspace to query. |
Returns
Type | Description |
---|---|
System.Int64 | Returns the number of hyperslab blocks in a hyperslab selection if successful. Otherwise returns a negative value. |
get_select_npoints(System.Int64)
Determines the number of elements in a dataspace selection. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SelectNpoints
Declaration
public static System.Int64 get_select_npoints(System.Int64 space_id)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | space_id | Dataspace identifier. |
Returns
Type | Description |
---|---|
System.Int64 | Returns the number of elements in the selection if successful; otherwise returns a negative value. |
get_select_type(System.Int64)
Determines the type of the dataspace selection. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-GetSelectType
Declaration
public static H5S.sel_type get_select_type(System.Int64 space_id)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | space_id | Dataspace identifier. |
Returns
Type | Description |
---|---|
H5S.sel_type | Returns the dataspace selection type, a value of the enumerated datatype , if successful.
Otherwise returns a negative value.
|
get_simple_extent_dims(System.Int64, System.UInt64*, System.UInt64*)
Retrieves dataspace dimension size and maximum size. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-ExtentDims
Declaration
public static int get_simple_extent_dims(System.Int64 space_id, System.UInt64*dims, System.UInt64*maxdims)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | space_id | Identifier of the dataspace object to query |
System.UInt64* | dims | Pointer to array to store the size of each dimension. |
System.UInt64* | maxdims | Pointer to array to store the maximum size of each dimension. |
Returns
Type | Description |
---|---|
System.Int32 | Returns the number of dimensions in the dataspace if successful; otherwise returns a negative value. |
Remarks
Either or both of dims
and
maxdims
may be
NULL
.
get_simple_extent_dims(System.Int64, System.UInt64[], System.UInt64[])
Retrieves dataspace dimension size and maximum size. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-ExtentDims
Declaration
public static int get_simple_extent_dims(System.Int64 space_id, System.UInt64[] dims, System.UInt64[] maxdims)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | space_id | Identifier of the dataspace object to query |
System.UInt64[] | dims | Pointer to array to store the size of each dimension. |
System.UInt64[] | maxdims | Pointer to array to store the maximum size of each dimension. |
Returns
Type | Description |
---|---|
System.Int32 | Returns the number of dimensions in the dataspace if successful; otherwise returns a negative value. |
Remarks
Either or both of dims
and
maxdims
may be
NULL
.
get_simple_extent_ndims(System.Int64)
Determines the dimensionality of a dataspace. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-ExtentNdims
Declaration
public static int get_simple_extent_ndims(System.Int64 space_id)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | space_id | Identifier of the dataspace |
Returns
Type | Description |
---|---|
System.Int32 | Returns the number of dimensions in the dataspace if successful; otherwise returns a negative value. |
get_simple_extent_npoints(System.Int64)
Determines the number of elements in a dataspace. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-ExtentNpoints
Declaration
public static System.Int64 get_simple_extent_npoints(System.Int64 space_id)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | space_id | Identifier of the dataspace object to query |
Returns
Type | Description |
---|---|
System.Int64 | Returns the number of elements in the dataspace if successful; otherwise returns a negative value. |
get_simple_extent_type(System.Int64)
Determines the current class of a dataspace. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-ExtentType
Declaration
public static H5S.class_t get_simple_extent_type(System.Int64 space_id)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | space_id | Dataspace identifier. |
Returns
Type | Description |
---|---|
H5S.class_t | Returns a dataspace class name if successful; otherwise .
|
H5Sget_regular_hyperslab(System.Int64, System.UInt64[], System.UInt64[], System.UInt64[], System.UInt64[])
Retrieves a regular hyperslab selection. See https://www.hdfgroup.org/HDF5/docNewFeatures/VDS/H5Sget_regular_hyperslab.htm
Declaration
public static System.Int32 H5Sget_regular_hyperslab(System.Int64 space_id, System.UInt64[] start, System.UInt64[] stride, System.UInt64[] count, System.UInt64[] block)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | space_id | The identifier of the dataspace. |
System.UInt64[] | start | Offset of the start of the regular hyperslab. |
System.UInt64[] | stride | Stride of the regular hyperslab. |
System.UInt64[] | count | Number of blocks in the regular hyperslab. |
System.UInt64[] | block | Size of a block in the regular hyperslab. |
Returns
Type | Description |
---|---|
System.Int32 | Returns a non-negative value if successful; otherwise returns a negative value. |
Remarks
If a hyperslab selection is originally regular, then becomes irregular through selection operations, and then becomes regular again, the final regular selection may be equivalent but not identical to the original regular selection.
is_regular_hyperslab(System.Int64)
Determines whether a hyperslab selection is regular. See https://www.hdfgroup.org/HDF5/docNewFeatures/VDS/H5Sis_regular_hyperslab.htm
Declaration
public static System.Int32 is_regular_hyperslab(System.Int64 spaceid)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | spaceid | The identifier of the dataspace. |
Returns
Type | Description |
---|---|
System.Int32 | Returns or for
hyperslab selection if successful. Returns on
error or when querying other selection types such as point
selection.
|
is_simple(System.Int64)
Determines whether a dataspace is a simple dataspace. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-IsSimple
Declaration
public static System.Int32 is_simple(System.Int64 space_id)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | space_id | Identifier of the dataspace to query |
Returns
Type | Description |
---|---|
System.Int32 | When successful, returns a positive value, for , or 0 (zero), for . Otherwise
returns a negative value. |
offset_simple(System.Int64, System.Int64[])
Sets the offset of a simple dataspace. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-OffsetSimple
Declaration
public static System.Int32 offset_simple(System.Int64 space_id, System.Int64[] offset)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | space_id | The identifier for the dataspace object to reset. |
System.Int64[] | offset | The offset at which to position the selection. |
Returns
Type | Description |
---|---|
System.Int32 | Returns a non-negative value if successful; otherwise returns a negative value. |
Remarks
The offset array must be the same number of elements as the number of dimensions for the dataspace. If the offset array is set to
NULL
, the offset for the dataspace is reset
to 0.
select_all(System.Int64)
Selects an entire dataspace. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SelectAll
Declaration
public static System.Int32 select_all(System.Int64 dspace_id)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | dspace_id | The identifier for the dataspace for which the selection is being made. |
Returns
Type | Description |
---|---|
System.Int32 | Returns a non-negative value if successful; otherwise returns a negative value. |
select_elements(System.Int64, H5S.seloper_t, System.IntPtr, System.UInt64[])
Selects array elements to be included in the selection for a dataspace. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SelectElements
Declaration
public static System.Int32 select_elements(System.Int64 space_id, H5S.seloper_t op, System.IntPtr num_elements, System.UInt64[] coord)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | space_id | Identifier of the dataspace. |
H5S.seloper_t | op | Operator specifying how the new selection is to be combined with the existing selection for the dataspace. |
System.IntPtr | num_elements | Number of elements to be selected. |
System.UInt64[] | coord | A pointer to a buffer containing a serialized copy of a 2-dimensional array of zero-based values specifying the coordinates of the elements in the point selection. |
Returns
Type | Description |
---|---|
System.Int32 | Returns a non-negative value if successful; otherwise returns a negative value. |
select_hyperslab(System.Int64, H5S.seloper_t, System.UInt64*, System.UInt64*, System.UInt64*, System.UInt64*)
Selects a hyperslab region to add to the current selected region. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SelectHyperslab
Declaration
public static System.Int32 select_hyperslab(System.Int64 space_id, H5S.seloper_t op, System.UInt64*start, System.UInt64*stride, System.UInt64*count, System.UInt64*block)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | space_id | Identifier of dataspace selection to modify |
H5S.seloper_t | op | Operation to perform on current selection. |
System.UInt64* | start | Offset of start of hyperslab |
System.UInt64* | stride | Number of blocks included in hyperslab. |
System.UInt64* | count | Hyperslab stride. |
System.UInt64* | block | Size of block in hyperslab. |
Returns
Type | Description |
---|---|
System.Int32 | Returns a non-negative value if successful; otherwise returns a negative value. |
select_hyperslab(System.Int64, H5S.seloper_t, System.UInt64[], System.UInt64[], System.UInt64[], System.UInt64[])
Selects a hyperslab region to add to the current selected region. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SelectHyperslab
Declaration
public static System.Int32 select_hyperslab(System.Int64 space_id, H5S.seloper_t op, System.UInt64[] start, System.UInt64[] stride, System.UInt64[] count, System.UInt64[] block)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | space_id | Identifier of dataspace selection to modify |
H5S.seloper_t | op | Operation to perform on current selection. |
System.UInt64[] | start | Offset of start of hyperslab |
System.UInt64[] | stride | Number of blocks included in hyperslab. |
System.UInt64[] | count | Hyperslab stride. |
System.UInt64[] | block | Size of block in hyperslab. |
Returns
Type | Description |
---|---|
System.Int32 | Returns a non-negative value if successful; otherwise returns a negative value. |
select_none(System.Int64)
Resets the selection region to include no elements. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SelectNone
Declaration
public static System.Int32 select_none(System.Int64 space_id)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | space_id | The identifier for the dataspace in which the selection is being reset. |
Returns
Type | Description |
---|---|
System.Int32 | Returns a non-negative value if successful; otherwise returns a negative value. |
select_valid(System.Int64)
Verifies that the selection is within the extent of the dataspace. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SelectValid
Declaration
public static System.Int32 select_valid(System.Int64 space_id)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | space_id | Identifier for the dataspace being queried. |
Returns
Type | Description |
---|---|
System.Int32 | Returns a positive value, for , if the
selection is contained within the extent or 0 (zero), for
, if it is not. Returns a negative value on error
conditions such as the selection or extent not being defined. |
set_extent_none(System.Int64)
Removes the extent from a dataspace. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SetExtentNone
Declaration
public static System.Int32 set_extent_none(System.Int64 space_id)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | space_id | The identifier for the dataspace from which the extent is to be removed. |
Returns
Type | Description |
---|---|
System.Int32 | Returns a non-negative value if successful; otherwise returns a negative value. |
set_extent_simple(System.Int64, Int32, System.UInt64[], System.UInt64[])
Sets or resets the size of an existing dataspace. See https://www.hdfgroup.org/HDF5/doc/RM/RM_H5S.html#Dataspace-SetExtentSimple
Declaration
public static System.Int32 set_extent_simple(System.Int64 space_id, int rank, System.UInt64[] current_size, System.UInt64[] maximum_size)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | space_id | Dataspace identifier. |
System.Int32 | rank | Rank, or dimensionality, of the dataspace. |
System.UInt64[] | current_size | Array containing current size of dataspace. |
System.UInt64[] | maximum_size | Array containing maximum size of dataspace. |
Returns
Type | Description |
---|---|
System.Int32 | Returns a non-negative value if successful; otherwise returns a negative value. |