OriginLab Corporation - Scientific Graphing and Data Analysis Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis

impBin2d

Contents

Menu Information

Binary 2D Array

Brief Information

Import binary 2d array file

Additional Information

Minimum Origin Version Required: 8.0 SR5

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$
Specify the file to be imported.
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

0
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 whether the byte order of the import data is Big-Endian. The default value is false.
Header Bytes offset

Input

int

0
Specify the number of header bytes in the import file. These header bytes will be skipped.
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 buttonImage:Button_New_Matrix.png on the Standard toolbar to create a new matrix.
  2. Select File: Import: 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