Class RasterGeneratorDelegateToRaster<S,T>
Object
RasterGenerator<T>
RasterGeneratorSelectFormat<T>
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
Uses a delegate raster-generator and optionally applies a conversions before calling
transform(T).- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRasterGeneratorDelegateToRaster(RasterGenerator<S> delegate) Creates a newRasterGeneratorDelegateToRasterinstance. -
Method Summary
Modifier and TypeMethodDescriptionprotected 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> The delegate.Guarantees on the attributes of all images created by the generator.Applies any necessary preprocessing to create an element suitable for writing to the filesystem.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
-
RasterGeneratorDelegateToRaster
Creates a newRasterGeneratorDelegateToRasterinstance.- Parameters:
delegate- The delegate.
-
-
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
Description copied from interface:TransformingGeneratorApplies any necessary preprocessing to create an element suitable for writing to the filesystem.- Parameters:
element- element to be assigned and then transformed.- Returns:
- the transformed element after necessary preprocessing.
- Throws:
OutputWriteFailedException- if anything goes wrong.
-
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.
-