| Modifier and Type | Field and Description |
|---|---|
private List<IqmDataBox> |
boxes |
private File |
destination |
private String |
encoding |
private String |
extension |
private RenderedImage |
image |
private static org.apache.log4j.Logger |
logger |
private int |
mode |
static int |
MODE_SEQUENCE |
static int |
MODE_SINGLE |
static int |
MODE_STACK |
private boolean |
withROIs |
| Constructor and Description |
|---|
ImageFileWriter(File destination,
IqmDataBox box,
String encoding)
Create a new image file writer.
|
ImageFileWriter(File destination,
List<?> itemList,
String encoding,
String extension,
int mode)
Create a new image file writer.
|
ImageFileWriter(File destination,
RenderedImage image,
String encoding)
Create a new image file writer.
|
ImageFileWriter(int mode)
Create an empty file writer.
|
| Modifier and Type | Method and Description |
|---|---|
File |
getDestination()
Get the destination of the image file.
|
String |
getEncoding()
Get the encoding of the image(s) to be saved.
|
String |
getExtension()
Get the file name extension.
|
boolean |
isWithROIs()
Gets a flag whether or not ROIs should be drawn on export.
|
void |
run()
Run the file writer in a separate thread.
|
void |
setDestination(File destination)
Set the destination of the image file(s).
|
void |
setEncoding(String encoding)
Set the encoding for the image(s) to be saved.
|
void |
setExtension(String extension)
Set the extension of the file.
|
void |
setWithROIs(boolean withROIs)
Set a flag whether or not ROIs should be drawn on export.
|
void |
write()
Perform the file writing action.
|
void |
writeSequence()
Saves an image sequence to multiple files.
|
void |
writeStack()
Write a list of images to a stack.
|
private static final org.apache.log4j.Logger logger
public static final int MODE_SINGLE
public static final int MODE_SEQUENCE
public static final int MODE_STACK
private File destination
private RenderedImage image
private List<IqmDataBox> boxes
private String encoding
private String extension
private boolean withROIs
private int mode
public ImageFileWriter(int mode)
public ImageFileWriter(File destination, RenderedImage image, String encoding)
destination - the target fileimage - the imageencoding - a JAI-specific stringpublic ImageFileWriter(File destination, IqmDataBox box, String encoding)
destination - the target filebox - the IqmDataBox containing the imageencoding - a JAI-specific stringpublic ImageFileWriter(File destination, List<?> itemList, String encoding, String extension, int mode)
destination - the target fileitemList - the list of items (IqmDataBox containing the images,
or rendered images)encoding - a JAI-specific stringextension - the file extensionmode - determine the writing mode, either MODE_SEQUENCE or
MODE_STACKpublic void setDestination(File destination)
destination - the target file namepublic File getDestination()
public void setEncoding(String encoding)
encoding - a JAI specific stringpublic String getEncoding()
public String getExtension()
public void setExtension(String extension)
extension - public void run()
public void write()
throws IOException
IOException - if the file could not be written.public void writeSequence()
public void writeStack()
public boolean isWithROIs()
public void setWithROIs(boolean withROIs)
withROIs - true or falseCopyright © 2009–2017 Helmut Ahammer, Philipp Kainz. All rights reserved.