Class AssignFromDictionary
- All Implemented Interfaces:
Provider<Channel>
,ProviderAsStack
Assigns a value from a dictionary to all voxels in a channel.
This class extends ChannelProviderUnary
to create a new channel by assigning a single
value, retrieved from a dictionary, to all voxels in the input channel.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateFromChannel
(Channel channel) Creates aChannel
given the entity provided by the delegate.The dictionary from which an assignment will occur.getKey()
The key of the value in the dictionary that will be assigned.void
setDictionary
(DictionaryProvider dictionary) The dictionary from which an assignment will occur.void
The key of the value in the dictionary that will be assigned.Methods inherited from class org.anchoranalysis.image.bean.provider.ChannelProviderUnary
get, getChannel, setChannel
Methods inherited from class org.anchoranalysis.image.bean.provider.ChannelProvider
getAsStack
Methods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitialization
Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
AssignFromDictionary
public AssignFromDictionary()
-
-
Method Details
-
createFromChannel
Description copied from class:ChannelProviderUnary
Creates aChannel
given the entity provided by the delegate.- Specified by:
createFromChannel
in classChannelProviderUnary
- Parameters:
channel
- the entity provided by the delegate.- Returns:
- the created
Channel
that is returned by the provider. - Throws:
ProvisionFailedException
- if the provider cannot complete successfully.
-
getDictionary
The dictionary from which an assignment will occur. -
getKey
The key of the value in the dictionary that will be assigned. -
setKey
The key of the value in the dictionary that will be assigned.
-