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 Summary
Modifier and TypeMethodDescriptionread
(Path path, OperationContext context) Reads an annotation, if possible, from the file-system.
-
Method Details
-
read
Reads an annotation, if possible, from the file-system.- Parameters:
path
- a path representing the annotation (or we derive another path from this path).context
- theOperationContext
for the read operation.- Returns:
- the annotation or
Optional.empty()
if it can't be read. - Throws:
InputReadFailedException
- if the annotation cannot be read successfully.
-