Class FromImage

Object
AnchorBean<FeatureSource<ProvidesStackInput, FeatureList<FeatureInputStack>, FeatureInputStack>>
FeatureSource<ProvidesStackInput, FeatureList<FeatureInputStack>, FeatureInputStack>
SingleRowPerInput<ProvidesStackInput, FeatureInputStack>
FromImage

public class FromImage extends SingleRowPerInput<ProvidesStackInput, FeatureInputStack>
Calculates features from a single image.

Each image produces a single row of features.

  • Constructor Details

    • FromImage

      public FromImage()
      Creates a new FromImage 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<ProvidesStackInput, FeatureList<FeatureInputStack>, FeatureInputStack>
      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<ProvidesStackInput, FeatureList<FeatureInputStack>, FeatureInputStack>
      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(ProvidesStackInput input, FeatureCalculationContext<FeatureList<FeatureInputStack>> context) throws NamedFeatureCalculateException
      Description copied from class: SingleRowPerInput
      Calculates feature-results for a particular input.
      Specified by:
      calculateResultsForInput in class SingleRowPerInput<ProvidesStackInput, FeatureInputStack>
      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(ProvidesStackInput 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<ProvidesStackInput, FeatureInputStack>
      Parameters:
      input - the input.
      Returns:
      any additional labels for the input.
    • getStackEnergy

      public StackProvider getStackEnergy()
      Optionally defines an energy-stack for feature calculation (if not set, the energy-stack is considered to be the input stacks).
    • setStackEnergy

      public void setStackEnergy(StackProvider stackEnergy)
      Optionally defines an energy-stack for feature calculation (if not set, the energy-stack is considered to be the input stacks).
    • getThumbnail

      public ThumbnailFromStack getThumbnail()
      Method to generate a thumbnail for images.
    • setThumbnail

      public void setThumbnail(ThumbnailFromStack thumbnail)
      Method to generate a thumbnail for images.