Interface InputFromManager

All Known Subinterfaces:
ProvidesStackInput, StackSequenceInput
All Known Implementing Classes:
AnnotationComparisonInput, AnnotationWithStrategy, ConvertNamedChannelsInputToStack, FileInput, FileWithDirectoryInput, ImageMetadataInput, InputFromManagerDelegate, MultiInput, NamedChannelsInput, NamedChannelsInputPart, SingleFileInputBase

public interface InputFromManager
One particular input for processing.
Author:
Owen Feehan
  • Method Details

    • identifier

      String identifier()
      A unique name associated with the input.

      The name should never begin with or end with whitespace.

      It should never contain backslashes, but forward-slashes are permitted.

      Returns:
      a string uniquely (in the current dataset) identifying the input in a meaningful way.
    • identifierAsPath

      default Path identifierAsPath()
      Like identifier() but converts the identifier to a path.
      Returns:
      a path based upon the unique identifier for the input
    • pathForBinding

      Optional<Path> pathForBinding()
      A path to a file from which this input originated.

      This path is not guaranteed to be unique for each input i.e. multiple inputs may originate from the same path.

      Returns:
      the primary path associated with the input, if it exists.
    • pathForBindingRequired

      default Path pathForBindingRequired() throws InputReadFailedException
      Like pathForBinding() but throws an exception if a path isn't present.
      Returns:
      the primary path associated with the input
      Throws:
      InputReadFailedException - if such a path doesn't exist
    • asFile

      default NamedFile asFile() throws InputReadFailedException
      Expresses the input as a file with a name (the unique identifier).
      Returns:
      the file with its associated unique identifier as a name
      Throws:
      InputReadFailedException - if no path is associated with the input
    • allAssociatedPaths

      default List<Path> allAssociatedPaths()
      A path to all files associated with the input, including pathForBinding().

      Normally an input (e.g. an image) is stored as one file on the file-system, and this is associated with a single file.

      However, an input (e.g. an image) may originate in several files, and have several associations.

      Or an input may not originate on the file-system, and thus have no associations.

      Returns:
      a list with all paths associated with the input.
    • close

      default void close(ErrorReporter errorReporter)
      Performs all tidying up, file-closing etc. after we are finished using the InputFromManager
      Parameters:
      errorReporter - whether errors are reported to.