Class ImageInitialization
Object
ImageInitialization
- All Implemented Interfaces:
BeanInitialization
The state used to initialize a
ImageBean.
It contains several NamedProviderStores for particular types of entities.
- Author:
- Owen
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionImageInitialization(SharedObjects sharedObjects) Create with shared-objects.ImageInitialization(SharedObjects sharedObjects, Optional<ImageSizeSuggestion> suggestedSize) Create with shared-objects and a resizing suggestion. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDictionary(String identifier, Dictionary toAdd) Adds aDictionaryto the corresponding named-collection of dictionaries.voidaddObjectsFrom(NamedProvider<ObjectCollection> source) Adds all theObjectCollections available in aNamedProviderusing the corresponding identifiers.voidaddSharedObjectsDictionary(Optional<SharedObjects> sharedObjects, Optional<Dictionary> dictionary) Adds stacks and object-collections from aSharedObjectsusing the respective identifiers, and also adds aDictionary.voidAdds aStackto the corresponding named-collection of stacks.voidaddStacksFrom(NamedProvider<Stack> source) Adds all theStacks available in aNamedProviderusing the corresponding identifiers.A collection ofBinarySegmentations, indexed by name.channels()A collection ofChannels, indexed by name.Exposes several entities that have naturalStackrepresentations as a unifiedNamedProvider.Named-store ofDictionarys.The associated initialization for aDictionaryBean.The associated initialization for aFeatureRelatedBean.Named-store of file-paths.A collection ofHistograms, indexed by name.masks()A collection ofMasks, indexed by name.Directory where machine-learning models can be found.objects()A collection ofObjectCollections, indexed by name.voidpopulate(BeanInitializer<?> propertyInitializer, Define define, Logger logger) Adds diverse entities from aDefineinto the corresponding name-collections.Objects shared between different components, a form of shared memory between them.stacks()A collection ofStacks, indexed by name.A suggested input on how to resize an image, if one is provided.
-
Field Details
-
DICTIONARY_IDENTIFIER
The name of the dictionary added byaddSharedObjectsDictionary(java.util.Optional<org.anchoranalysis.core.identifier.provider.store.SharedObjects>, java.util.Optional<org.anchoranalysis.core.value.Dictionary>).- See Also:
-
-
Constructor Details
-
Method Details
-
filePaths
Named-store of file-paths.- Returns:
- the store.
-
dictionaries
Named-store ofDictionarys.- Returns:
- the store.
-
modelDirectory
Directory where machine-learning models can be found.- Returns:
- the path.
-
dictionaryInitialization
The associated initialization for aDictionaryBean.- Returns:
- the associated initialization.
-
featuresInitialization
The associated initialization for aFeatureRelatedBean.- Returns:
- the associated initialization.
-
combinedStacks
Exposes several entities that have naturalStackrepresentations as a unifiedNamedProvider.These are the:
If multiple sources have the same identifier, only one identifier (arbitrarily selected) will exist in the unified
NamedProvider.- Returns:
- a newly created
NamedProvidercombining the above entities asStacks.
-
addDictionary
Adds aDictionaryto the corresponding named-collection of dictionaries.- Parameters:
identifier- the unique name of the dictionary.toAdd- the dictionary to add.- Throws:
OperationFailedException- if the identifier already exists, or otherwise the add operation fails.
-
addStack
Adds aStackto the corresponding named-collection of stacks.- Parameters:
identifier- the unique name of the stack.toAdd- the stack to add.- Throws:
OperationFailedException- if the identifier already exists, or otherwise the add operation fails.
-
addStacksFrom
Adds all theStacks available in aNamedProviderusing the corresponding identifiers.- Parameters:
source- theNamedProviderto add from.- Throws:
OperationFailedException- if an identifier already exists, or otherwise the add operation fails.
-
addObjectsFrom
Adds all theObjectCollections available in aNamedProviderusing the corresponding identifiers.- Parameters:
source- theNamedProviderto add from.- Throws:
OperationFailedException- if an identifier already exists, or otherwise the add operation fails.
-
populate
public void populate(BeanInitializer<?> propertyInitializer, Define define, Logger logger) throws OperationFailedException Adds diverse entities from aDefineinto the corresponding name-collections.- Parameters:
propertyInitializer- initializes the properties of objects, where initialization is required.define- theDefinefrom which entities are added.logger- a logger to report messages or errors.- Throws:
OperationFailedException- if the identifier for an entity already exists, or otherwise the add operation fails.
-
suggestedSize
A suggested input on how to resize an image, if one is provided. -
stacks
A collection ofStacks, indexed by name. -
histograms
A collection ofHistograms, indexed by name. -
objects
A collection ofObjectCollections, indexed by name. -
channels
A collection ofChannels, indexed by name. -
masks
A collection ofMasks, indexed by name. -
binarySegmentations
A collection ofBinarySegmentations, indexed by name.
-