public interface ImageExporter
Modifier and Type | Interface and Description |
---|---|
static class |
ImageExporter.OutputFormat
Allowed export formats.
|
Modifier and Type | Method and Description |
---|---|
void |
export()
Run the export process.
|
ImageExporter |
loop(java.lang.String axis,
int start,
int stop)
Add a new "inner loop" to the export parameters.
|
void |
resetLoops()
Reset the current export loop parameters to empty.
|
void |
setDisplay(DisplayWindow display)
Set the display to use for image exporting.
|
void |
setOutputFormat(ImageExporter.OutputFormat format)
Set the output format to use.
|
void |
setOutputQuality(int quality)
Set the image quality.
|
void |
setSaveInfo(java.lang.String path,
java.lang.String prefix)
Set the path to save images to, and the filename prefix to use when
saving images.
|
void |
waitForExport()
Block until a prior call to export() returns.
|
void setDisplay(DisplayWindow display)
display
- Display to use for exporting images.void setOutputFormat(ImageExporter.OutputFormat format)
format
- The format to output in.void setOutputQuality(int quality)
quality
- An integer quality ranging from 1 through 100. The default
value is 90.void setSaveInfo(java.lang.String path, java.lang.String prefix) throws java.io.IOException
path
- Directory in which images will be placedprefix
- String to place at beginning of each output image's name.java.lang.IllegalArgumentException
- if the directory does not exist.java.io.IOException
ImageExporter loop(java.lang.String axis, int start, int stop)
axis
- Axis name, like Coords.CHANNEL, Coords.Z, etc.start
- Axis index to start exporting from, inclusive.stop
- Axis index to stop exporting from, exclusive (i.e. one more
than the index of the last image you want to export).void resetLoops()
void export() throws java.io.IOException, java.lang.IllegalArgumentException
java.io.IOException
- if the export process would attempt to write to a
file that already existsjava.lang.IllegalArgumentException
- if no output format has been set, or
OUTPUT_PNG or OUTPUT_JPG formats are used but no save information
has been set, or if no loops have been configured, or if no
display has been set.void waitForExport() throws java.lang.InterruptedException
java.lang.InterruptedException
- if the thread was interrupted while waiting.