Data: Import from File : Binary 2D Array
This option may not display by default. Use Data: Import from File: Customize to enable it.
This X-Function supports file re-import. See this topic for details.
Import binary 2d array file
Minimum Origin Version Required: 9.0
impBin2d fname:="C:\temp4096x5120.img"
Please refer to the page for additional option switches when accessing the x-function from script
Display Name |
Variable Name |
I/O and Type |
Default Value |
Description |
---|---|---|---|---|
File Name | fname |
Input string |
|
The file(s) to be imported. Click the browse button beside the list box to open one or more files. Then the file names will be listed in the box. |
Number of Columns | ncols |
Input int |
|
Specify the number of columns of the output matrix. |
Byte Length | bytes |
Input int |
|
Specify the byte length of the import data.
|
Signed/Unsigned | sign |
Input int |
|
Specify the type of data in the input file.
Option list:
|
Big-Endian | bigend |
Input int |
|
Specify the byte order of the import data. The default setting is Little-Endian. |
Header Bytes | offset |
Input int |
|
Specify the number of bytes in the binary file header section. |
Transpose After Import | transpose |
Input int |
|
Check this to transpose the imported data. |
Output | orng |
Output Range |
|
Specify the destination of imported data.
See the syntax here. |
This function imports image data (.img files) and Origin binary matrix data (.b2d files) into matrix windows.
For example, you want to import a binary 2D data into a matrix. The byte length of the file is two. And the file has no header bytes. To import it into a matrix which has 256 columns, you can do the following steps: