H5S.get_select_type

Type of data space selection

Syntax

sel_type = H5S.get_select_type(space_id)

Description

sel_type = H5S.get_select_type(space_id) returns the data space selection type. Valid return values correspond to the following enumerated constants:

H5S_SEL_NONE
H5S_SEL_POINTS
H5S_SEL_HYPERSLABS
H5S_SEL_ALL

Examples

dims = [100 200];
h5_dims = fliplr(dims);
space_id = H5S.create_simple(2,h5_dims,h5_dims);
start = fliplr([10 20]); block = fliplr([20 30]);
H5S.select_hyperslab(space_id,'H5S_SELECT_SET',start,[],[],block);
sel_type = H5S.get_select_type(space_id);
switch(sel_type)
    case H5ML.get_constant_value('H5S_SEL_NONE')
        fprintf('no selection\n');
    case H5ML.get_constant_value('H5S_SEL_POINTS');
        fprintf('point selection\n');
    case H5ML.get_constant_value('H5S_SEL_HYPERSLABS');
        fprintf('hyperslab selection\n');
end
Was this topic helpful?