Class FromDimensionsBase
- All Implemented Interfaces:
Provider<Channel>,ProviderAsStack
- Direct Known Subclasses:
CreateNew,DistanceTransformForEachObject3D,RepeatSlice
An abstract base class for creating a channel from specified dimensions.
This class extends ChannelProvider to provide a framework for creating channels based
on given dimensions. Subclasses must implement the createFromDimensions method.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ChannelcreateFromDimensions(Dimensions dimensions) Creates a channel from the given dimensions.get()Gets or creates an object of typeT.The provider for the dimensions of the channel to be created.voidsetDimensions(DimensionsProvider dimensions) The provider for the dimensions of the channel to be created.Methods 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
-
FromDimensionsBase
public FromDimensionsBase()
-
-
Method Details
-
get
Description copied from interface:ProviderGets or creates an object of typeT.- Returns:
- the object returned by the provider.
- Throws:
ProvisionFailedException- if the object cannot be returned.
-
createFromDimensions
protected abstract Channel createFromDimensions(Dimensions dimensions) throws ProvisionFailedException Creates a channel from the given dimensions.- Parameters:
dimensions- theDimensionsto use for creating the channel- Returns:
- a new
Channelwith the specified dimensions - Throws:
ProvisionFailedException- if the channel creation fails
-
getDimensions
The provider for the dimensions of the channel to be created.Defaults to
GuessDimensionsif not explicitly set. -
setDimensions
The provider for the dimensions of the channel to be created.Defaults to
GuessDimensionsif not explicitly set.
-