Hi, I'm writing a module to import some HDF5 data into DX, and I'm not sure how to transform my arrays with the connection, position, and data data into actual connection, position, and data components of one field. I have code that looks like (I've cut out all sanity checking to illustrate):
array = DXNewArray (TYPE_INT, CATEGORY_REAL, 0); npoints = H5Sget_simple_extent_npoints (dataspace); data = DXGetArrayData (DXAddArrayData (array, 0, (int) npoints, NULL)); H5Dread (dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL,H5P_DEFAULT, data)); which reads the first thing from the file-- the connections list. I then used the following which, I believe, marks that as the data component. retval = DXNewField (); DXSetComponentValue (retval, "data", (Object) array); DXEndField (retval); I presume I could replace the "data" with "connections", but the other problem is that this data is supposed to be a 7500x3 array, but instead it declared it (since I did AddArrayData on npoints) as 22500 (aka 7500*3). I have the 7500 and 3 as variables, so I know what they are supposed to be-- how do I redimension that large array-- or do I not need to? A print shows I have the correct numbers being read, but suggests they actually are only one dimensional. Also, when I need to read the positions and data points, do I just add them to the rest of the array (by doing a DXAddArrayData(array, npoints, nposition, NULL), or should I use an new array and/or overwrite that one? Thanks in advance! -- Mike Miller [EMAIL PROTECTED] -> [EMAIL PROTECTED]
signature.asc
Description: This is a digitally signed message part
