public class ImageInitialization extends Object implements BeanInitialization
ImageBean
.
It contains several NamedProviderStore
s for particular types of entities.
Modifier and Type | Field and Description |
---|---|
static String |
DICTIONARY_IDENTIFIER
|
Constructor and Description |
---|
ImageInitialization(SharedObjects sharedObjects)
Create with shared-objects.
|
ImageInitialization(SharedObjects sharedObjects,
Optional<ImageSizeSuggestion> suggestedSize)
Create with shared-objects and a resizing suggestion.
|
Modifier and Type | Method and Description |
---|---|
void |
addDictionary(String identifier,
Dictionary toAdd)
Adds a
Dictionary to the corresponding named-collection of dictionaries. |
void |
addObjectsFrom(NamedProvider<ObjectCollection> source)
Adds all the
ObjectCollection s available in a NamedProvider using the
corresponding identifiers. |
void |
addSharedObjectsDictionary(Optional<SharedObjects> sharedObjects,
Optional<Dictionary> dictionary)
Adds stacks and object-collections from a
SharedObjects using the respective
identifiers, and also adds a Dictionary . |
void |
addStack(String identifier,
Stack toAdd)
Adds a
Stack to the corresponding named-collection of stacks. |
void |
addStacksFrom(NamedProvider<Stack> source)
Adds all the
Stack s available in a NamedProvider using the corresponding
identifiers. |
NamedProviderStore<BinarySegmentation> |
binarySegmentations()
A collection of
BinarySegmentation s, indexed by name. |
NamedProviderStore<Channel> |
channels()
A collection of
Channel s, indexed by name. |
NamedProvider<Stack> |
combinedStacks()
Exposes several entities that have natural
Stack representations as a unified NamedProvider . |
NamedProviderStore<Dictionary> |
dictionaries()
Named-store of
Dictionary s. |
DictionaryInitialization |
dictionaryInitialization()
The associated initialization for a
DictionaryBean . |
FeatureRelatedInitialization |
featuresInitialization()
The associated initialization for a
FeatureRelatedBean . |
NamedProviderStore<Path> |
filePaths()
Named-store of file-paths.
|
NamedProviderStore<Histogram> |
histograms()
A collection of
Histogram s, indexed by name. |
NamedProviderStore<Mask> |
masks()
A collection of
Mask s, indexed by name. |
Path |
modelDirectory()
Directory where machine-learning models can be found.
|
NamedProviderStore<ObjectCollection> |
objects()
A collection of
ObjectCollection s, indexed by name. |
void |
populate(BeanInitializer<?> propertyInitializer,
Define define,
Logger logger)
Adds diverse entities from a
Define into the corresponding name-collections. |
SharedObjects |
sharedObjects()
Objects shared between different components, a form of shared memory between them.
|
NamedProviderStore<Stack> |
stacks()
A collection of
Stack s, indexed by name. |
Optional<ImageSizeSuggestion> |
suggestedSize()
A suggested input on how to resize an image, if one is provided.
|
public static final String DICTIONARY_IDENTIFIER
addSharedObjectsDictionary(java.util.Optional<org.anchoranalysis.core.identifier.provider.store.SharedObjects>, java.util.Optional<org.anchoranalysis.core.value.Dictionary>)
.public ImageInitialization(SharedObjects sharedObjects)
sharedObjects
- objects shared between different components, a form of shared memory
between them.public ImageInitialization(SharedObjects sharedObjects, Optional<ImageSizeSuggestion> suggestedSize)
sharedObjects
- objects shared between different components, a form of shared memory
between them.suggestedSize
- a suggested input on how to resize an image, if one is provided.public NamedProviderStore<Path> filePaths()
public NamedProviderStore<Dictionary> dictionaries()
Dictionary
s.public Path modelDirectory()
public DictionaryInitialization dictionaryInitialization()
DictionaryBean
.public FeatureRelatedInitialization featuresInitialization()
FeatureRelatedBean
.public NamedProvider<Stack> combinedStacks()
Stack
representations as a unified NamedProvider
.
These are the:
If multiple sources have the same identifier, only one identifier (arbitrarily selected)
will exist in the unified NamedProvider
.
NamedProvider
combining the above entities as Stack
s.public void addDictionary(String identifier, Dictionary toAdd) throws OperationFailedException
Dictionary
to the corresponding named-collection of dictionaries.identifier
- the unique name of the dictionary.toAdd
- the dictionary to add.OperationFailedException
- if the identifier already exists, or otherwise the add
operation fails.public void addStack(String identifier, Stack toAdd) throws OperationFailedException
Stack
to the corresponding named-collection of stacks.identifier
- the unique name of the stack.toAdd
- the stack to add.OperationFailedException
- if the identifier already exists, or otherwise the add
operation fails.public void addStacksFrom(NamedProvider<Stack> source) throws OperationFailedException
Stack
s available in a NamedProvider
using the corresponding
identifiers.source
- the NamedProvider
to add from.OperationFailedException
- if an identifier already exists, or otherwise the add
operation fails.public void addObjectsFrom(NamedProvider<ObjectCollection> source) throws OperationFailedException
ObjectCollection
s available in a NamedProvider
using the
corresponding identifiers.source
- the NamedProvider
to add from.OperationFailedException
- if an identifier already exists, or otherwise the add
operation fails.public void populate(BeanInitializer<?> propertyInitializer, Define define, Logger logger) throws OperationFailedException
Define
into the corresponding name-collections.propertyInitializer
- initializes the properties of objects, where initialization is
required.define
- the Define
from which entities are added.logger
- a logger to report messages or errors.OperationFailedException
- if the identifier for an entity already exists, or otherwise
the add operation fails.public void addSharedObjectsDictionary(Optional<SharedObjects> sharedObjects, Optional<Dictionary> dictionary) throws OperationFailedException
SharedObjects
using the respective
identifiers, and also adds a Dictionary
.
The dictionary is assigned the identifier "input_dictionary".
sharedObjects
- the shared-objects to add entities from, if it exists.dictionary
- the dictionary to add, if it exists.OperationFailedException
- if the identifier for an entity already exists, or otherwise
the add operation fails.public SharedObjects sharedObjects()
public Optional<ImageSizeSuggestion> suggestedSize()
public NamedProviderStore<Stack> stacks()
Stack
s, indexed by name.public NamedProviderStore<Histogram> histograms()
Histogram
s, indexed by name.public NamedProviderStore<ObjectCollection> objects()
ObjectCollection
s, indexed by name.public NamedProviderStore<Channel> channels()
Channel
s, indexed by name.public NamedProviderStore<Mask> masks()
Mask
s, indexed by name.public NamedProviderStore<BinarySegmentation> binarySegmentations()
BinarySegmentation
s, indexed by name.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.