Class BranchSuggestedFormat

Object
org.anchoranalysis.bean.AnchorBean<org.anchoranalysis.image.io.bean.stack.writer.StackWriter>
org.anchoranalysis.image.io.bean.stack.writer.StackWriter
org.anchoranalysis.plugin.io.bean.stack.writer.StackWriterDelegateBase
org.anchoranalysis.plugin.io.bean.stack.writer.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
    BranchSuggestedFormat()  
  • Method Summary

    Modifier and Type Method Description
    org.anchoranalysis.image.io.bean.stack.writer.StackWriter getWriterIfNoSuggestion()
    The writer to use if there is no suggested file-format.
    List<org.anchoranalysis.image.io.bean.stack.writer.StackWriter> getWritersIfSuggested()
    A list of writers to select if a given format is used
    protected org.anchoranalysis.image.io.bean.stack.writer.StackWriter selectDelegate​(org.anchoranalysis.image.io.stack.output.StackWriteOptions writeOptions)
    Selects a StackWriter to use as a delegate.
    void setWriterIfNoSuggestion​(org.anchoranalysis.image.io.bean.stack.writer.StackWriter writerIfNoSuggestion)
    The writer to use if there is no suggested file-format.
    void setWritersIfSuggested​(List<org.anchoranalysis.image.io.bean.stack.writer.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

  • Method Details

    • selectDelegate

      protected org.anchoranalysis.image.io.bean.stack.writer.StackWriter selectDelegate​(org.anchoranalysis.image.io.stack.output.StackWriteOptions writeOptions) throws org.anchoranalysis.image.io.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:
      org.anchoranalysis.image.io.ImageIOException
    • getWritersIfSuggested

      public List<org.anchoranalysis.image.io.bean.stack.writer.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<org.anchoranalysis.image.io.bean.stack.writer.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 org.anchoranalysis.image.io.bean.stack.writer.StackWriter getWriterIfNoSuggestion()
      The writer to use if there is no suggested file-format.
    • setWriterIfNoSuggestion

      public void setWriterIfNoSuggestion​(org.anchoranalysis.image.io.bean.stack.writer.StackWriter writerIfNoSuggestion)
      The writer to use if there is no suggested file-format.