Edit me

Introduction

Anchor can be used from the command-line as follows:

anchor [options] [experimentFile.xml]

If an experimentFile.xml isn’t specified, the default experiment is employed, with default inputs, task, outputs.

Major options

The most important command-line options are:

Option Description
-i arg Changes inputs, where arg = glob or path to an input-directory or path to BeanXML
-t arg Changes the task, where arg = task-name or path to BeanXML
-o arg Changes outputs, where arg = path to an output-directory or path to BeanXML
-h Displays help message with all command-line options.

Input options

Note:

  • Each input file is assigned a unique name, which subsequently determines corresponding output file paths.

  • By default, this is inferred from a pattern in the input filenames (e.g. an incrementing integer, varying string etc.) in a minimal way, while capturing the varying elements.

Options useful for influencing inputting:

Option Description
-i arg Changes inputs, where arg = glob or path to an input-directory or path to BeanXML
-ic Copies any files unused as inputs (but existing within the input directory) to the output directory.
-ii Subsets the name from the file-path pattern. Type anchor and look for ${0}, ${1} etc.
Zero-indexed. Negatives count backwards from the end. Can be a single index or a range.
e.g. 2 (third only) or -3 (third-last) or 3:-1 (fourth to last) or :2 (until third) or 2: (from third).
-ir Derives the name instead from the entire relative file-path excluding the file extension.
e.g. it selects subdir/prefix_234 rather than 234 (by default, only what varies among filenames).
-is Shuffles (randomizes) the order of the inputs.

Output options

Note:

  • tasks produce one or more outputs, with certain outputs enabled by default.
  • the file-format used for any given is determined by rules in defaultBeans.xml.

Options useful for influencing outputting:

Option Description
-o arg Changes outputs where arg = path to an output-directory or path to BeanXML
-oa Enables all outputs.
-od outputName(s) Disables specific output(s). Multiple outputs are comma-separated.
-oe outputName(s) Enables specific output(s). Multiple outputs are comma-separated.
-of formatExtension Suggests an output image file format: e.g -of jpg or -of ome.xml
-on Outputs with an incrementing number instead of the input name.
(useful for creating sequences of images)
-oo Omits experiment name and version when outputting.
-os Replaces directory separators in the output file-path with an underscore.

Task options

Options useful for tasks:

Option Description
-t arg Changes the task, where arg = task-name or path to BeanXML
-tp number Suggests a maximum number of CPU processors.
-st Prints the names of predefined tasks that can be used with -t
-ps size Suggests image size (e.g. 1024x768) or a scaling factor (e.g.0.5)
- The order of dimensions is always widthxheight
- No scaling in the z-dimension is supported.
- Omitting a dimension resizes to the width/height and preserves aspect-ratio e.g. 200x or x50
- A trailing plus character preserves aspect ratio maximally within dimensions e.g. 1000x500+

The options beginning with -p are parameters that are optionally used only by specific tasks.

Debug options

Options useful for debugging:

Option Description
-d [string] Enables debug-mode: runs only the first available input [whose name contains string].
-l path Logs initial BeanXML errors in greater detail to a file-path
-sa Shows additional argument information, otherwise executes as normal.

Application information options

Options to show general application information are:

Option Description
-h Displays help message with all command-line options.
-v Displays version and authorship information.