Class ExportFeatures<T extends org.anchoranalysis.io.input.InputFromManager,​S,​U extends org.anchoranalysis.feature.input.FeatureInput>

Object
org.anchoranalysis.bean.AnchorBean<org.anchoranalysis.experiment.bean.task.Task<T,​S>>
org.anchoranalysis.experiment.bean.task.Task<T,​FeatureExporter<S>>
org.anchoranalysis.plugin.image.task.bean.feature.ExportFeatures<T,​S,​U>
Type Parameters:
T - See Task
S - a source-of-features that is duplicated for each new thread (to prevent any concurrency issues)
U - feature-input type for features bean-field

public class ExportFeatures<T extends org.anchoranalysis.io.input.InputFromManager,​S,​U extends org.anchoranalysis.feature.input.FeatureInput>
extends org.anchoranalysis.experiment.bean.task.Task<T,​FeatureExporter<S>>
Calculates features and exports them as a CSV file.

Aggregated-features (based upon a certain grouping) can also be calculated.

The following outputs are produced:

Output NameDefault?Description
"features"yesa single CSV file of feature-calculations where each row is an object.
"features""Aggregated"yesa single CSV file of feature-calculations where each row is a group (with aggregated features of the objects within).
"features""Group"noa CSV file of feature-calculations per group, where each row is an object.
"features""AggregatedGroup"noa XML file of aggregated feature-calculations per group
outputs from a sub-class of FeatureSource as used in source.
outputs from Task
outputs from FeatureResultsAndThumbnails
Author:
Owen Feehan
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static org.anchoranalysis.feature.io.results.FeatureOutputNames OUTPUT_NAMES
    Default names for various outputs from the task.
  • Constructor Summary

    Constructors 
    Constructor Description
    ExportFeatures()  
  • Method Summary

    Modifier and Type Method Description
    void afterAllJobsAreExecuted​(FeatureExporter<S> sharedState, org.anchoranalysis.io.output.outputter.InputOutputContext context)  
    FeatureExporter<S> beforeAnyJobIsExecuted​(org.anchoranalysis.io.output.outputter.Outputter outputter, org.anchoranalysis.inference.concurrency.ConcurrencyPlan concurrencyPlan, List<T> inputs, org.anchoranalysis.experiment.task.ParametersExperiment parameters)  
    org.anchoranalysis.io.output.enabled.OutputEnabledMutable defaultOutputs()  
    void doJobOnInput​(org.anchoranalysis.experiment.task.InputBound<T,​FeatureExporter<S>> input)  
    List<org.anchoranalysis.bean.NamedBean<org.anchoranalysis.feature.bean.list.FeatureListProvider<U>>> getFeatures()
    The features to be exported (after possibly some manipulation or augmentation).
    List<org.anchoranalysis.bean.NamedBean<org.anchoranalysis.feature.bean.list.FeatureListProvider<org.anchoranalysis.feature.input.FeatureInputResults>>> getFeaturesAggregate()
    Features applied to each group to aggregate values (accepting FeatureInputResults).
    org.anchoranalysis.io.input.bean.grouper.Grouper getGroup()
    Includes an additional group column in CSVs, and creates group-specific feature files.
    org.anchoranalysis.io.input.bean.path.DerivePath getId()
    Translates an input file name to a unique ID.
    FeatureSource<T,​S,​U> getSource()
    Source of feature-values to be exported.
    ExportFeaturesStyle getStyle()
    Visual style for how feature export occurs.
    boolean hasVeryQuickPerInputExecution()  
    org.anchoranalysis.experiment.task.InputTypesExpected inputTypesExpected()  
    void setFeatures​(List<org.anchoranalysis.bean.NamedBean<org.anchoranalysis.feature.bean.list.FeatureListProvider<U>>> features)
    The features to be exported (after possibly some manipulation or augmentation).
    void setFeaturesAggregate​(List<org.anchoranalysis.bean.NamedBean<org.anchoranalysis.feature.bean.list.FeatureListProvider<org.anchoranalysis.feature.input.FeatureInputResults>>> featuresAggregate)
    Features applied to each group to aggregate values (accepting FeatureInputResults).
    void setGroup​(org.anchoranalysis.io.input.bean.grouper.Grouper group)
    Includes an additional group column in CSVs, and creates group-specific feature files.
    void setId​(org.anchoranalysis.io.input.bean.path.DerivePath id)
    Translates an input file name to a unique ID.
    void setSource​(FeatureSource<T,​S,​U> source)
    Source of feature-values to be exported.
    void setStyle​(ExportFeaturesStyle style)
    Visual style for how feature export occurs.

    Methods inherited from class org.anchoranalysis.experiment.bean.task.Task

    executeJob, isInputCompatibleWith

    Methods inherited from class org.anchoranalysis.bean.AnchorBean

    checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • OUTPUT_NAMES

      public static final org.anchoranalysis.feature.io.results.FeatureOutputNames OUTPUT_NAMES
      Default names for various outputs from the task.
  • Constructor Details

  • Method Details

    • beforeAnyJobIsExecuted

      public FeatureExporter<S> beforeAnyJobIsExecuted​(org.anchoranalysis.io.output.outputter.Outputter outputter, org.anchoranalysis.inference.concurrency.ConcurrencyPlan concurrencyPlan, List<T> inputs, org.anchoranalysis.experiment.task.ParametersExperiment parameters) throws org.anchoranalysis.experiment.ExperimentExecutionException
      Specified by:
      beforeAnyJobIsExecuted in class org.anchoranalysis.experiment.bean.task.Task<T extends org.anchoranalysis.io.input.InputFromManager,​FeatureExporter<S>>
      Throws:
      org.anchoranalysis.experiment.ExperimentExecutionException
    • doJobOnInput

      public void doJobOnInput​(org.anchoranalysis.experiment.task.InputBound<T,​FeatureExporter<S>> input) throws org.anchoranalysis.experiment.JobExecutionException
      Specified by:
      doJobOnInput in class org.anchoranalysis.experiment.bean.task.Task<T extends org.anchoranalysis.io.input.InputFromManager,​FeatureExporter<S>>
      Throws:
      org.anchoranalysis.experiment.JobExecutionException
    • afterAllJobsAreExecuted

      public void afterAllJobsAreExecuted​(FeatureExporter<S> sharedState, org.anchoranalysis.io.output.outputter.InputOutputContext context) throws org.anchoranalysis.experiment.ExperimentExecutionException
      Specified by:
      afterAllJobsAreExecuted in class org.anchoranalysis.experiment.bean.task.Task<T extends org.anchoranalysis.io.input.InputFromManager,​FeatureExporter<S>>
      Throws:
      org.anchoranalysis.experiment.ExperimentExecutionException
    • defaultOutputs

      public org.anchoranalysis.io.output.enabled.OutputEnabledMutable defaultOutputs()
      Overrides:
      defaultOutputs in class org.anchoranalysis.experiment.bean.task.Task<T extends org.anchoranalysis.io.input.InputFromManager,​FeatureExporter<S>>
    • hasVeryQuickPerInputExecution

      public boolean hasVeryQuickPerInputExecution()
      Specified by:
      hasVeryQuickPerInputExecution in class org.anchoranalysis.experiment.bean.task.Task<T extends org.anchoranalysis.io.input.InputFromManager,​FeatureExporter<S>>
    • inputTypesExpected

      public org.anchoranalysis.experiment.task.InputTypesExpected inputTypesExpected()
      Specified by:
      inputTypesExpected in class org.anchoranalysis.experiment.bean.task.Task<T extends org.anchoranalysis.io.input.InputFromManager,​FeatureExporter<S>>
    • getSource

      public FeatureSource<T,​S,​U> getSource()
      Source of feature-values to be exported.
    • setSource

      public void setSource​(FeatureSource<T,​S,​U> source)
      Source of feature-values to be exported.
    • getGroup

      public org.anchoranalysis.io.input.bean.grouper.Grouper getGroup()
      Includes an additional group column in CSVs, and creates group-specific feature files.
    • setGroup

      public void setGroup​(org.anchoranalysis.io.input.bean.grouper.Grouper group)
      Includes an additional group column in CSVs, and creates group-specific feature files.
    • getId

      public org.anchoranalysis.io.input.bean.path.DerivePath getId()
      Translates an input file name to a unique ID.
    • setId

      public void setId​(org.anchoranalysis.io.input.bean.path.DerivePath id)
      Translates an input file name to a unique ID.
    • getFeatures

      public List<org.anchoranalysis.bean.NamedBean<org.anchoranalysis.feature.bean.list.FeatureListProvider<U>>> getFeatures()
      The features to be exported (after possibly some manipulation or augmentation).
    • setFeatures

      public void setFeatures​(List<org.anchoranalysis.bean.NamedBean<org.anchoranalysis.feature.bean.list.FeatureListProvider<U>>> features)
      The features to be exported (after possibly some manipulation or augmentation).
    • getFeaturesAggregate

      public List<org.anchoranalysis.bean.NamedBean<org.anchoranalysis.feature.bean.list.FeatureListProvider<org.anchoranalysis.feature.input.FeatureInputResults>>> getFeaturesAggregate()
      Features applied to each group to aggregate values (accepting FeatureInputResults).

      If not specified, a default list of mean, standard-deviation, min, max etc. of every feature is used.

    • setFeaturesAggregate

      public void setFeaturesAggregate​(List<org.anchoranalysis.bean.NamedBean<org.anchoranalysis.feature.bean.list.FeatureListProvider<org.anchoranalysis.feature.input.FeatureInputResults>>> featuresAggregate)
      Features applied to each group to aggregate values (accepting FeatureInputResults).

      If not specified, a default list of mean, standard-deviation, min, max etc. of every feature is used.

    • getStyle

      public ExportFeaturesStyle getStyle()
      Visual style for how feature export occurs.
    • setStyle

      public void setStyle​(ExportFeaturesStyle style)
      Visual style for how feature export occurs.