![]() |
![]() |
![]() |
![]() |
DVread_seq_binary
Synopsis
Reads a sequence of numbers from a binary file into a uniform field.
module DVread_seq_binary {
string+Iparam filename; /* name of file to read */
int+Iparam skip_bytes = 0;
int+Iparam ndim = 3;
int+Iparam dims[ndim];
int+Iparam endian = 0; // endianness of the data.
int+Iparam ncomp = 1;
DVread_seq_var comps[ncomp] {
veclen = 1;
data_type = 4; // 4 = DTYPE_FLOAT
};
Mesh_Unif+Node_Data+Oparam out;
omethod+notify_val+notify_inst read_update<status=1> =
"DVread_seq_binary_update";
};Description
DVread_seq_binary reads a binary file which contains one or more "raw" arrays (a simple sequence of numbers). The reader does not make any assumptions about the structure (dimensions) or data type of the input data. All information about the structure and the data type must be specified as inputs to this module. The raw arrays are read into a uniform field.
Input
A string. Names the input file to be read. The string can be either the complete absolute pathname, or a relative pathname. If it is relative, it will be interpreted relative to the user's working directory when AVS/Express was started.
integer. The endianess of the data 0=same as machine 1=little (e.g. Windows, Linux) 2=big (e.g. Sun, SGI)
DVread_seq_var. The veclen and data type (byte, float, integer, etc.) of each variable. Use the defines from include/avs/dtype.h for the datatype
Output
Example
File
See also
![]() |
![]() |
![]() |
![]() |