Class FeatureExporterContext
Object
org.anchoranalysis.plugin.image.task.feature.FeatureExporterContext
public final class FeatureExporterContext extends Object
Context for exporting features, containing configuration and output settings.
-
Constructor Summary
Constructors Constructor Description FeatureExporterContext(org.anchoranalysis.io.output.outputter.InputOutputContext context, boolean removeNaNColumns, boolean visuallyShortenDecimals, boolean suppressErrors) -
Method Summary
Modifier and Type Method Description Optional<org.anchoranalysis.feature.io.csv.FeatureCSVWriter>csvWriter(org.anchoranalysis.feature.io.csv.metadata.FeatureCSVMetadata metadata)Creates aFeatureCSVWriterfor the non-aggregated results.booleanequals(Object o)org.anchoranalysis.io.output.outputter.InputOutputContextgetContext()Context for reading from or writing outputs to the file-system.inthashCode()booleanisRemoveNaNColumns()When true, columns containing allDouble.NaNvalues are removed before outputting.booleanisSuppressErrors()If false, an image is reported as errored, if any exception is thrown during calculation.booleanisVisuallyShortenDecimals()When truedoublevalues are printed to be as short as possible without losing precision.StringtoString()
-
Constructor Details
-
FeatureExporterContext
public FeatureExporterContext(org.anchoranalysis.io.output.outputter.InputOutputContext context, boolean removeNaNColumns, boolean visuallyShortenDecimals, boolean suppressErrors)
-
-
Method Details
-
csvWriter
public Optional<org.anchoranalysis.feature.io.csv.FeatureCSVWriter> csvWriter(org.anchoranalysis.feature.io.csv.metadata.FeatureCSVMetadata metadata) throws org.anchoranalysis.io.output.error.OutputWriteFailedExceptionCreates aFeatureCSVWriterfor the non-aggregated results.- Parameters:
metadata- the metadata for the CSV file- Returns:
- an optional
FeatureCSVWriterif creation is successful, empty otherwise - Throws:
org.anchoranalysis.io.output.error.OutputWriteFailedException- if there's an error creating the CSV writer
-
getContext
public org.anchoranalysis.io.output.outputter.InputOutputContext getContext()Context for reading from or writing outputs to the file-system. -
isRemoveNaNColumns
public boolean isRemoveNaNColumns()When true, columns containing allDouble.NaNvalues are removed before outputting. -
isVisuallyShortenDecimals
public boolean isVisuallyShortenDecimals()When truedoublevalues are printed to be as short as possible without losing precision. -
isSuppressErrors
public boolean isSuppressErrors()If false, an image is reported as errored, if any exception is thrown during calculation. If true, then a value ofDouble.NaNis returned, and a message is written to the error-log. -
equals
-
hashCode
public int hashCode() -
toString
-