Class FlattenStackGenerator
Object
org.anchoranalysis.image.io.stack.output.generator.RasterGenerator<T>
org.anchoranalysis.image.io.stack.output.generator.RasterGeneratorSelectFormat<T>
org.anchoranalysis.image.io.stack.output.generator.RasterGeneratorDelegateToRaster<Stack,Stack>
org.anchoranalysis.image.io.stack.output.generator.FlattenStackGenerator
- All Implemented Interfaces:
Generator<Stack>,TransformingGenerator<Stack,Stack>,ElementWriter<Stack>
public class FlattenStackGenerator extends RasterGeneratorDelegateToRaster<Stack,Stack>
Like a
StackGenerator but first applies a maximum-intensity-projection.- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description FlattenStackGenerator(boolean padIfNecessary)Creates with possible padding. -
Method Summary
Modifier and Type Method Description protected StackconvertBeforeAssign(Stack element)Converts an element before setting it on thedelegate.protected StackconvertBeforeTransform(Stack stack)Converts an element before callingRasterGeneratorDelegateToRaster.transform(T)on thedelegate.StackWriteAttributesguaranteedImageAttributes()Guarantees on the attributes of all images created by the generator.Methods inherited from class org.anchoranalysis.image.io.stack.output.generator.RasterGeneratorDelegateToRaster
getDelegate, transformMethods 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
-
FlattenStackGenerator
public FlattenStackGenerator(boolean padIfNecessary)Creates with possible padding.- Parameters:
padIfNecessary- iff true, in the specific case of a 2-channel stack, an additional blank channel is added to make it 3-channels.
-
-
Method Details
-
guaranteedImageAttributes
Description copied from class:RasterGeneratorGuarantees on the attributes of all images created by the generator.- Overrides:
guaranteedImageAttributesin classRasterGeneratorDelegateToRaster<Stack,Stack>- Returns:
- options that are guaranteed to be true of all images by the generator.
-
convertBeforeAssign
Description copied from class:RasterGeneratorDelegateToRasterConverts an element before setting it on thedelegate.- Specified by:
convertBeforeAssignin classRasterGeneratorDelegateToRaster<Stack,Stack>- Parameters:
element- element to convert- Returns:
- converted element
- Throws:
OperationFailedException- if anything goes wrong during conversion
-
convertBeforeTransform
Description copied from class:RasterGeneratorDelegateToRasterConverts an element before callingRasterGeneratorDelegateToRaster.transform(T)on thedelegate.- Specified by:
convertBeforeTransformin classRasterGeneratorDelegateToRaster<Stack,Stack>- Parameters:
stack- stack to convert- Returns:
- converted element
-