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 aChannelgiven the entity provided by the delegate.protected abstract ChannelcreateFromChannel(Channel channel, int radius) Creates a new channel from an existing channel and a radius.doubleThe radius of the operation.booleanIf true, treats the radius as being in meters.voidsetRadius(double radius) The radius of the operation.voidsetRadiusInMeters(boolean radiusInMeters) If true, treats the radius as being in meters.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
-
WithRadiusBase
public WithRadiusBase()
-
-
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.
-
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 inputChannelradius- 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.
-