T
- the feature input-type supported by the FeatureTableCalculator
public class FromObjects<T extends FeatureInput> extends FeatureSource<MultiInput,FeatureTableCalculator<T>,FeatureInputSingleObject>
ObjectCollectionProvider
added to the end).
define
is applied and one or more ObjectCollection
are extracted.
ObjectCollection
associated with each
group.
Note unlike other feature-sources, the group here is not only what is returned by the
group
generator in the super-class, but also includes the name of the ObjectCollectionProvider
if there is more than one.
*
The following outputs are produced:
Output Name | Default? | Description |
---|---|---|
outputs from a sub-class of DefineOutputterWithEnergy as used in define . |
TODO does this need to be a MultiInput and dependent on MPP? Can it be moved to anchor-plugin-image-task??
Constructor and Description |
---|
FromObjects() |
Modifier and Type | Method and Description |
---|---|
void |
calculateAndOutput(MultiInput input,
FeatureCalculationContext<FeatureTableCalculator<T>> context)
Processes one input to calculate feature-results and output them to the file-system.
|
FeatureExporter<FeatureTableCalculator<T>> |
createExporter(LabelHeaders metadataHeaders,
List<NamedBean<FeatureListProvider<FeatureInputSingleObject>>> features,
FeatureOutputNames outputNames,
Optional<InputGrouper> grouper,
FeatureExporterContext context)
Creates the
FeatureExporter to be used for calculating and exporting feature-results. |
CombineObjectsForFeatures<T> |
getCombine() |
DefineOutputterWithEnergy |
getDefine() |
List<NamedBean<ObjectCollectionProvider>> |
getObjects() |
LabelHeaders |
headers(boolean groupsEnabled)
Generate label-headers for the non-feature-result columns in the CSV.
|
boolean |
includeGroupInExperiment(boolean groupGeneratorDefined)
If either a group-generator is defined or there's more than one provider, then groups should
be included.
|
InputTypesExpected |
inputTypesExpected()
Highest class(es) that will function as a valid input.
|
boolean |
isSuppressErrors()
When true, exceptions aren't thrown when feature-calculations fail, but rather a log error
message is written.
|
void |
setCombine(CombineObjectsForFeatures<T> combine) |
void |
setDefine(DefineOutputterWithEnergy define) |
void |
setObjects(List<NamedBean<ObjectCollectionProvider>> objects) |
void |
setSuppressErrors(boolean suppressErrors)
When true, exceptions aren't thrown when feature-calculations fail, but rather a log error
message is written.
|
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
public InputTypesExpected inputTypesExpected()
FeatureSource
This is usually the class of T (or sometimes the absolute base class InputFromManager)
inputTypesExpected
in class FeatureSource<MultiInput,FeatureTableCalculator<T extends FeatureInput>,FeatureInputSingleObject>
public FeatureExporter<FeatureTableCalculator<T>> createExporter(LabelHeaders metadataHeaders, List<NamedBean<FeatureListProvider<FeatureInputSingleObject>>> features, FeatureOutputNames outputNames, Optional<InputGrouper> grouper, FeatureExporterContext context) throws CreateException
FeatureSource
FeatureExporter
to be used for calculating and exporting feature-results.createExporter
in class FeatureSource<MultiInput,FeatureTableCalculator<T extends FeatureInput>,FeatureInputSingleObject>
metadataHeaders
- headers to use for additional "metadata" before feature-results.features
- the features to calculate.outputNames
- the names of various kind of outputs.grouper
- when defined, assigns each input to a group.context
- IO-context.FeatureExporter
as matches this source of features.CreateException
- if it cannot be created.public void calculateAndOutput(MultiInput input, FeatureCalculationContext<FeatureTableCalculator<T>> context) throws OperationFailedException
FeatureSource
calculateAndOutput
in class FeatureSource<MultiInput,FeatureTableCalculator<T extends FeatureInput>,FeatureInputSingleObject>
input
- one particular input that will creates one or more "rows" in a feature-tablecontext
- io-contextOperationFailedException
public LabelHeaders headers(boolean groupsEnabled)
FeatureSource
headers
in class FeatureSource<MultiInput,FeatureTableCalculator<T extends FeatureInput>,FeatureInputSingleObject>
public boolean includeGroupInExperiment(boolean groupGeneratorDefined)
includeGroupInExperiment
in class FeatureSource<MultiInput,FeatureTableCalculator<T extends FeatureInput>,FeatureInputSingleObject>
groupGeneratorDefined
- has a group-generator been defined for this experiment?public DefineOutputterWithEnergy getDefine()
public void setDefine(DefineOutputterWithEnergy define)
public List<NamedBean<ObjectCollectionProvider>> getObjects()
public void setObjects(List<NamedBean<ObjectCollectionProvider>> objects)
public CombineObjectsForFeatures<T> getCombine()
public void setCombine(CombineObjectsForFeatures<T> combine)
public boolean isSuppressErrors()
public void setSuppressErrors(boolean suppressErrors)
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.