public interface Pipeline
Modifier and Type | Method and Description |
---|---|
void |
clearExceptions()
Clear the list of exceptions that the pipeline has encountered, allowing
insertImage() to be called again.
|
Datastore |
getDatastore()
Get the output Datastore for this Pipeline.
|
java.util.List<java.lang.Exception> |
getExceptions()
Return a list containing any exceptions that have occurred during
processing of images.
|
default boolean |
getIsSynchronous()
Deprecated.
Use
isSynchronous() instead. |
java.util.List<Processor> |
getProcessors()
Return the list of Processors used by this Pipeline.
|
void |
halt()
Halt image processing, so that the Pipeline will not produce any more
images.
|
void |
insertImage(Image image)
Insert an Image into the Pipeline.
|
void |
insertSummaryMetadata(SummaryMetadata source)
Pass a SummaryMetadata through the Pipeline to be modified by the
Processors in it.
|
boolean |
isHalted()
Returns true if the pipeline has been halted (that is, its halt() method
has been executed to completion), false otherwise.
|
boolean |
isSynchronous()
Return whether the Pipeline is operating in synchronous or asynchronous
modes.
|
void insertSummaryMetadata(SummaryMetadata source) throws java.io.IOException, PipelineErrorException
source
- Source SummaryMetadata to be input into the Pipeline.DatastoreFrozenException
- if the Datastore
is frozen at the time this method is called.DatastoreRewriteException
- if the Datastore has already had
SummaryMetadata set for it at the time this method is called.PipelineErrorException
- if processing of images has already
started at the time this method is called.java.io.IOException
void insertImage(Image image) throws java.io.IOException, PipelineErrorException
If the Pipeline is in synchronous mode, then this call will block until any generated images are in the Datastore. If it is in asynchronous mode, then the call will return as soon as the first processor in the pipeline is ready to start processing (i.e. as soon as it is not busy processing a different image).
If the Pipeline has been halted, then the image will be silently discarded, and no processing of it will occur.
If any of the Processors in the Pipeline throws an exception during processing, then the Pipeline will be put into an error state, and attempts to call insertImage() will throw a PipelineErrorException. You can retrieve the exception(s) that occurred by calling getExceptions(). If you wish to continue inserting images into the Pipeline (despite the fact that it may be in an inconsistent state, resulting in incorrect processed images), then you must call clearExceptions() first.
image
- Image to be processed by the Pipeline.DatastoreFrozenException
- if the Datastore
is frozen at the time this method is called, or if this pipeline
has no Processors in it and the Datastore is frozen. If the
Datastore is frozen at some point after this method is called,
then the exception will not be thrown.DatastoreRewriteException
- if this pipeline has no Processors in it and
the inserted Image has coordinates that match an Image that is
already in the Datastore.PipelineErrorException
- if the pipeline is
in an error state; see the getExceptions() and clearExceptions()
methods.java.io.IOException
Datastore getDatastore()
boolean isSynchronous()
@Deprecated default boolean getIsSynchronous()
isSynchronous()
instead.void halt()
boolean isHalted()
java.util.List<java.lang.Exception> getExceptions()
void clearExceptions()
java.util.List<Processor> getProcessors()