I've succeded to do what i want, but it's kind of complicated.

I Select all the dataset in dataspace,
i use select_hyperlabs with H5S_SELECT_NOTB with dataspace and second array of hyperslabs.

i extract the current block of selection (let's say array3)
I select the first array or hyperslab in dataspace2
I use select_hyperslab on dataspace 2 with H5S_SELECT_NOTB and Array3.

Mathieu

Quoting Vladimir Daskalov <[email protected]>:

Hi,

if i understand you correctly, you need to use one of the following values
as first argument in the H5Sselect_hyperslab function:

From H5Spublic.h.

/* Different ways of combining selections */
typedef enum H5S_seloper_t {
    H5S_SELECT_NOOP      = -1,  /* error
  */
    H5S_SELECT_SET       = 0,   /* Select "set" operation      */
    H5S_SELECT_OR,              /* Binary "or" operation for hyperslabs
                                 * (add new selection to existing selection)
                                 * Original region:  AAAAAAAAAA
                                 * New region:             BBBBBBBBBB
                                 * A or B:           CCCCCCCCCCCCCCCC
                                 */
    H5S_SELECT_AND,             /* Binary "and" operation for hyperslabs
                                 * (only leave overlapped regions in
selection)
                                 * Original region:  AAAAAAAAAA
                                 * New region:             BBBBBBBBBB
                                 * A and B:                CCCC
                                 */
    H5S_SELECT_XOR,             /* Binary "xor" operation for hyperslabs
                                 * (only leave non-overlapped regions in
selection)
                                 * Original region:  AAAAAAAAAA
                                 * New region:             BBBBBBBBBB
                                 * A xor B:          CCCCCC    CCCCCC
                                 */
    H5S_SELECT_NOTB,            /* Binary "not" operation for hyperslabs
                                 * (only leave non-overlapped regions in
original selection)
                                 * Original region:  AAAAAAAAAA
                                 * New region:             BBBBBBBBBB
                                 * A not B:          CCCCCC
                                 */
    H5S_SELECT_NOTA,            /* Binary "not" operation for hyperslabs
                                 * (only leave non-overlapped regions in
new selection)
                                 * Original region:  AAAAAAAAAA
                                 * New region:             BBBBBBBBBB
                                 * B not A:                    CCCCCC
                                 */
    H5S_SELECT_APPEND,          /* Append elements to end of point
selection */
    H5S_SELECT_PREPEND,         /* Prepend elements to beginning of point
selection */
    H5S_SELECT_INVALID          /* Invalid upper bound on selection
operations */
} H5S_seloper_t;


On 14 May 2012 23:14, <[email protected]> wrote:

Hello

I got two array of points, wich i can easily read in the dataset using
H5Sselect_hyperslab or H5Sselect_elements.

But i would like to select only the points present in both array.
Is there any way to do that with hdf5 or do i need to do it myself ?

Thanks

Mathieu




______________________________**_________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/**mailman/listinfo/hdf-forum_**hdfgroup.org<http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org>




--
*V.Daskalov*





_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Reply via email to