Class WithRadiusBase
- All Implemented Interfaces:
Provider<Channel>
,ProviderAsStack
- Direct Known Subclasses:
BackgroundSubtractor
,WithFilterBase
A
ChannelProviderUnary
with a 'radius' parameter.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateFromChannel
(Channel channel) Creates aChannel
given the entity provided by the delegate.protected abstract Channel
createFromChannel
(Channel channel, int radius) Creates a new channel from an existing channel and a radius.double
The radius of the operation.boolean
If true, treats the radius as being in meters.void
setRadius
(double radius) The radius of the operation.void
setRadiusInMeters
(boolean radiusInMeters) If true, treats the radius as being in meters.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
-
WithRadiusBase
public WithRadiusBase()
-
-
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.
-
createFromChannel
protected abstract Channel createFromChannel(Channel channel, int radius) throws ProvisionFailedException Creates a new channel from an existing channel and a radius.- Parameters:
channel
- the inputChannel
radius
- the radius in voxels- Returns:
- the newly created
Channel
- Throws:
ProvisionFailedException
- if the channel creation fails
-
getRadius
public double getRadius()The radius of the operation. -
setRadius
public void setRadius(double radius) The radius of the operation. -
isRadiusInMeters
public boolean isRadiusInMeters()If true, treats the radius as being in meters. Otherwise, it's in voxels. -
setRadiusInMeters
public void setRadiusInMeters(boolean radiusInMeters) If true, treats the radius as being in meters. Otherwise, it's in voxels.
-