Class LevelPerObjectBase
- All Implemented Interfaces:
Provider<Channel>
,ProviderAsStack
- Direct Known Subclasses:
LevelPerObjectIndependently
,LevelPerObjectNeighbors
Creates a channel with a level calculated for each object using various methods.
This abstract class provides a base for creating channels where each object is assigned a specific intensity level based on calculations performed on the input channel.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateFromChannel
(Channel channel) Creates aChannel
given the entity provided by the delegate.Method to calculate the level for a particular object.The objects for whom a level is calculated.void
setCalculateLevel
(CalculateLevel calculateLevel) Method to calculate the level for a particular object.void
setObjects
(ObjectCollectionProvider objects) The objects for whom a level is calculated.protected abstract void
writeLevelsForObjects
(Channel input, ObjectCollection objects, Channel output) Creates a channel with the levels for a set of objects.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
-
LevelPerObjectBase
public LevelPerObjectBase()
-
-
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.
-
writeLevelsForObjects
protected abstract void writeLevelsForObjects(Channel input, ObjectCollection objects, Channel output) throws ProvisionFailedException Creates a channel with the levels for a set of objects.- Parameters:
input
- the channel whose intensity is passed tocalculateLevel
as a histogram variously for particular objectsobjects
- theObjectCollection
for which levels are calculatedoutput
- the channel where the calculated-levels are written (for each object)- Throws:
ProvisionFailedException
- if there's an error during the level calculation or writing process
-
getObjects
The objects for whom a level is calculated. -
setObjects
The objects for whom a level is calculated. -
getCalculateLevel
Method to calculate the level for a particular object.It is passed a histogram (calculated in different ways) for each object.
-
setCalculateLevel
Method to calculate the level for a particular object.It is passed a histogram (calculated in different ways) for each object.
-