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 aChannelgiven the entity provided by the delegate.Method to calculate the level for a particular object.The objects for whom a level is calculated.voidsetCalculateLevel(CalculateLevel calculateLevel) Method to calculate the level for a particular object.voidsetObjects(ObjectCollectionProvider objects) The objects for whom a level is calculated.protected abstract voidwriteLevelsForObjects(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, setChannelMethods inherited from class org.anchoranalysis.image.bean.provider.ChannelProvider
getAsStackMethods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitializationMethods 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:ChannelProviderUnaryCreates aChannelgiven the entity provided by the delegate.- Specified by:
createFromChannelin classChannelProviderUnary- Parameters:
channel- the entity provided by the delegate.- Returns:
- the created
Channelthat 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 tocalculateLevelas a histogram variously for particular objectsobjects- theObjectCollectionfor 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.
-