Class OutputSequenceStackFactory
Object
org.anchoranalysis.image.io.stack.output.OutputSequenceStackFactory
public class OutputSequenceStackFactory extends Object
Creates output-sequences of different kinds for writing stacks to a directory.
- Author:
- Owen Feehan
-
Field Summary
Fields Modifier and Type Field Description static OutputSequenceStackFactoryNO_RESTRICTIONSA factory with no restrictions on what kind of stacks can be outputted. -
Method Summary
Modifier and Type Method Description static OutputSequenceStackFactoryalways2D()The stacks that are outputted are guaranteed to be two-dimensional.OutputSequenceIncrementing<Stack>incrementingByOne(String subdirectoryName, OutputterChecked outputter)Creates an sequence of stacks in a subdirectory with a number in the outputted file name that increments each time by one.OutputSequenceIndexed<Stack,String>withoutOrderCurrentDirectory(String outputName, OutputterChecked outputter)Creates a sequence of stacks in the current context's directory that has no pattern.voidwithoutOrderSubset(NamedProvider<Stack> stacks, String outputName, boolean suppressSubdirectory, OutputterChecked outputter)Writes all or a subset from a set of named-stacks to a directory.
-
Field Details
-
NO_RESTRICTIONS
A factory with no restrictions on what kind of stacks can be outputted.
-
-
Method Details
-
always2D
The stacks that are outputted are guaranteed to be two-dimensional.- Returns:
- a newly created factory.
-
incrementingByOne
public OutputSequenceIncrementing<Stack> incrementingByOne(String subdirectoryName, OutputterChecked outputter) throws OutputWriteFailedExceptionCreates an sequence of stacks in a subdirectory with a number in the outputted file name that increments each time by one.- Parameters:
subdirectoryName- the name of the subdirectory in which stacks will be written (relative tocontext.outputter- determines where and how the outputting occurs- Returns:
- the created output-sequence (and started)
- Throws:
OutputWriteFailedException- if any output fails to be successfully written.
-
withoutOrderCurrentDirectory
public OutputSequenceIndexed<Stack,String> withoutOrderCurrentDirectory(String outputName, OutputterChecked outputter) throws OutputWriteFailedExceptionCreates a sequence of stacks in the current context's directory that has no pattern.- Parameters:
outputter- determines where and how the outputting occursoutputName- name to use for the directory, for checking if it is allowed, and for the second-level outputs.- Returns:
- the created output-sequence (and started)
- Throws:
OutputWriteFailedException- if any output fails to be successfully written.
-
withoutOrderSubset
public void withoutOrderSubset(NamedProvider<Stack> stacks, String outputName, boolean suppressSubdirectory, OutputterChecked outputter) throws OutputWriteFailedExceptionWrites all or a subset from a set of named-stacks to a directory.A second-level output manager filters which stacks are written.
- Parameters:
stacks- the stacks to output (or a subset thereof according to the second-level output manager).outputName- name to use for the directory, for checking if it is allowed, and for the second-level outputs.suppressSubdirectory- if true, a separate subdirectory is not created, and rather the outputs occur in the parent directory.outputter- determines where and how the outputting occurs.- Throws:
OutputWriteFailedException- if any output fails to be successfully written.
-