T
- exposed-iterator typeV
- delegate-iterator-type (hidden type)public class RasterGeneratorBridge<T,V> extends RasterGeneratorDelegateToRaster<V,T>
RasterGenerator<S>
as if it was an RasterGenerator<T>
using
an function to connect the two.Constructor and Description |
---|
RasterGeneratorBridge(RasterGenerator<V> delegate,
CheckedFunction<T,V,? extends Throwable> elementBridge)
Creates with a delegate and a function to bridge the exposed element-type to the delegate
element-type.
|
Modifier and Type | Method and Description |
---|---|
protected V |
convertBeforeAssign(T element)
Converts an element before setting it on the
delegate . |
protected Stack |
convertBeforeTransform(Stack stack)
Converts an element before calling
RasterGeneratorDelegateToRaster.transform(T) on the delegate . |
Stack |
transform(T element)
Applies any necessary preprocessing to create an element suitable for writing to the
filesystem.
|
getDelegate, guaranteedImageAttributes
selectFileExtension, writeToFile
write, writeWithIndex
public RasterGeneratorBridge(RasterGenerator<V> delegate, CheckedFunction<T,V,? extends Throwable> elementBridge)
delegate
- the delegate RasterGenerator
which is called after bridging.elementBridge
- the function that bridges the exposed element-type to the delegate
element-type.public Stack transform(T element) throws OutputWriteFailedException
TransformingGenerator
transform
in interface TransformingGenerator<T,Stack>
transform
in class RasterGeneratorDelegateToRaster<V,T>
element
- element to be assigned and then transformedOutputWriteFailedException
- if anything goes wrongprotected V convertBeforeAssign(T element) throws OperationFailedException
RasterGeneratorDelegateToRaster
delegate
.convertBeforeAssign
in class RasterGeneratorDelegateToRaster<V,T>
element
- element to convertOperationFailedException
- if anything goes wrong during conversionprotected Stack convertBeforeTransform(Stack stack)
RasterGeneratorDelegateToRaster
RasterGeneratorDelegateToRaster.transform(T)
on the delegate
.convertBeforeTransform
in class RasterGeneratorDelegateToRaster<V,T>
stack
- stack to convertCopyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.