Class BranchExtension


public class BranchExtension extends StackReader
If the extension(s) of a path matches a particular value, then use a particular reader, otherwise a fallback.
Author:
Owen Feehan
  • Constructor Details

    • BranchExtension

      public BranchExtension()
  • Method Details

    • openFile

      public OpenedImageFile openFile(Path path, ExecutionTimeRecorder executionTimeRecorder) throws ImageIOException
      Description copied from class: StackReader
      Opens a file containing one or more images.

      This method should run as computationally quicky as possible. Image voxels should not yet be read.

      Specified by:
      openFile in class StackReader
      Parameters:
      path - where the file is located.
      executionTimeRecorder - records the execution-times of certain operations.
      Returns:
      an interface to the opened file that should be closed when no longer in use.
      Throws:
      ImageIOException - if the file cannot be read.
    • getExtensions

      public StringSet getExtensions()
      Any extensions to match (case insensitive) excluding any leading period.
    • setExtensions

      public void setExtensions(StringSet extensions)
      Any extensions to match (case insensitive) excluding any leading period.
    • getReaderMatching

      public StackReader getReaderMatching()
      The reader to use if the extension matches.
    • setReaderMatching

      public void setReaderMatching(StackReader readerMatching)
      The reader to use if the extension matches.
    • getReaderNotMatching

      public StackReader getReaderNotMatching()
      The reader to use if the extension does not match.
    • setReaderNotMatching

      public void setReaderNotMatching(StackReader readerNotMatching)
      The reader to use if the extension does not match.