Class RelationWithMatches
Object
AnchorBean<ObjectFilter>
InitializableBean<ObjectFilter, ImageInitialization>
ImageBean<ObjectFilter>
ObjectFilter
ObjectFilterPredicate
ObjectFilterRelation
RelationWithMatches
Matches each object with others, and keeps only those where a relation holds true for all matches
(in terms of features)
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidend()Performs any necessary cleanup after filtering is complete.intSize of feature evaluation cache for featureEvaluatorMatchFeatureEvaluator<FeatureInputSingleObject> FeatureEvaluator<FeatureInputSingleObject> ObjectMatcherprotected booleanPerforms the matching operation using the resolved relation.voidsetCacheSize(int cacheSize) Size of feature evaluation cache for featureEvaluatorMatchvoidsetFeatureEvaluator(FeatureEvaluator<FeatureInputSingleObject> featureEvaluator) voidsetFeatureEvaluatorMatch(FeatureEvaluator<FeatureInputSingleObject> featureEvaluatorMatch) voidsetMatcher(ObjectMatcher matcher) protected voidPerforms any necessary initialization before filtering begins.Methods inherited from class org.anchoranalysis.plugin.image.bean.object.filter.ObjectFilterRelation
getRelation, match, precondition, setRelationMethods inherited from class org.anchoranalysis.plugin.image.bean.object.filter.ObjectFilterPredicate
filterMethods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitializationMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
RelationWithMatches
public RelationWithMatches()
-
-
Method Details
-
start
protected void start(Optional<Dimensions> dimensions, ObjectCollection objectsToFilter) throws OperationFailedException Description copied from class:ObjectFilterPredicatePerforms any necessary initialization before filtering begins.- Overrides:
startin classObjectFilterRelation- Parameters:
dimensions- optionalDimensionsof the objectsobjectsToFilter- theObjectCollectionto be filtered- Throws:
OperationFailedException- if the initialization fails
-
match
protected boolean match(ObjectMask object, Optional<Dimensions> dim, DoubleBiPredicate relation) throws OperationFailedException Description copied from class:ObjectFilterRelationPerforms the matching operation using the resolved relation.- Specified by:
matchin classObjectFilterRelation- Parameters:
object- theObjectMaskto be evaluateddim- optionalDimensionsof the objectrelation- the resolvedDoubleBiPredicaterelation- Returns:
- true if the object matches the criteria, false otherwise
- Throws:
OperationFailedException- if the matching operation fails
-
end
protected void end() throws OperationFailedExceptionDescription copied from class:ObjectFilterPredicatePerforms any necessary cleanup after filtering is complete.- Overrides:
endin classObjectFilterRelation- Throws:
OperationFailedException- if the cleanup operation fails
-
getFeatureEvaluator
public FeatureEvaluator<FeatureInputSingleObject> getFeatureEvaluator() -
setFeatureEvaluator
public void setFeatureEvaluator(FeatureEvaluator<FeatureInputSingleObject> featureEvaluator) -
getFeatureEvaluatorMatch
public FeatureEvaluator<FeatureInputSingleObject> getFeatureEvaluatorMatch() -
setFeatureEvaluatorMatch
public void setFeatureEvaluatorMatch(FeatureEvaluator<FeatureInputSingleObject> featureEvaluatorMatch) -
getMatcher
public ObjectMatcher getMatcher() -
setMatcher
public void setMatcher(ObjectMatcher matcher) -
getCacheSize
public int getCacheSize()Size of feature evaluation cache for featureEvaluatorMatch -
setCacheSize
public void setCacheSize(int cacheSize) Size of feature evaluation cache for featureEvaluatorMatch
-