[Nexus] Arrays in NeXus
Peterson, Peter F.
petersonpf at ornl.gov
Mon Aug 14 13:28:41 BST 2006
I think what you prefer to use is putslab. You will still declare the entire SDS at some point then do several calls to put various parts of your data into the file. I believe that the void* is the address of the first member of the array that you are trying to put in so don't forget to move that to be at the proper point in the array.
P^2
________________________________
From: nexus-bounces at anl.gov on behalf of Andrew Stevens Zimmerman
Sent: Sat 8/12/2006 11:21 AM
To: nexus at anl.gov
Subject: [Nexus] Arrays in NeXus
Hi,
I using C. I have a 3D array called bigcount that I'm writing to a NeXus file in the following manner:
NXmakedata (file_id, "griddata", NX_INT16, 3, griddim);
NXopendata (file_id, "griddata");
NXputdata (file_id, bigcount);
The thing is that it is a dynamically allocated array of type short***. My question is, does the array have to be contiguous in memory in order for the routine work properly?
I'm guessing the NXputdata may take a void* and use the parameters passed to NXmakedata to figure out what to do with it. Could some one let me know if that's the case?
Thank you,
Andrew Zimmerman
_______________________________________________
NeXus mailing list
NeXus at anl.gov
http://www.neutron.anl.gov/mailman/listinfo/nexus
More information about the NeXus
mailing list