public class FeatureResultsAndThumbnails extends Object
It supports concurrent access by multiple threads.
The following outputs are produced:
Output Name | Default? | Description |
---|---|---|
thumbnails | yes | a small picture for each row in the features CSV illustrating its content. |
Constructor and Description |
---|
FeatureResultsAndThumbnails(FeatureOutputMetadata outputMetadata,
FeatureExporterContext context) |
Modifier and Type | Method and Description |
---|---|
void |
add(CheckedSupplier<LabelledResultsVector,OperationFailedException> resultToAdd,
CheckedSupplier<Optional<DisplayStack>,OperationFailedException> thumbnail)
Adds results, together with a thumbnail.
|
void |
closeAnyOpenIO()
Closes any open IO and removes redundant structures stored in memory.
|
void |
writeGroupedResults(Optional<NamedFeatureStore<FeatureInputResults>> featuresAggregate,
boolean includeGroups,
java.util.function.Function<InputOutputContext,FeatureCSVWriterFactory> csvWriterCreator,
InputOutputContext context)
Writes all the results that have been collected as a CSV file.
|
public FeatureResultsAndThumbnails(FeatureOutputMetadata outputMetadata, FeatureExporterContext context) throws OutputWriteFailedException
OutputWriteFailedException
public void add(CheckedSupplier<LabelledResultsVector,OperationFailedException> resultToAdd, CheckedSupplier<Optional<DisplayStack>,OperationFailedException> thumbnail) throws OperationFailedException
Note that in order for the sequence numbers to match the order in the feature table, a thumbnail should be present for all results, or for no results, but never partially.
The results are only calculated if any of the relevant outputs are enabled. Similarly with the thumbnails.
resultToAdd
- supplies the results to add, which may or may not be called, depending on
what outputs are enabled.thumbnail
- supplies the thumbnail to write, which may or may not be called, depending
on what outputs are enabled.OperationFailedException
- if the operation cannot be successfully completed.public void writeGroupedResults(Optional<NamedFeatureStore<FeatureInputResults>> featuresAggregate, boolean includeGroups, java.util.function.Function<InputOutputContext,FeatureCSVWriterFactory> csvWriterCreator, InputOutputContext context) throws OutputWriteFailedException
featuresAggregate
- features that can be used for generating additional "aggregated"
exports.includeGroups
- iff true a group-column is included in the CSV file and the group
exports occur, otherwise not.csvWriterCreator
- creates a CSV writer for a particular IO-context.context
- IO-context.OutputWriteFailedException
public void closeAnyOpenIO() throws IOException
IOException
- if the close operation cannot successfully complete.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.