public class PairNeighbors extends CombineObjectsForFeatures<FeatureInputPairObjects>
Specifically:
Features are formed by duplicating the input-feature list (inputfeatures, single-object features only):
a) First.inputfeatures applies the features to the first-object in the pair b) Second.inputfeatures applies the features to the second-object in the pair c) Merged.inputfeatures applies the features to the merged-object
Features (that are not duplicated) are also possible:
d) Image. additional single-object features that don't depend on any individual-object, only the image
e) Pair. additional pair-features (FeatureInputPairObjects
)
The column order output is: Image, First, Second, Pair, Merged
For First
and Second
, we use a cache, to avoid repeated
calculations.
Constructor and Description |
---|
PairNeighbors() |
Modifier and Type | Method and Description |
---|---|
protected BoundingBox |
boundingBoxThatSpansInput(FeatureInputPairObjects input)
Creates a bounding-box that tightly fits the input to a particular table row (could be for
one or more objects)
|
FeatureTableCalculator<FeatureInputPairObjects> |
createFeatures(List<NamedBean<FeatureListProvider<FeatureInputSingleObject>>> list,
NamedFeatureStoreFactory storeFactory,
boolean suppressErrors)
Creates features that will be applied on the objects.
|
List<NamedBean<FeatureListProvider<FeatureInputStack>>> |
getFeaturesImage()
Additional features that only depend on the image, so do not need to be replicated for every
object.
|
List<NamedBean<FeatureListProvider<FeatureInputPairObjects>>> |
getFeaturesPair()
Additional features that are processed on the pair of images (i.e.
|
boolean |
isAvoidOverlappingObjects()
If true, no overlapping objects are treated as pairs
|
boolean |
isDo3D() |
boolean |
isIncludeFirst()
Include features for the First-object of the pair
|
boolean |
isIncludeMerged()
Include features for the Merged-object of the pair
|
boolean |
isIncludeSecond()
Include features for the Second-object of the pair
|
ObjectCollection |
objectsForThumbnail(FeatureInputPairObjects input)
Selects objects from an input that will be used for thumbnail generation.
|
void |
setAvoidOverlappingObjects(boolean avoidOverlappingObjects)
If true, no overlapping objects are treated as pairs
|
void |
setDo3D(boolean do3D) |
void |
setFeaturesImage(List<NamedBean<FeatureListProvider<FeatureInputStack>>> featuresImage)
Additional features that only depend on the image, so do not need to be replicated for every
object.
|
void |
setFeaturesPair(List<NamedBean<FeatureListProvider<FeatureInputPairObjects>>> featuresPair)
Additional features that are processed on the pair of images (i.e.
|
void |
setIncludeFirst(boolean includeFirst)
Include features for the First-object of the pair
|
void |
setIncludeMerged(boolean includeMerged)
Include features for the Merged-object of the pair
|
void |
setIncludeSecond(boolean includeSecond)
Include features for the Second-object of the pair
|
List<FeatureInputPairObjects> |
startBatchDeriveInputs(ObjectCollection objects,
EnergyStack energyStack,
Logger logger)
Derives a list of inputs from an object-collection.
|
String |
uniqueIdentifierFor(FeatureInputPairObjects input)
Generates a unique identifier for a particular input
|
checkMisconfigured, deriveInputsStartBatch, getInterpolator, getThumbnail, setInterpolator, setThumbnail
describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
public FeatureTableCalculator<FeatureInputPairObjects> createFeatures(List<NamedBean<FeatureListProvider<FeatureInputSingleObject>>> list, NamedFeatureStoreFactory storeFactory, boolean suppressErrors) throws CreateException
CombineObjectsForFeatures
createFeatures
in class CombineObjectsForFeatures<FeatureInputPairObjects>
list
- beans defining features to be applied to single-objects.storeFactory
- creates as new NamedFeatureStore
as needed.suppressErrors
- when true, exceptions aren't thrown when feature-calculations fail, but
rather a log error message is written.featuresSingleObject
.CreateException
public List<FeatureInputPairObjects> startBatchDeriveInputs(ObjectCollection objects, EnergyStack energyStack, Logger logger) throws CreateException
CombineObjectsForFeatures
startBatchDeriveInputs
in class CombineObjectsForFeatures<FeatureInputPairObjects>
objects
- the object-collection.energyStack
- energy-stack used during feature calculation.logger
- the logger.CreateException
public String uniqueIdentifierFor(FeatureInputPairObjects input)
CombineObjectsForFeatures
uniqueIdentifierFor
in class CombineObjectsForFeatures<FeatureInputPairObjects>
public ObjectCollection objectsForThumbnail(FeatureInputPairObjects input) throws CreateException
CombineObjectsForFeatures
objectsForThumbnail
in class CombineObjectsForFeatures<FeatureInputPairObjects>
input
- the input.CreateException
protected BoundingBox boundingBoxThatSpansInput(FeatureInputPairObjects input)
CombineObjectsForFeatures
boundingBoxThatSpansInput
in class CombineObjectsForFeatures<FeatureInputPairObjects>
input
- the inputpublic List<NamedBean<FeatureListProvider<FeatureInputPairObjects>>> getFeaturesPair()
public void setFeaturesPair(List<NamedBean<FeatureListProvider<FeatureInputPairObjects>>> featuresPair)
public List<NamedBean<FeatureListProvider<FeatureInputStack>>> getFeaturesImage()
public void setFeaturesImage(List<NamedBean<FeatureListProvider<FeatureInputStack>>> featuresImage)
public boolean isIncludeFirst()
public void setIncludeFirst(boolean includeFirst)
public boolean isIncludeSecond()
public void setIncludeSecond(boolean includeSecond)
public boolean isIncludeMerged()
public void setIncludeMerged(boolean includeMerged)
public boolean isAvoidOverlappingObjects()
public void setAvoidOverlappingObjects(boolean avoidOverlappingObjects)
public boolean isDo3D()
public void setDo3D(boolean do3D)
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.