Class RasterGeneratorDelegateToRaster<S,T>
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<S,T>
- Type Parameters:
S- delegate iteration-typeT- generator iteration-type (the iteration-type that is publicly exposed)
- All Implemented Interfaces:
Generator<T>,TransformingGenerator<T,Stack>,ElementWriter<T>
- Direct Known Subclasses:
DisplayStackGenerator,FlattenStackGenerator,RasterGeneratorBridge
public abstract class RasterGeneratorDelegateToRaster<S,T> extends RasterGeneratorSelectFormat<T>
Uses a delegate raster-generator and optionally applies a conversions before calling
transform(T).- Author:
- Owen Feehan
-
Constructor Summary
Constructors Modifier Constructor Description protectedRasterGeneratorDelegateToRaster(RasterGenerator<S> delegate) -
Method Summary
Modifier and Type Method Description protected abstract SconvertBeforeAssign(T element)Converts an element before setting it on thedelegate.protected abstract StackconvertBeforeTransform(Stack stack)Converts an element before callingtransform(T)on thedelegate.protected RasterGenerator<S>getDelegate()The delegate.StackWriteAttributesguaranteedImageAttributes()Guarantees on the attributes of all images created by the generator.Stacktransform(T 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
-
Method Details
-
guaranteedImageAttributes
Description copied from class:RasterGeneratorGuarantees on the attributes of all images created by the generator.- Specified by:
guaranteedImageAttributesin classRasterGenerator<T>- Returns:
- options that are guaranteed to be true of all images by the generator.
-
transform
- Throws:
OutputWriteFailedException
-
convertBeforeAssign
Converts an element before setting it on thedelegate.- Parameters:
element- element to convert- Returns:
- converted element
- Throws:
OperationFailedException- if anything goes wrong during conversion
-
convertBeforeTransform
Converts an element before callingtransform(T)on thedelegate.- Parameters:
stack- stack to convert- Returns:
- converted element
-
getDelegate
The delegate.- Returns:
- the delegate.
-