Class BranchSuggestedFormat

Object
AnchorBean<StackWriter>
StackWriter
StackWriterDelegateBase
BranchSuggestedFormat

public class BranchSuggestedFormat extends StackWriterDelegateBase
Selects particular writers based on if particular suggested image formats are present.

This is useful for mapping a suggested file format by user to the underlying StackWriter that should write it.

Author:
Owen Feehan
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    StackWriter
    The writer to use if there is no suggested file-format.
    List<StackWriter>
    A list of writers to select if a given format is used
    protected StackWriter
    selectDelegate(StackWriteOptions writeOptions)
    Selects a StackWriter to use as a delegate.
    void
    setWriterIfNoSuggestion(StackWriter writerIfNoSuggestion)
    The writer to use if there is no suggested file-format.
    void
    setWritersIfSuggested(List<StackWriter> writersIfSuggested)
    A list of writers to select if a given format is used

    Methods inherited from class org.anchoranalysis.plugin.io.bean.stack.writer.StackWriterDelegateBase

    fileFormat, writeStack

    Methods inherited from class org.anchoranalysis.image.io.bean.stack.writer.StackWriter

    fileFormatWarnUnexpected, writeStackWithExtension

    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

    • BranchSuggestedFormat

      public BranchSuggestedFormat()
  • Method Details

    • selectDelegate

      protected StackWriter selectDelegate(StackWriteOptions writeOptions) throws ImageIOException
      Description copied from class: StackWriterDelegateBase
      Selects a StackWriter to use as a delegate.
      Specified by:
      selectDelegate in class StackWriterDelegateBase
      Parameters:
      writeOptions - options that specify what kind of rasters will be written.
      Returns:
      the selected StackWriter
      Throws:
      ImageIOException
    • getWritersIfSuggested

      public List<StackWriter> getWritersIfSuggested()
      A list of writers to select if a given format is used

      The name of the format should be the default extension (without a leading period) of the corresponding format. Case is irrelevant.

    • setWritersIfSuggested

      public void setWritersIfSuggested(List<StackWriter> writersIfSuggested)
      A list of writers to select if a given format is used

      The name of the format should be the default extension (without a leading period) of the corresponding format. Case is irrelevant.

    • getWriterIfNoSuggestion

      public StackWriter getWriterIfNoSuggestion()
      The writer to use if there is no suggested file-format.
    • setWriterIfNoSuggestion

      public void setWriterIfNoSuggestion(StackWriter writerIfNoSuggestion)
      The writer to use if there is no suggested file-format.