2.7.14 impBin2d

Menu Information

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.

Brief Information

Import binary 2d array file

Additional Information

Minimum Origin Version Required: 9.0

Command Line Usage

impBin2d fname:="C:\temp4096x5120.img"

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
File Name fname

Input

string

fname$
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

128
Specify the number of columns of the output matrix.
Byte Length bytes

Input

int

2
Specify the byte length of the import data.


Option list:

  • 1
  • 2
  • 4
  • 8
  • 16
Signed/Unsigned sign

Input

int

Unsigned
Specify the type of data in the input file.

Option list:

  • unsigned:Unsigned
The values should be treated as unsigned.
  • signed:Signed
The values should be treated as signed.
  • float:Floating Point
The values should be treated as floating point.
Big-Endian bigend

Input

int

0
Specify the byte order of the import data. The default setting is Little-Endian.
Header Bytes offset

Input

int

0
Specify the number of bytes in the binary file header section.
Transpose After Import transpose

Input

int

0
Check this to transpose the imported data.
Output orng

Output

Range

<active>
Specify the destination of imported data.

See the syntax here.

Description

This function imports image data (.img files) and Origin binary matrix data (.b2d files) into matrix windows.

Example

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:

  1. Click the New Matrix buttonButton New Matrix.png on the Standard toolbar to create a new matrix.
  2. Select Data: Import from File: Binary 2D Array from the main menu to open the dialog box fo the impBin2D X-Function.
  3. Choose the file that you want to import, and then click the Open button.
  4. Enter 256 in the Number of Columns edit box.
  5. Click the OK button to import the files into the matrix.

Algorithm

References

Related X-Functions

impASC, impFile, impinfo, cd, dlgFile