T
- the type of entity that is transformed to a Stack
public abstract class RasterGenerator<T> extends Object implements TransformingGenerator<T,Stack>
Stack
and writes it to the file-system.Constructor and Description |
---|
RasterGenerator() |
Modifier and Type | Method and Description |
---|---|
abstract StackWriteAttributes |
guaranteedImageAttributes()
Guarantees on the attributes of all images created by the generator.
|
protected abstract String |
selectFileExtension(Stack stack,
StackWriteOptions options,
OutputWriteSettings settings,
Optional<Logger> logger)
Selects the file-extension to use for a particular stack.
|
void |
write(T element,
OutputNameStyle outputNameStyle,
ElementOutputter outputter)
Writes a non-indexable output (an output that isn't part of a collection of other similar
items).
|
protected abstract void |
writeToFile(T untransformedElement,
Stack transformedElement,
StackWriteOptions options,
OutputWriteSettings settings,
Path filePath)
Writes a stack to the file-system.
|
void |
writeWithIndex(T element,
String index,
IndexableOutputNameStyle outputNameStyle,
ElementOutputter outputter)
As only a single-file is involved, this methods delegates to a simpler virtual method.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
transform
public void write(T element, OutputNameStyle outputNameStyle, ElementOutputter outputter) throws OutputWriteFailedException
ElementWriter
write
in interface ElementWriter<T>
element
- the element to write.outputNameStyle
- TODOOutputWriteFailedException
public void writeWithIndex(T element, String index, IndexableOutputNameStyle outputNameStyle, ElementOutputter outputter) throws OutputWriteFailedException
writeWithIndex
in interface ElementWriter<T>
element
- the element to write.index
- TODOOutputWriteFailedException
public abstract StackWriteAttributes guaranteedImageAttributes()
protected abstract String selectFileExtension(Stack stack, StackWriteOptions options, OutputWriteSettings settings, Optional<Logger> logger) throws OperationFailedException
stack
- the stack to select a file-extension foroptions
- options that describe how stack
should be writtensettings
- general settings for writing outputlogger
- logger for information messages or warnings associated with writing outputsOperationFailedException
- if the operation could not be successfully completed.protected abstract void writeToFile(T untransformedElement, Stack transformedElement, StackWriteOptions options, OutputWriteSettings settings, Path filePath) throws OutputWriteFailedException
untransformedElement
- the element for the generator before transforming to a
Stack
transformedElement
- the Stack
that element
was transformed intooptions
- options that describe how stack
should be writtensettings
- general settings for writing output.filePath
- the file-path to write too including the extension.OutputWriteFailedException
- if the image could not be be successfully written to the
file-system.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.