Package org.anchoranalysis.annotation.io
Interface AnnotationReader<T extends Annotation>
- Type Parameters:
T- annotation-type.
- All Known Implementing Classes:
ImageLabelAnnotationReader
public interface AnnotationReader<T extends Annotation>
Allows an annotation to be read from the file-system.
- Author:
- Owen Feehan
-
Method Details
-
read
Optional<T> read(Path path, org.anchoranalysis.core.time.OperationContext context) throws org.anchoranalysis.io.input.InputReadFailedExceptionReads an annotation, if possible, from the file-system.- Parameters:
path- a path representing the annotation (or we derive another path from this path).context- TODO- Returns:
- the annotation or
Optional.empty()if it can't be read. - Throws:
org.anchoranalysis.io.input.InputReadFailedException- if the annotation cannot be read successfully.
-