Class FromHistogram
Object
org.anchoranalysis.bean.AnchorBean<FeatureSource<T,S,U>>
org.anchoranalysis.plugin.image.task.bean.feature.source.FeatureSource<T,org.anchoranalysis.feature.bean.list.FeatureList<S>,S>
org.anchoranalysis.plugin.image.task.bean.feature.source.SingleRowPerInput<org.anchoranalysis.io.input.file.FileInput,org.anchoranalysis.image.feature.input.FeatureInputHistogram>
org.anchoranalysis.plugin.image.task.bean.feature.source.FromHistogram
public class FromHistogram extends SingleRowPerInput<org.anchoranalysis.io.input.file.FileInput,org.anchoranalysis.image.feature.input.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 FromHistogram()Creates a newFromHistograminstance. -
Method Summary
Modifier and Type Method Description protected Optional<String[]>additionalLabelsFor(org.anchoranalysis.io.input.file.FileInput input)Additional labels for an input to include (after the identifier, and before any group labels).protected ResultsVectorWithThumbnailcalculateResultsForInput(org.anchoranalysis.io.input.file.FileInput input, FeatureCalculationContext<org.anchoranalysis.feature.bean.list.FeatureList<org.anchoranalysis.image.feature.input.FeatureInputHistogram>> context)Calculates feature-results for a particular input.org.anchoranalysis.image.bean.provider.HistogramProvidergetHistogram()If non-null, a histogram is extracted from this provider rather than the histogram from the inputted CSV.booleanincludeGroupInExperiment(boolean groupGeneratorDefined)Determines if group columns should be added to the CSV exports and other group exports may occur in sub-directories.org.anchoranalysis.experiment.task.InputTypesExpectedinputTypesExpected()Specifies the highest class(es) that will function as a valid input.voidsetHistogram(org.anchoranalysis.image.bean.provider.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
-
Constructor Details
-
FromHistogram
public FromHistogram()Creates a newFromHistograminstance.
-
-
Method Details
-
inputTypesExpected
public org.anchoranalysis.experiment.task.InputTypesExpected inputTypesExpected()Description copied from class:FeatureSourceSpecifies 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:
inputTypesExpectedin classFeatureSource<org.anchoranalysis.io.input.file.FileInput,org.anchoranalysis.feature.bean.list.FeatureList<org.anchoranalysis.image.feature.input.FeatureInputHistogram>,org.anchoranalysis.image.feature.input.FeatureInputHistogram>- Returns:
- an
InputTypesExpectedobject specifying the expected input types
-
includeGroupInExperiment
public boolean includeGroupInExperiment(boolean groupGeneratorDefined)Description copied from class:FeatureSourceDetermines if group columns should be added to the CSV exports and other group exports may occur in sub-directories.- Specified by:
includeGroupInExperimentin classFeatureSource<org.anchoranalysis.io.input.file.FileInput,org.anchoranalysis.feature.bean.list.FeatureList<org.anchoranalysis.image.feature.input.FeatureInputHistogram>,org.anchoranalysis.image.feature.input.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(org.anchoranalysis.io.input.file.FileInput input, FeatureCalculationContext<org.anchoranalysis.feature.bean.list.FeatureList<org.anchoranalysis.image.feature.input.FeatureInputHistogram>> context) throws org.anchoranalysis.feature.calculate.NamedFeatureCalculateExceptionDescription copied from class:SingleRowPerInputCalculates feature-results for a particular input.- Specified by:
calculateResultsForInputin classSingleRowPerInput<org.anchoranalysis.io.input.file.FileInput,org.anchoranalysis.image.feature.input.FeatureInputHistogram>- Parameters:
input- the input.context- context for calculating features.- Returns:
- the results, with optionally associated thumbnail.
- Throws:
org.anchoranalysis.feature.calculate.NamedFeatureCalculateException- if any feature cannot calculate.
-
additionalLabelsFor
Description copied from class:SingleRowPerInputAdditional 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:
additionalLabelsForin classSingleRowPerInput<org.anchoranalysis.io.input.file.FileInput,org.anchoranalysis.image.feature.input.FeatureInputHistogram>- Parameters:
input- the input.- Returns:
- any additional labels for the input.
-
getHistogram
public org.anchoranalysis.image.bean.provider.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,
histogramcan approximate a function of the original histogram. -
setHistogram
public void setHistogram(org.anchoranalysis.image.bean.provider.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,
histogramcan approximate a function of the original histogram.
-