Class FromDimensionsBase

Object
AnchorBean<ChannelProvider>
InitializableBean<ChannelProvider, ImageInitialization>
ImageBean<ChannelProvider>
BeanProviderAsStackBase<ChannelProvider, Channel>
ChannelProvider
FromDimensionsBase
All Implemented Interfaces:
Provider<Channel>, ProviderAsStack
Direct Known Subclasses:
CreateNew, RepeatSlice

public abstract class FromDimensionsBase extends ChannelProvider
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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract Channel
    createFromDimensions(Dimensions dimensions)
    Creates a channel from the given dimensions.
    Channel
    get()
     
    DimensionsProvider
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • FromDimensionsBase

      public FromDimensionsBase()
  • Method Details

    • get

      public Channel get() throws ProvisionFailedException
      Throws:
      ProvisionFailedException
    • createFromDimensions

      protected abstract Channel createFromDimensions(Dimensions dimensions) throws ProvisionFailedException
      Creates a channel from the given dimensions.
      Parameters:
      dimensions - the Dimensions to use for creating the channel
      Returns:
      a new Channel with the specified dimensions
      Throws:
      ProvisionFailedException - if the channel creation fails
    • getDimensions

      public DimensionsProvider getDimensions()
      The provider for the dimensions of the channel to be created.

      Defaults to GuessDimensions if not explicitly set.

    • setDimensions

      public void setDimensions(DimensionsProvider dimensions)
      The provider for the dimensions of the channel to be created.

      Defaults to GuessDimensions if not explicitly set.