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 Channel
createFromDimensions
(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.void
setDimensions
(DimensionsProvider dimensions) The provider for the dimensions of the channel to be created.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
-
FromDimensionsBase
public FromDimensionsBase()
-
-
Method Details
-
get
Description copied from interface:Provider
Gets 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
- theDimensions
to use for creating the channel- Returns:
- a new
Channel
with the specified dimensions - Throws:
ProvisionFailedException
- if the channel creation fails
-
getDimensions
The provider for the dimensions of the channel to be created.Defaults to
GuessDimensions
if not explicitly set. -
setDimensions
The provider for the dimensions of the channel to be created.Defaults to
GuessDimensions
if not explicitly set.
-