2.14.1.9 imfcat


Brief Information

Concatenate multiple image files into a single image

Additional Information

Minimum Origin Version Required: Origin 2015 SR0

Command Line Usage

1. imfcat fname:=fns$ cols:=3 ofname:=%ymyimage.jpg;

2. imfcat fname:=fns$ dir:=vert cols:=2 rows:=4 ofname:= C:\Users\UserName\Documents\OriginLab\2017\User Files\myimage.png;

3. imfcat fname:="C:\Program Files\OriginLab\Origin2017\Samples\Image Processing and Analysis\myocyte1.tif%(crlf)C:\Program Files\OriginLab\Origin2017\Samples\Image Processing and Analysis\myocyte2.tif%(crlf)C:\Program Files\OriginLab\Origin2017\Samples\Image Processing and Analysis\myocyte3.tif" cols:=2 color:=color(240,208,0) ofname:=%yabc.png;

X-Function Execution Options

Please refer to the page for additional option switches when accessing the x-function from script

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Files to be Concatenated fname

Input

string

fname$
Specify image files to be concatenated. Supported types include Bitmap, Joint Photographic Experts Group, JPEG2000, Portable Network Graphics, Portable Images, Sun Raster, and Tag Image File.
Concatenate Direction dir

Input

int

0
Specify the concatenated direction.

Option list:

  • horz:Horizontal
    Concatenate images horizontally
  • vert:Vertical
    Concatenate images vertically
Columns cols

Input

int

5
Specify the number of columns in the concatenated image. The concatenated image will be arranged on a col by row grid.
Rows rows

Input

int

-1
Specify the number of rows in the concatenated image. The concatenated image will be arranged on a col by row grid. If the number of row is not specified, it is automatically determined by the number of files and columns.
Background Color color

Input

int

0
Specify the fill color for extra grid that has no image. Color may be an index into Origin's Color List : 0 (Black), 1 (Red), ..., up to 23 (Dark Gray). You can also use the color function to assign any RGB color, see example 3 in Command Line Usage section.
Output File Name ofname

Output

string

Specify the name of the concatenated image file.

Description

This X-Function is used to concatenate multiple image files as a single one.

Examples

The following example concatenates all 8 image files with prefix "myocyte" into 1.

string fns, path$=system.path.program$ + "Samples\Image Processing and Analysis\"; 
findfiles fname:=fns$ ext:="myocyte*.tif";
int n = fns.GetNumTokens(CRLF);
imfcat fname:=fns$ cols:=4 ofname:=%ymyimage.jpg;

Keywords:combine