Class FeatureExporterContext

Object
FeatureExporterContext

public final class FeatureExporterContext extends Object
Context for exporting features, containing configuration and output settings.
  • Constructor Summary

    Constructors
    Constructor
    Description
    FeatureExporterContext(InputOutputContext context, boolean removeNaNColumns, boolean visuallyShortenDecimals, boolean suppressErrors)
    Creates a new FeatureExporterContext instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    Optional<FeatureCSVWriter>
    csvWriter(FeatureCSVMetadata metadata)
    Creates a FeatureCSVWriter for the non-aggregated results.
    boolean
     
    InputOutputContext
    Context for reading from or writing outputs to the file-system.
    int
     
    boolean
    When true, columns containing all Double.NaN values are removed before outputting.
    boolean
    If false, an image is reported as errored, if any exception is thrown during calculation.
    boolean
    When true double values are printed to be as short as possible without losing precision.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • FeatureExporterContext

      public FeatureExporterContext(InputOutputContext context, boolean removeNaNColumns, boolean visuallyShortenDecimals, boolean suppressErrors)
      Creates a new FeatureExporterContext instance.
      Parameters:
      context - Context for reading from or writing outputs to the file-system.
      removeNaNColumns - When true, columns containing all Double.NaN values are removed before outputting.
      visuallyShortenDecimals - When true double values are printed to be as short as possible without losing precision.
      suppressErrors - If false, an image is reported as errored, if any exception is thrown during calculation. If true, then a value of Double.NaN is returned, and a message is written to the error-log.
  • Method Details

    • csvWriter

      public Optional<FeatureCSVWriter> csvWriter(FeatureCSVMetadata metadata) throws OutputWriteFailedException
      Creates a FeatureCSVWriter for the non-aggregated results.
      Parameters:
      metadata - the metadata for the CSV file
      Returns:
      an optional FeatureCSVWriter if creation is successful, empty otherwise
      Throws:
      OutputWriteFailedException - if there's an error creating the CSV writer
    • getContext

      public InputOutputContext getContext()
      Context for reading from or writing outputs to the file-system.
    • isRemoveNaNColumns

      public boolean isRemoveNaNColumns()
      When true, columns containing all Double.NaN values are removed before outputting.
    • isVisuallyShortenDecimals

      public boolean isVisuallyShortenDecimals()
      When true double values 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 of Double.NaN is returned, and a message is written to the error-log.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object