Class StackGenerator
Object
org.anchoranalysis.image.io.stack.output.generator.RasterGenerator<T>
org.anchoranalysis.image.io.stack.output.generator.RasterGeneratorSelectFormat<Stack>
org.anchoranalysis.image.io.stack.output.generator.StackGenerator
- All Implemented Interfaces:
Generator<Stack>,TransformingGenerator<Stack,Stack>,ElementWriter<Stack>
public class StackGenerator extends RasterGeneratorSelectFormat<Stack>
Writes a stack to the filesystem.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description StackGenerator(boolean always2D)Creates a generator that performs no padding.StackGenerator(boolean padIfNecessary, boolean always2D)Creates the generator from a stack, inferring whether all stacks will be 2D from this stack's dimensions.StackGenerator(boolean padIfNecessary, StackWriteAttributes writeOptions) -
Method Summary
Modifier and Type Method Description StackWriteAttributesguaranteedImageAttributes()Guarantees on the attributes of all images created by the generator.Stacktransform(Stack element)Methods inherited from class org.anchoranalysis.image.io.stack.output.generator.RasterGeneratorSelectFormat
selectFileExtension, writeToFileMethods inherited from class org.anchoranalysis.image.io.stack.output.generator.RasterGenerator
write, writeWithIndex
-
Constructor Details
-
StackGenerator
public StackGenerator(boolean always2D)Creates a generator that performs no padding.- Parameters:
always2D- when true, this indicates that the stack is guaranteed to be always 2D.
-
StackGenerator
public StackGenerator(boolean padIfNecessary, boolean always2D)Creates the generator from a stack, inferring whether all stacks will be 2D from this stack's dimensions.- Parameters:
padIfNecessary- iff true, in the specific case of a 2-channel stack, an additional blank channel is added to make it 3-channels.always2D- when true, this indicates that the stack is guaranteed to be always 2D.
-
StackGenerator
-
-
Method Details
-
transform
- Throws:
OutputWriteFailedException
-
guaranteedImageAttributes
Description copied from class:RasterGeneratorGuarantees on the attributes of all images created by the generator.- Specified by:
guaranteedImageAttributesin classRasterGenerator<Stack>- Returns:
- options that are guaranteed to be true of all images by the generator.
-