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
ConstructorsModifierConstructorDescriptionprotected
RasterGeneratorDelegateToRaster
(RasterGenerator<S> delegate) Creates a newRasterGeneratorDelegateToRaster
instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract S
convertBeforeAssign
(T element) Converts an element before setting it on thedelegate
.protected abstract Stack
convertBeforeTransform
(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, writeToFile
Methods inherited from class org.anchoranalysis.image.io.stack.output.generator.RasterGenerator
write, writeWithIndex
-
Constructor Details
-
RasterGeneratorDelegateToRaster
Creates a newRasterGeneratorDelegateToRaster
instance.- Parameters:
delegate
- The delegate.
-
-
Method Details
-
guaranteedImageAttributes
Description copied from class:RasterGenerator
Guarantees on the attributes of all images created by the generator.- Specified by:
guaranteedImageAttributes
in classRasterGenerator<T>
- Returns:
- options that are guaranteed to be true of all images by the generator.
-
transform
Description copied from interface:TransformingGenerator
Applies 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.
-