Class FromImageMetadata
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.image.io.stack.input.ImageMetadataInput,org.anchoranalysis.image.feature.input.FeatureInputImageMetadata>
org.anchoranalysis.plugin.image.task.bean.feature.source.FromImageMetadata
public class FromImageMetadata extends SingleRowPerInput<org.anchoranalysis.image.io.stack.input.ImageMetadataInput,org.anchoranalysis.image.feature.input.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:
- an image identifier
- file extension (or empty if none exists) according to the procedure in
ExtensionUtilities.extractExtension(String). - file creation date
- file modification date
- the results of each feature.
All dates are expressed in the current time-zone.
-
Constructor Summary
Constructors Constructor Description FromImageMetadata()Creates a newFromImageMetadatainstance. -
Method Summary
Modifier and Type Method Description protected Optional<String[]>additionalLabelsFor(org.anchoranalysis.image.io.stack.input.ImageMetadataInput input)Additional labels for an input to include (after the identifier, and before any group labels).protected ResultsVectorWithThumbnailcalculateResultsForInput(org.anchoranalysis.image.io.stack.input.ImageMetadataInput input, FeatureCalculationContext<org.anchoranalysis.feature.bean.list.FeatureList<org.anchoranalysis.image.feature.input.FeatureInputImageMetadata>> context)Calculates feature-results for a particular input.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.Methods inherited from class org.anchoranalysis.plugin.image.task.bean.feature.source.SingleRowPerInput
calculateAndOutput, createExporter, headers
-
Constructor Details
-
FromImageMetadata
public FromImageMetadata()Creates a newFromImageMetadatainstance.
-
-
Method Details
-
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.image.io.stack.input.ImageMetadataInput,org.anchoranalysis.feature.bean.list.FeatureList<org.anchoranalysis.image.feature.input.FeatureInputImageMetadata>,org.anchoranalysis.image.feature.input.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 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.image.io.stack.input.ImageMetadataInput,org.anchoranalysis.feature.bean.list.FeatureList<org.anchoranalysis.image.feature.input.FeatureInputImageMetadata>,org.anchoranalysis.image.feature.input.FeatureInputImageMetadata>- Returns:
- an
InputTypesExpectedobject specifying the expected input types
-
additionalLabelsFor
protected Optional<String[]> additionalLabelsFor(org.anchoranalysis.image.io.stack.input.ImageMetadataInput input) throws org.anchoranalysis.core.exception.OperationFailedExceptionDescription 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.image.io.stack.input.ImageMetadataInput,org.anchoranalysis.image.feature.input.FeatureInputImageMetadata>- Parameters:
input- the input.- Returns:
- any additional labels for the input.
- Throws:
org.anchoranalysis.core.exception.OperationFailedException- if the operation fails
-
calculateResultsForInput
protected ResultsVectorWithThumbnail calculateResultsForInput(org.anchoranalysis.image.io.stack.input.ImageMetadataInput input, FeatureCalculationContext<org.anchoranalysis.feature.bean.list.FeatureList<org.anchoranalysis.image.feature.input.FeatureInputImageMetadata>> context) throws org.anchoranalysis.feature.calculate.NamedFeatureCalculateExceptionDescription copied from class:SingleRowPerInputCalculates feature-results for a particular input.- Specified by:
calculateResultsForInputin classSingleRowPerInput<org.anchoranalysis.image.io.stack.input.ImageMetadataInput,org.anchoranalysis.image.feature.input.FeatureInputImageMetadata>- 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.
-