Class FromHistogram

Object
AnchorBean<FeatureSource<FileInput, FeatureList<FeatureInputHistogram>, FeatureInputHistogram>>
FeatureSource<FileInput, FeatureList<FeatureInputHistogram>, FeatureInputHistogram>
SingleRowPerInput<FileInput, FeatureInputHistogram>
FromHistogram

public class FromHistogram extends SingleRowPerInput<FileInput, FeatureInputHistogram>
Each input-file describes a histogram that produces one row of features.

Optionally, additionally extracted features are written in a XML model.

Author:
Owen Feehan
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new FromHistogram instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected Optional<String[]>
    additionalLabelsFor(FileInput input)
    Additional labels for an input to include (after the identifier, and before any group labels).
    calculateResultsForInput(FileInput input, FeatureCalculationContext<FeatureList<FeatureInputHistogram>> context)
    Calculates feature-results for a particular input.
    HistogramProvider
    If non-null, a histogram is extracted from this provider rather than the histogram from the inputted CSV.
    boolean
    includeGroupInExperiment(boolean groupGeneratorDefined)
    Determines if group columns should be added to the CSV exports and other group exports may occur in sub-directories.
    InputTypesExpected
    Specifies the highest class(es) that will function as a valid input.
    void
    setHistogram(HistogramProvider histogram)
    If non-null, a histogram is extracted from this provider rather than the histogram from the inputted CSV.

    Methods inherited from class org.anchoranalysis.plugin.image.task.bean.feature.source.SingleRowPerInput

    calculateAndOutput, createExporter, headers

    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
  • Constructor Details

    • FromHistogram

      public FromHistogram()
      Creates a new FromHistogram instance.
  • Method Details

    • inputTypesExpected

      public InputTypesExpected inputTypesExpected()
      Description copied from class: FeatureSource
      Specifies the highest class(es) that will function as a valid input.

      This is usually the class of T (or sometimes the absolute base class InputFromManager)

      Specified by:
      inputTypesExpected in class FeatureSource<FileInput, FeatureList<FeatureInputHistogram>, FeatureInputHistogram>
      Returns:
      an InputTypesExpected object specifying the expected input types
    • includeGroupInExperiment

      public boolean includeGroupInExperiment(boolean groupGeneratorDefined)
      Description copied from class: FeatureSource
      Determines if group columns should be added to the CSV exports and other group exports may occur in sub-directories.
      Specified by:
      includeGroupInExperiment in class FeatureSource<FileInput, FeatureList<FeatureInputHistogram>, FeatureInputHistogram>
      Parameters:
      groupGeneratorDefined - has a group-generator been defined for this experiment?
      Returns:
      true if a group-generator has been defined, false otherwise
    • calculateResultsForInput

      protected ResultsVectorWithThumbnail calculateResultsForInput(FileInput input, FeatureCalculationContext<FeatureList<FeatureInputHistogram>> context) throws NamedFeatureCalculateException
      Description copied from class: SingleRowPerInput
      Calculates feature-results for a particular input.
      Specified by:
      calculateResultsForInput in class SingleRowPerInput<FileInput, FeatureInputHistogram>
      Parameters:
      input - the input.
      context - context for calculating features.
      Returns:
      the results, with optionally associated thumbnail.
      Throws:
      NamedFeatureCalculateException - if any feature cannot calculate.
    • additionalLabelsFor

      protected Optional<String[]> additionalLabelsFor(FileInput input)
      Description copied from class: SingleRowPerInput
      Additional labels for an input to include (after the identifier, and before any group labels).

      These should always correspond (when appended to the identifier) exactly to the nonGroupHeaders.

      Specified by:
      additionalLabelsFor in class SingleRowPerInput<FileInput, FeatureInputHistogram>
      Parameters:
      input - the input.
      Returns:
      any additional labels for the input.
    • getHistogram

      public HistogramProvider getHistogram()
      If non-null, a histogram is extracted from this provider rather than the histogram from the inputted CSV.

      The histogram from the inputted CSV is available in the SharedObjects as "input".

      In this way, histogram can approximate a function of the original histogram.

    • setHistogram

      public void setHistogram(HistogramProvider histogram)
      If non-null, a histogram is extracted from this provider rather than the histogram from the inputted CSV.

      The histogram from the inputted CSV is available in the SharedObjects as "input".

      In this way, histogram can approximate a function of the original histogram.