|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectloci.formats.FormatHandler
loci.formats.FormatWriter
public abstract class FormatWriter
Abstract superclass of all biological file format writers.
Field Summary | |
---|---|
protected ColorModel |
cm
Default color model. |
protected String |
compression
Current compression type. |
protected String[] |
compressionTypes
Available compression types. |
protected int |
fps
Frame rate to use when writing in frames per second, if applicable. |
protected boolean |
initialized
Whether the current file has been prepped for writing. |
protected MetadataRetrieve |
metadataRetrieve
Current metadata retrieval object. |
Fields inherited from class loci.formats.FormatHandler |
---|
currentId, debug, debugLevel, format, statusListeners, suffixes |
Constructor Summary | |
---|---|
FormatWriter(String format,
String suffix)
Constructs a format writer with the given name and default suffix. |
|
FormatWriter(String format,
String[] suffixes)
Constructs a format writer with the given name and default suffixes. |
Method Summary | |
---|---|
boolean |
canDoStacks()
Reports whether the writer can save multiple images to a single file. |
boolean |
canDoStacks(String id)
Deprecated. Replaced by canDoStacks() |
ColorModel |
getColorModel()
Gets the color model. |
String[] |
getCompressionTypes()
Gets the available compression types. |
int |
getFramesPerSecond()
Gets the frames per second to use when writing. |
MetadataRetrieve |
getMetadataRetrieve()
Retrieves the current metadata retrieval object for this writer. |
int[] |
getPixelTypes()
Gets the supported pixel types. |
int[] |
getPixelTypes(String id)
Deprecated. Replaced by getPixelTypes() |
boolean |
isSupportedType(int type)
Checks if the given pixel type is supported. |
boolean |
isSupportedType(String id,
int type)
Deprecated. Replaced by isSupportedType(int type) |
void |
save(String id,
Image image,
boolean last)
Deprecated. Replaced by IFormatWriter.saveImage(Image, boolean) |
void |
saveBytes(byte[] bytes,
boolean last)
Saves the given byte array to the current file. |
void |
saveBytes(byte[] bytes,
int series,
boolean lastInSeries,
boolean last)
Saves the given byte array to the given series in the current file. |
void |
saveImage(Image image,
int series,
boolean lastInSeries,
boolean last)
Saves the given image to the given series in the current file. |
void |
setColorModel(ColorModel model)
Sets the color model. |
void |
setCompression(String compress)
Sets the current compression type. |
void |
setFramesPerSecond(int rate)
Sets the frames per second to use when writing. |
void |
setId(String id,
boolean force)
Sets the current file name. |
void |
setMetadataRetrieve(MetadataRetrieve retrieve)
Sets the metadata retrieval object from which to retrieve standardized metadata. |
Methods inherited from class loci.formats.FormatHandler |
---|
addStatusListener, debug, getFormat, getStatusListeners, getSuffixes, isThisType, isThisType, removeStatusListener, setDebug, setDebugLevel, setId, status, status, status, trace, trace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface loci.formats.IFormatWriter |
---|
saveImage |
Methods inherited from interface loci.formats.IFormatHandler |
---|
close, getFormat, getSuffixes, isThisType, isThisType, setId |
Methods inherited from interface loci.formats.StatusReporter |
---|
addStatusListener, getStatusListeners, removeStatusListener |
Field Detail |
---|
protected int fps
protected ColorModel cm
protected String[] compressionTypes
protected String compression
protected boolean initialized
protected MetadataRetrieve metadataRetrieve
getMetadataRetrieve()
prevent "null" access.
Constructor Detail |
---|
public FormatWriter(String format, String suffix)
public FormatWriter(String format, String[] suffixes)
Method Detail |
---|
public void saveBytes(byte[] bytes, boolean last) throws FormatException, IOException
IFormatWriter
saveBytes
in interface IFormatWriter
FormatException
IOException
public void saveBytes(byte[] bytes, int series, boolean lastInSeries, boolean last) throws FormatException, IOException
IFormatWriter
saveBytes
in interface IFormatWriter
FormatException
IOException
public void saveImage(Image image, int series, boolean lastInSeries, boolean last) throws FormatException, IOException
IFormatWriter
saveImage
in interface IFormatWriter
FormatException
IOException
public boolean canDoStacks()
IFormatWriter
canDoStacks
in interface IFormatWriter
public void setMetadataRetrieve(MetadataRetrieve retrieve)
IFormatWriter
setMetadataRetrieve
in interface IFormatWriter
public MetadataRetrieve getMetadataRetrieve()
IFormatWriter
null
metadata retrieval object.
getMetadataRetrieve
in interface IFormatWriter
public void setColorModel(ColorModel model)
IFormatWriter
setColorModel
in interface IFormatWriter
public ColorModel getColorModel()
IFormatWriter
getColorModel
in interface IFormatWriter
public void setFramesPerSecond(int rate)
IFormatWriter
setFramesPerSecond
in interface IFormatWriter
public int getFramesPerSecond()
IFormatWriter
getFramesPerSecond
in interface IFormatWriter
public String[] getCompressionTypes()
IFormatWriter
getCompressionTypes
in interface IFormatWriter
public void setCompression(String compress) throws FormatException
IFormatWriter
setCompression
in interface IFormatWriter
FormatException
public int[] getPixelTypes()
IFormatWriter
getPixelTypes
in interface IFormatWriter
public boolean isSupportedType(int type)
IFormatWriter
isSupportedType
in interface IFormatWriter
public void setId(String id, boolean force) throws FormatException, IOException
IFormatHandler
setId
in interface IFormatHandler
force
- If set, the handler will be re-initialized no matter what.
FormatException
IOException
public boolean canDoStacks(String id) throws FormatException
canDoStacks()
canDoStacks
in interface IFormatWriter
FormatException
public int[] getPixelTypes(String id) throws FormatException, IOException
getPixelTypes()
getPixelTypes
in interface IFormatWriter
FormatException
IOException
public boolean isSupportedType(String id, int type) throws FormatException, IOException
isSupportedType(int type)
isSupportedType
in interface IFormatWriter
FormatException
IOException
public void save(String id, Image image, boolean last) throws FormatException, IOException
IFormatWriter.saveImage(Image, boolean)
save
in interface IFormatWriter
FormatException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |