Class ImageInitialization
Object
ImageInitialization
- All Implemented Interfaces:
BeanInitialization
The state used to initialize a
ImageBean
.
It contains several NamedProviderStore
s 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 TypeMethodDescriptionvoid
addDictionary
(String identifier, Dictionary toAdd) Adds aDictionary
to the corresponding named-collection of dictionaries.void
addObjectsFrom
(NamedProvider<ObjectCollection> source) Adds all theObjectCollection
s available in aNamedProvider
using the corresponding identifiers.void
addSharedObjectsDictionary
(Optional<SharedObjects> sharedObjects, Optional<Dictionary> dictionary) Adds stacks and object-collections from aSharedObjects
using the respective identifiers, and also adds aDictionary
.void
Adds aStack
to the corresponding named-collection of stacks.void
addStacksFrom
(NamedProvider<Stack> source) Adds all theStack
s available in aNamedProvider
using the corresponding identifiers.A collection ofBinarySegmentation
s, indexed by name.channels()
A collection ofChannel
s, indexed by name.Exposes several entities that have naturalStack
representations as a unifiedNamedProvider
.Named-store ofDictionary
s.The associated initialization for aDictionaryBean
.The associated initialization for aFeatureRelatedBean
.Named-store of file-paths.A collection ofHistogram
s, indexed by name.masks()
A collection ofMask
s, indexed by name.Directory where machine-learning models can be found.objects()
A collection ofObjectCollection
s, indexed by name.void
populate
(BeanInitializer<?> propertyInitializer, Define define, Logger logger) Adds diverse entities from aDefine
into the corresponding name-collections.Objects shared between different components, a form of shared memory between them.stacks()
A collection ofStack
s, 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 ofDictionary
s.- 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 naturalStack
representations 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
NamedProvider
combining the above entities asStack
s.
-
addDictionary
Adds aDictionary
to 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 aStack
to 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 theStack
s available in aNamedProvider
using the corresponding identifiers.- Parameters:
source
- theNamedProvider
to add from.- Throws:
OperationFailedException
- if an identifier already exists, or otherwise the add operation fails.
-
addObjectsFrom
Adds all theObjectCollection
s available in aNamedProvider
using the corresponding identifiers.- Parameters:
source
- theNamedProvider
to 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 aDefine
into the corresponding name-collections.- Parameters:
propertyInitializer
- initializes the properties of objects, where initialization is required.define
- theDefine
from 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 ofStack
s, indexed by name. -
histograms
A collection ofHistogram
s, indexed by name. -
objects
A collection ofObjectCollection
s, indexed by name. -
channels
A collection ofChannel
s, indexed by name. -
masks
A collection ofMask
s, indexed by name. -
binarySegmentations
A collection ofBinarySegmentation
s, indexed by name.
-