Module ij
Package ij.plugin

# Class Concatenator

java.lang.Object
ij.plugin.Concatenator

All Implemented Interfaces:
  `PlugIn`, `ItemListener`, `EventListener`

public class Concatenator extends Object implements PlugIn, ItemListener
This plugin, which concatenates two or more images or stacks, implements the Image/Stacks/Tools/Concatenate command. Has the option of viewing the concatenated stack as a 4D image.

Author:
  Jon Jackson j.jackson # ucl.ac.uk

## Field Summary

Fields
Modifier and Type
Field
Description
`int`
`maxEntries`
`String`
`pluginName`

## Constructor Summary

Constructors
Constructor
Description
`Concatenator()`

## Method Summary

Modifier and Type
Method
Description
`ImagePlus`
`concatenate(ImagePlus[] ims, boolean keepIms)`
Concatenates two or more images or stacks.
`ImagePlus`
`concatenate(ImagePlus imp1, ImagePlus imp2, boolean keep)`
Concatenate two images or stacks.
`ImagePlus`
`concatenateHyperstacks(ImagePlus[] images, String newTitle, boolean keep)`
Obsolete, replaced by concatenate(images,keep) and Concatenator.run(images).
`void`
`itemStateChanged(ItemEvent ie)`
`ImagePlus`
`run()`
Displays a dialog requiring user to choose images and returns ImagePlus of concatenated images.
`static ImagePlus`
`run(ImagePlus[] images)`
Concatenates two or more images, stacks or hyperstacks.
`static ImagePlus`
`run(ImagePlus img1, ImagePlus img2)`
Concatenates two images, stacks or hyperstacks.
`static ImagePlus`
`run(ImagePlus img1, ImagePlus img2, ImagePlus img3)`
Concatenates three images, stacks or hyperstacks.
`static ImagePlus`
`run(ImagePlus img1, ImagePlus img2, ImagePlus img3, ImagePlus img4)`
Concatenates four images, stacks or hyperstacks.
`static ImagePlus`
`run(ImagePlus img1, ImagePlus img2, ImagePlus img3, ImagePlus img4, ImagePlus img5)`
Concatenates five images, stacks or hyperstacks.
`void`
`run(String arg)`
Optional string argument sets the name dialog boxes if called from another plugin.
`void`
`setIm5D(boolean bool)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### pluginName

public String pluginName

### maxEntries

public int maxEntries

## Constructor Details

### Concatenator

public Concatenator()

## Method Details

### run

public void run(String arg)
Optional string argument sets the name dialog boxes if called from another plugin.

Specified by:
  `run` in interface `PlugIn`

### run

public ImagePlus run()
Displays a dialog requiring user to choose images and returns ImagePlus of concatenated images.

### run

public static ImagePlus run(ImagePlus img1, ImagePlus img2)
Concatenates two images, stacks or hyperstacks.

### run

public static ImagePlus run(ImagePlus img1, ImagePlus img2, ImagePlus img3)
Concatenates three images, stacks or hyperstacks.

### run

public static ImagePlus run(ImagePlus img1, ImagePlus img2, ImagePlus img3, ImagePlus img4)
Concatenates four images, stacks or hyperstacks.

### run

public static ImagePlus run(ImagePlus img1, ImagePlus img2, ImagePlus img3, ImagePlus img4, ImagePlus img5)
Concatenates five images, stacks or hyperstacks.

### run

public static ImagePlus run(ImagePlus[] images)
Concatenates two or more images, stacks or hyperstacks.

Parameters:
  `images` - Array of source images
Returns:
  Returns the concatenated images as an ImagePlus

### concatenate

public ImagePlus concatenate(ImagePlus[] ims, boolean keepIms)
Concatenates two or more images or stacks.

### concatenate

public ImagePlus concatenate(ImagePlus imp1, ImagePlus imp2, boolean keep)
Concatenate two images or stacks.

### concatenateHyperstacks

public ImagePlus concatenateHyperstacks(ImagePlus[] images, String newTitle, boolean keep)
Obsolete, replaced by concatenate(images,keep) and Concatenator.run(images).

### itemStateChanged

public void itemStateChanged(ItemEvent ie)

Specified by:
  `itemStateChanged` in interface `ItemListener`

### setIm5D

public void setIm5D(boolean bool)