Operation: open series as stack

open series as stack/**
 * If path is null the operation opens a file dialog and loads the image selected by the
 * user. Otherwise the image in path is loaded. With help of the options part of the filename
 * can be replaced. That allows to automatically open images belonging together in an application.
 *
 * @author Volker Baecker
 */

Author:

A modification of the FolderOpener code from ImageJ. Modified by Volker Bäcker.

Example

file dialog    example stack

Description

The operation opens a series of images as a stack. If the path is not set the series is defined by the file selected by the user. All images with the same basename are loaded into the stack. The order is determinated by the trailing numbers of the filenames. The numerical order is respected  (e.g. 1<9<10<99<100, etc.).

Options

options
replace string: The part of the input filename to be replaced.
replace with: The string the part of the input filename is replaced with.

Parameter

The only parameter is the path of the image to be opened.

Results

result (ImagePlus): The loaded image stack.
absoluteFilename (String): The absolute filename of the image that has been selected to define the series.