public interface DataProvider
extends java.io.Closeable
Modifier and Type | Method and Description |
---|---|
void |
close() |
Image |
getAnyImage()
Retrieve any image from this DataProvider.
|
java.util.List<java.lang.String> |
getAxes()
Retrieve the axis currently in use by this DataProvider.
|
int |
getAxisLength(java.lang.String axis)
Deprecated.
Use
getNextIndex(String) instead. |
Image |
getImage(Coords coords)
Returns the image at the given position.
|
java.util.List<Image> |
getImagesIgnoringAxes(Coords coords,
java.lang.String... ignoreTheseAxes)
Returns a list of image in the DataProvider's collection that have
identical coords after removing the given axes from both source and target.
|
java.util.List<Image> |
getImagesMatching(Coords coords)
Deprecated.
- instead use getImagesIgnoringAxes
|
Coords |
getMaxIndices()
Deprecated.
Use
getNextIndex(String axis) instead |
java.lang.String |
getName()
A dataProvider has a name (not guaranteed to be unique).
|
int |
getNextIndex(java.lang.String axis)
Returns the highest index along the given axis plus 1.
|
int |
getNumImages()
Provides total number of images that can be accessed through this DataProvider.
|
SummaryMetadata |
getSummaryMetadata()
Returns Summary Metadata.
|
java.lang.Iterable<Coords> |
getUnorderedImageCoords() |
boolean |
hasImage(Coords coords) |
boolean |
isFrozen()
A dataProvider is frozen when no more images can be added.
|
void |
registerForEvents(java.lang.Object obj) |
void |
unregisterForEvents(java.lang.Object obj) |
void close() throws java.io.IOException
close
in interface java.lang.AutoCloseable
close
in interface java.io.Closeable
java.io.IOException
Image getAnyImage() throws java.io.IOException
java.io.IOException
- when error occurs loading the data from storagejava.util.List<java.lang.String> getAxes()
@Deprecated int getAxisLength(java.lang.String axis)
getNextIndex(String)
instead.If the axis is present in the data set, but no Coords with that axes are found (Coords for an axis can not be zero), it will return 1.
Missing images for any given axis are ignored, e.g. if the DataProvider has images 0, 1, 3, 4 for a given axis, it will return 5. Do not expect all images along a given axis to be present in the DataProvider.
axis
- Axis for which the next index is requested.int getNextIndex(java.lang.String axis)
If the axis is present in the data set, but no Coords with that axes are found (Coords for an axis can not be zero), it will return 1.
Missing images for any given axis are ignored, e.g. if the DataProvider has images 0, 1, 3, 4 for a given axis, it will return 5. Do not expect all images along a given axis to be present in the DataProvider.
axis
- Axis for which the next index is requested.Image getImage(Coords coords) throws java.io.IOException
coords
- Coords specifying the multi-dimensional index to the imagejava.io.IOException
- when error occurs loading the data from storage@Deprecated java.util.List<Image> getImagesMatching(Coords coords) throws java.io.IOException
coords
- specification of multi-dimensional index that needs to be
present in the Coords of the images that will be returnedjava.io.IOException
- when error occurs loading the data from storagejava.util.List<Image> getImagesIgnoringAxes(Coords coords, java.lang.String... ignoreTheseAxes) throws java.io.IOException
coords
- Coords to look for in the provider's collectionignoreTheseAxes
- Axes that will be removed from copy of Coords in the
collection before checking for identityjava.io.IOException
- when error occurs loading the data from storageboolean isFrozen()
@Deprecated Coords getMaxIndices()
getNextIndex(String axis)
insteadint getNumImages()
SummaryMetadata getSummaryMetadata()
java.lang.Iterable<Coords> getUnorderedImageCoords()
boolean hasImage(Coords coords)
java.lang.String getName()
void registerForEvents(java.lang.Object obj)
void unregisterForEvents(java.lang.Object obj)