Class BranchExtension
If the extension(s) of a path matches a particular value, then use a particular reader, otherwise
a fallback.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAny extensions to match (case insensitive) excluding any leading period.The reader to use if the extension matches.The reader to use if the extension does not match.openFile
(Path path, ExecutionTimeRecorder executionTimeRecorder) Opens a file containing one or more images.void
setExtensions
(StringSet extensions) Any extensions to match (case insensitive) excluding any leading period.void
setReaderMatching
(StackReader readerMatching) The reader to use if the extension matches.void
setReaderNotMatching
(StackReader readerNotMatching) The reader to use if the extension does not match.Methods inherited from class org.anchoranalysis.image.io.bean.stack.reader.StackReader
readStack
Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
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 classStackReader
- 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
Any extensions to match (case insensitive) excluding any leading period. -
setExtensions
Any extensions to match (case insensitive) excluding any leading period. -
getReaderMatching
The reader to use if the extension matches. -
setReaderMatching
The reader to use if the extension matches. -
getReaderNotMatching
The reader to use if the extension does not match. -
setReaderNotMatching
The reader to use if the extension does not match.
-