public interface Datastore extends DataProvider
Modifier and Type | Interface and Description |
---|---|
static class |
Datastore.SaveMode
The file format to save to.
|
Modifier and Type | Method and Description |
---|---|
void |
freeze()
Freeze this Datastore so it cannot be further modified.
|
Annotation |
getAnnotation(java.lang.String tag)
Get an annotation, creating it if it doesn't exist
|
java.lang.String |
getSavePath()
Get the intended or actual path where the data will be stored.
|
boolean |
hasAnnotation(java.lang.String tag)
Return whether an annotation with the given tag exists.
|
void |
putImage(Image image)
Insert an image into the Datastore.
|
boolean |
save(java.awt.Component parent)
Deprecated.
Use
save(Component, boolean) instead |
java.lang.String |
save(java.awt.Component parent,
boolean blocking)
Saves the datastore to an interactively determined path.
|
void |
save(Datastore.SaveMode mode,
java.lang.String path)
Saves the datastore to the given path using the given format (SaveMode)
Will save synchronously (i.e.
|
void |
save(Datastore.SaveMode mode,
java.lang.String path,
boolean blocking)
Saves the datastore to the given path using the given format (SaveMode)
|
void |
setName(java.lang.String name)
Sets the name of the Datastore.
|
void |
setSavePath(java.lang.String path)
Set the intended path where the data will be stored.
|
void |
setStorage(Storage storage)
Sets the data storage implementation for this Datastore.
|
void |
setSummaryMetadata(SummaryMetadata metadata)
Set the SummaryMetadata.
|
close, getAnyImage, getAxes, getAxisLength, getImage, getImagesIgnoringAxes, getImagesMatching, getMaxIndices, getName, getNextIndex, getNumImages, getSummaryMetadata, getUnorderedImageCoords, hasImage, isFrozen, registerForEvents, unregisterForEvents
void setStorage(Storage storage)
storage
- data storage to be used henceforthvoid putImage(Image image) throws java.io.IOException
image
- Micro-Manager Image objectjava.io.IOException
- if an IO error occursDatastoreFrozenException
- if the freeze() method has been called.DatastoreRewriteException
- if an Image with the same coordinates
already exists in the Datastore.java.lang.IllegalArgumentException
- if the image's axes do not match the
axes of images previously added to the Datastore. All images
in a Datastore are required to have the same set of axes in
their Coords objects.void setSummaryMetadata(SummaryMetadata metadata) throws java.io.IOException
metadata
- Object representing the summary metadatajava.io.IOException
- if an IO error occursDatastoreFrozenException
- if the freeze() method has been called.DatastoreRewriteException
- if the Datastore already has
SummaryMetadata or already has images.boolean hasAnnotation(java.lang.String tag) throws java.io.IOException
tag
- the tag for the annotationjava.io.IOException
- if an IO error occursAnnotation getAnnotation(java.lang.String tag) throws java.io.IOException
tag
- tag for the annotationjava.io.IOException
- if an IO error occursvoid freeze() throws java.io.IOException
java.io.IOException
- if an IO error occursvoid setSavePath(java.lang.String path)
In the current Micro-Manager file format, this path is used as the enclosing directory.
path
- the file path (without extension)java.lang.UnsupportedOperationException
- if this is an on-disk datastorejava.lang.String getSavePath()
If this is an in-memory datastore, returns whatever was set by setSavePath(java.lang.String)
. If this is an on-disk datastore, returns the actual path.
@Deprecated boolean save(java.awt.Component parent) throws java.io.IOException
save(Component, boolean)
insteadparent
- Window on top of which to display the dialog prompt;
may be null.java.io.IOException
- if an IO error occursjava.lang.String save(java.awt.Component parent, boolean blocking) throws java.io.IOException
parent
- Window on top of which to display a dialog prompting
the user for a location to save. After displayingblocking
- if true will return after saving, otherwise will return quickly
and continue saving on another threadjava.io.IOException
- if an IO error occursvoid save(Datastore.SaveMode mode, java.lang.String path) throws java.io.IOException
mode
- File format to save topath
- File path used to save the datajava.io.IOException
- if an IO error occursvoid save(Datastore.SaveMode mode, java.lang.String path, boolean blocking) throws java.io.IOException
mode
- File format to save topath
- File path used to save the datablocking
- when true, will block while saving data, otherwise will return
immediatelyjava.io.IOException
- if an IO error occursvoid setName(java.lang.String name)
name
- new name of the Datastore