Class FromImageMetadata

Object
AnchorBean<FeatureSource<ImageMetadataInput, FeatureList<FeatureInputImageMetadata>, FeatureInputImageMetadata>>
FeatureSource<ImageMetadataInput, FeatureList<FeatureInputImageMetadata>, FeatureInputImageMetadata>
SingleRowPerInput<ImageMetadataInput, FeatureInputImageMetadata>
FromImageMetadata

public class FromImageMetadata extends SingleRowPerInput<ImageMetadataInput, FeatureInputImageMetadata>
Calculates features from the metadata from single image.

The image voxels should not be loaded in memory, to keep this as computationally efficient as possible.

Each image's metadata produces a single row of features.

The columns produced are:

  1. an image identifier
  2. file extension (or empty if none exists) according to the procedure in ExtensionUtilities.extractExtension(String).
  3. file creation date
  4. file modification date
  5. the results of each feature.

All dates are expressed in the current time-zone.

  • Constructor Details

    • FromImageMetadata

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

    • 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<ImageMetadataInput, FeatureList<FeatureInputImageMetadata>, FeatureInputImageMetadata>
      Parameters:
      groupGeneratorDefined - has a group-generator been defined for this experiment?
      Returns:
      true if a group-generator has been defined, false otherwise
    • 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<ImageMetadataInput, FeatureList<FeatureInputImageMetadata>, FeatureInputImageMetadata>
      Returns:
      an InputTypesExpected object specifying the expected input types
    • additionalLabelsFor

      protected Optional<String[]> additionalLabelsFor(ImageMetadataInput input) throws OperationFailedException
      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<ImageMetadataInput, FeatureInputImageMetadata>
      Parameters:
      input - the input.
      Returns:
      any additional labels for the input.
      Throws:
      OperationFailedException - if the operation fails
    • calculateResultsForInput

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