Class ObjectCollectionProviderMorphological
- All Implemented Interfaces:
Provider<ObjectCollection>
Base class for providers that apply morphological operations to an
ObjectCollection.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ObjectMaskapplyMorphologicalOperation(ObjectMask object, Optional<Extent> extent) Applies the morphological operation to a singleObjectMask.createFromObjects(ObjectCollection objects) Creates aObjectCollectiongiven the entity provided by the delegate.Derives the extent from the dimensions, if available.intThe number of iterations to apply the morphological operation.booleanisDo3D()Whether to perform the operation in 3D (true) or 2D (false).voidsetDo3D(boolean do3D) Whether to perform the operation in 3D (true) or 2D (false).voidsetIterations(int iterations) The number of iterations to apply the morphological operation.Methods inherited from class org.anchoranalysis.plugin.image.bean.object.provider.WithOptionalDimensionsBase
createDims, getDimensions, setDimensionsMethods inherited from class org.anchoranalysis.image.bean.provider.ObjectCollectionProviderUnary
get, getObjects, setObjectsMethods 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
-
ObjectCollectionProviderMorphological
public ObjectCollectionProviderMorphological()
-
-
Method Details
-
createFromObjects
Description copied from class:ObjectCollectionProviderUnaryCreates aObjectCollectiongiven the entity provided by the delegate.- Specified by:
createFromObjectsin classObjectCollectionProviderUnary- Parameters:
objects- the entity provided by the delegate.- Returns:
- the created
ObjectCollectionthat is returned by the provider. - Throws:
ProvisionFailedException- if the provider cannot complete successfully.
-
applyMorphologicalOperation
protected abstract ObjectMask applyMorphologicalOperation(ObjectMask object, Optional<Extent> extent) throws ProvisionFailedException Applies the morphological operation to a singleObjectMask.- Parameters:
object- the object to apply the operation toextent- optional extent to constrain the operation- Returns:
- the resulting object after applying the operation
- Throws:
ProvisionFailedException- if the operation fails
-
deriveExtent
Derives the extent from the dimensions, if available.- Returns:
- an optional extent derived from the dimensions
- Throws:
ProvisionFailedException- if deriving the extent fails
-
isDo3D
public boolean isDo3D()Whether to perform the operation in 3D (true) or 2D (false). -
setDo3D
public void setDo3D(boolean do3D) Whether to perform the operation in 3D (true) or 2D (false). -
getIterations
public int getIterations()The number of iterations to apply the morphological operation. -
setIterations
public void setIterations(int iterations) The number of iterations to apply the morphological operation.
-