Class FeatureCalculationContext<S>

Object
FeatureCalculationContext<S>
Type Parameters:
S - encapsulation of the features that provide the calculation.

public class FeatureCalculationContext<S> extends Object
The context in which features are calculated, so as to be later exported as a CSV.
  • Constructor Details

    • FeatureCalculationContext

      public FeatureCalculationContext(FeatureResultsAndThumbnails results, S rowSource, FeatureNameList featureNames, Optional<String> groupGeneratorName, ExecutionTimeRecorder executionTimeRecorder, boolean suppressErrors, InputOutputContext context)
      Parameters:
      results - the stored results and thumbnail writer
      rowSource - the source of features to be calculated
      featureNames - the names of features to be calculated
      groupGeneratorName - the optional name of the group generator
      executionTimeRecorder - records execution time of operations
      suppressErrors - if true, exceptions during calculation are suppressed
      context - the input-output context for the operation
  • Method Details

    • getModelDirectory

      public Path getModelDirectory()
      Gets the model directory path.
      Returns:
      the Path to the model directory
    • getLogger

      public Logger getLogger()
      Gets the logger for the context.
      Returns:
      the Logger instance
    • getOperationContext

      public OperationContext getOperationContext()
      Gets the operation context.
      Returns:
      the OperationContext instance
    • getResults

      public FeatureResultsAndThumbnails getResults()
      The stored results and thumbnail writer.
    • getFeatureSource

      public S getFeatureSource()
      The features that are calculated, encapsulated in some object.
    • getFeatureNames

      public FeatureNameList getFeatureNames()
      The name of each feature being calculated, in identical order, as that is placed in the exported CSV.
    • getGroupGeneratorName

      public Optional<String> getGroupGeneratorName()
      The optional name of the group generator.
    • getExecutionTimeRecorder

      public ExecutionTimeRecorder getExecutionTimeRecorder()
      Records the execution-time of particular operations.
    • getContext

      public InputOutputContext getContext()
      The input-output context for the operation.
    • isSuppressErrors

      public boolean isSuppressErrors()
      When false, an image is reported as errored, if any exception is thrown during calculation. When true, then a value of Double.NaN is returned, and a message is written to the error-log.
    • isThumbnailsEnabled

      public boolean isThumbnailsEnabled()
      Whether thumbnails are enabled for output.