11-03-2010 10:15 AM
@Ken Brooks wrote:
Have you found any way to read in your 1D array of bytes without having to stick this header into the file?
I thought you are reading DBL. To read a binary DBL file without header, you simply wire a scalar DBL constant to the type input (not an array!) and wire the desired number of elements to the count input. This will give you a 1D array of DBL. You can set the file location anywhere using "set file position" first.
To read a 1D array of bytes is even more trivial. Simply read it as U8 as above or read it as string.
11-04-2010 01:37 AM - edited 11-04-2010 01:38 AM
Here is a simple example how you would write a 3D binary array to a file in 2D sections and explicitly edit the size header into the first 12 bytes of the file. Later you can read it directly as 3D array since the size information is present.
11-11-2010 08:34 AM
thanks, altenbach. Somehow when I first read this recommendation I failed to understand it. But yesterday I discovered for myself the "count" input of which you spoke. So they really do have a raw binary read, they just kind of hide it under the covers. I think I will use this technique, and I think it will greatly simplify the file format I was about to use.
Thanks,
Ken
To read a binary DBL file without header, you simply wire a scalar DBL constant to the type input (not an array!) and wire the desired number of elements to the count input. This will give you a 1D array of DBL. You can set the file location anywhere using "set file position" first.
01-14-2013 09:10 AM