public class Saver extends java.lang.Object
filename-tttt-zzzz
Constructor and Description |
---|
Saver() |
Modifier and Type | Method and Description |
---|---|
static loci.formats.ome.OMEXMLMetadata |
generateMetaData(int sizeX,
int sizeY,
int sizeC,
DataType dataType)
Deprecated.
|
static loci.formats.ome.OMEXMLMetadata |
generateMetaData(int sizeX,
int sizeY,
int sizeC,
int dataType,
boolean signedDataType)
Deprecated.
|
static loci.formats.ome.OMEXMLMetadata |
generateMetaData(int sizeX,
int sizeY,
int sizeC,
int sizeZ,
int sizeT,
DataType dataType)
Deprecated.
|
static loci.formats.ome.OMEXMLMetadata |
generateMetaData(int sizeX,
int sizeY,
int sizeC,
int sizeZ,
int sizeT,
int dataType,
boolean signedDataType)
Deprecated.
|
static IcyColorModel |
getCompatibleColorModel(loci.formats.IFormatWriter writer,
IcyColorModel colorModel)
Return the closest compatible
IcyColorModel supported by writer
from the specified IcyColorModel . |
static IcyColorModel |
getCompatibleColorModel(loci.formats.IFormatWriter writer,
int numChannel,
DataType dataType)
Return the closest compatible
IcyColorModel supported by writer
from the specified image description. |
static IcyColorModel |
getCompatibleColorModel(ImageFileFormat imageFileFormat,
IcyColorModel colorModel)
Return the closest compatible
IcyColorModel supported by the specified image file format
from the specified IcyColorModel . |
static IcyColorModel |
getCompatibleColorModel(ImageFileFormat imageFileFormat,
int numChannel,
DataType dataType)
Return the closest compatible
IcyColorModel supported by the specified ImageFileFormat
from the specified image description. |
static Sequence |
getCompatibleSequenceForWriter(loci.formats.IFormatWriter writer,
Sequence sequence,
int posT,
int posZ)
Returns a compatible Sequence representing the input sequence so it can be saved with the specified writer.
|
static FileFormat |
getFileFormat(loci.formats.IFormatWriter writer,
FileFormat defaultValue)
Deprecated.
Use
getImageFileFormat(IFormatWriter, ImageFileFormat) instead. |
static ImageFileFormat |
getImageFileFormat(loci.formats.IFormatWriter writer,
ImageFileFormat defaultValue)
Returns the
ImageFileFormat corresponding to specified IFormatWriter . |
static loci.formats.IFormatWriter |
getWriter(java.io.File file)
Deprecated.
Use
getWriter(File, FileFormat) instead. |
static loci.formats.IFormatWriter |
getWriter(java.io.File file,
FileFormat defaultFormat)
Deprecated.
Use
getWriter(File, ImageFileFormat) instead. |
static loci.formats.IFormatWriter |
getWriter(FileFormat fileFormat)
Deprecated.
Use
getWriter(ImageFileFormat) instead. |
static loci.formats.IFormatWriter |
getWriter(java.io.File file,
ImageFileFormat defaultFormat)
Return the writer to use for the specified file.
|
static loci.formats.IFormatWriter |
getWriter(ImageFileFormat format)
Return the writer to use for the specified ImageFileFormat.
|
static loci.formats.IFormatWriter |
getWriter(java.lang.String ext)
Deprecated.
Use
getWriter(String, FileFormat) instead. |
static loci.formats.IFormatWriter |
getWriter(java.lang.String ext,
FileFormat defaultFormat)
Deprecated.
Use
getWriter(String, ImageFileFormat) instead. |
static loci.formats.IFormatWriter |
getWriter(java.lang.String ext,
ImageFileFormat defaultFormat)
Return the writer to use for the specified filename extension.
|
static boolean |
isCompatible(loci.formats.IFormatWriter writer,
IcyColorModel colorModel)
Return true if the specified writer is compatible with the given
IcyColorModel . |
static boolean |
isCompatible(loci.formats.IFormatWriter writer,
int numChannel,
boolean alpha,
DataType dataType)
Return true if the specified writer is compatible with the image description.
|
static boolean |
isCompatible(loci.formats.IFormatWriter writer,
Sequence sequence)
Return true if the specified writer is compatible to save the given Sequence.
|
static boolean |
isCompatible(ImageFileFormat imageFileFormat,
IcyColorModel colorModel)
Return true if the specified image file format is compatible with the given
IcyColorModel . |
static boolean |
isCompatible(ImageFileFormat imageFileFormat,
int numChannel,
boolean alpha,
DataType dataType)
Return true if the specified image file format is compatible with the image description.
|
static boolean |
isCompatible(ImageFileFormat imageFileFormat,
Sequence sequence)
Return true if the specified image file format is compatible to save the given Sequence.
|
static void |
save(loci.formats.IFormatWriter formatWriter,
Sequence sequence,
java.io.File file,
int fps,
boolean multipleFile,
boolean showProgress,
boolean addToRecent)
Save the specified sequence in the specified file.
|
static void |
save(loci.formats.IFormatWriter formatWriter,
Sequence sequence,
java.io.File file,
int zMin,
int zMax,
int tMin,
int tMax,
int fps,
boolean multipleFile,
boolean showProgress)
Deprecated.
|
static void |
save(loci.formats.IFormatWriter formatWriter,
Sequence sequence,
java.io.File file,
int zMin,
int zMax,
int tMin,
int tMax,
int fps,
boolean multipleFile,
boolean showProgress,
boolean addToRecent)
Deprecated.
|
static void |
save(Sequence sequence,
java.io.File file)
Save the specified sequence in the specified file.
|
static void |
save(Sequence sequence,
java.io.File file,
boolean multipleFiles)
Deprecated.
Use
save(Sequence, File, boolean, boolean) instead. |
static void |
save(Sequence sequence,
java.io.File file,
boolean multipleFiles,
boolean showProgress)
Save the specified sequence in the specified file.
|
static void |
save(Sequence sequence,
java.io.File file,
int fps,
boolean multipleFile,
boolean showProgress)
Save the specified sequence in the specified file.
|
static void |
save(Sequence sequence,
java.io.File file,
int zMin,
int zMax,
int tMin,
int tMax,
int fps,
boolean multipleFiles)
Deprecated.
Use
save(Sequence, File, int, boolean, boolean) instead. |
static void |
save(Sequence sequence,
java.io.File file,
int zMin,
int zMax,
int tMin,
int tMax,
int fps,
boolean multipleFile,
boolean showProgress)
Deprecated.
Use
save(Sequence, File, int, boolean, boolean) instead. |
static void |
saveImage(byte[] data,
int width,
int height,
int numChannel,
DataType dataType,
java.io.File file,
boolean force)
Save a single image from bytes buffer to the specified file.
|
static void |
saveImage(byte[] data,
int width,
int height,
int numChannel,
int dataType,
boolean signedDataType,
java.io.File file,
boolean force)
Deprecated.
|
static void |
saveImage(IcyBufferedImage image,
java.io.File file,
boolean force)
Save a single image to the specified file
|
public Saver()
@Deprecated public static loci.formats.ome.OMEXMLMetadata generateMetaData(int sizeX, int sizeY, int sizeC, int sizeZ, int sizeT, DataType dataType) throws loci.common.services.ServiceException
OMEUtil.generateMetaData(int, int, int, int, int, DataType, boolean)
insteadloci.common.services.ServiceException
@Deprecated public static loci.formats.ome.OMEXMLMetadata generateMetaData(int sizeX, int sizeY, int sizeC, int sizeZ, int sizeT, int dataType, boolean signedDataType) throws loci.common.services.ServiceException
OMEUtil.generateMetaData(int, int, int, int, int, DataType, boolean)
insteadloci.common.services.ServiceException
@Deprecated public static loci.formats.ome.OMEXMLMetadata generateMetaData(int sizeX, int sizeY, int sizeC, DataType dataType) throws loci.common.services.ServiceException
OMEUtil.generateMetaData(int, int, int, DataType, boolean)
insteadloci.common.services.ServiceException
@Deprecated public static loci.formats.ome.OMEXMLMetadata generateMetaData(int sizeX, int sizeY, int sizeC, int dataType, boolean signedDataType) throws loci.common.services.ServiceException
OMEUtil.generateMetaData(int, int, int, DataType, boolean)
insteadloci.common.services.ServiceException
public static ImageFileFormat getImageFileFormat(loci.formats.IFormatWriter writer, ImageFileFormat defaultValue)
ImageFileFormat
corresponding to specified IFormatWriter
.defaultValue
is returned if no matching format is found.@Deprecated public static FileFormat getFileFormat(loci.formats.IFormatWriter writer, FileFormat defaultValue)
getImageFileFormat(IFormatWriter, ImageFileFormat)
instead.public static loci.formats.IFormatWriter getWriter(ImageFileFormat format)
OMETiffWriter
: TIFF image file (default)APNGWriter
: PNG image fileJPEGWriter
: JPG image fileAVIWriter
: AVI video fileformat
- ImageFileFormat
we want to retrieve the saver.ImageFileFormat.TIFF
ImageFileFormat.PNG
ImageFileFormat.JPG
ImageFileFormat.AVI
@Deprecated public static loci.formats.IFormatWriter getWriter(FileFormat fileFormat)
getWriter(ImageFileFormat)
instead.public static loci.formats.IFormatWriter getWriter(java.lang.String ext, ImageFileFormat defaultFormat)
OMETiffWriter
: TIFF image file (default)APNGWriter
: PNG image fileJPEGWriter
: JPG image fileAVIWriter
: AVI video fileext
- Extension we want to retrieve the corresponding image writer.defaultFormat
- default ImageFileFormat
to use if ext
is not recognized.ImageFileFormat.TIFF
ImageFileFormat.PNG
ImageFileFormat.JPG
ImageFileFormat.AVI
@Deprecated public static loci.formats.IFormatWriter getWriter(java.lang.String ext, FileFormat defaultFormat)
getWriter(String, ImageFileFormat)
instead.@Deprecated public static loci.formats.IFormatWriter getWriter(java.lang.String ext)
getWriter(String, FileFormat)
instead.public static loci.formats.IFormatWriter getWriter(java.io.File file, ImageFileFormat defaultFormat)
OMETiffWriter
: TIFF image file (default)APNGWriter
: PNG image fileJPEGWriter
: JPG image fileAVIWriter
: AVI video filefile
- File we want to retrieve the corresponding image writer.defaultFormat
- default ImageFileFormat
to use if file
is not recognized.ImageFileFormat.TIFF
ImageFileFormat.PNG
ImageFileFormat.JPG
ImageFileFormat.AVI
@Deprecated public static loci.formats.IFormatWriter getWriter(java.io.File file, FileFormat defaultFormat)
getWriter(File, ImageFileFormat)
instead.@Deprecated public static loci.formats.IFormatWriter getWriter(java.io.File file)
getWriter(File, FileFormat)
instead.public static IcyColorModel getCompatibleColorModel(ImageFileFormat imageFileFormat, int numChannel, DataType dataType)
IcyColorModel
supported by the specified ImageFileFormat
from the specified image description.IcyColorModel
without any
loss
or conversion.imageFileFormat
- Image file format we want to test compatibilitynumChannel
- number of channel of the imagedataType
- image data typepublic static IcyColorModel getCompatibleColorModel(ImageFileFormat imageFileFormat, IcyColorModel colorModel)
IcyColorModel
supported by the specified image file format
from the specified IcyColorModel
.IcyColorModel
without
any loss or conversion.imageFileFormat
- Image file format we want to test compatibilitycolorModel
- the colorModel describing data / image formatpublic static boolean isCompatible(ImageFileFormat imageFileFormat, int numChannel, boolean alpha, DataType dataType)
imageFileFormat
- Image file format we want to test compatibilitynumChannel
- number of channel of the imagealpha
- true if the image has an alpha channeldataType
- image data typepublic static boolean isCompatible(ImageFileFormat imageFileFormat, IcyColorModel colorModel)
IcyColorModel
. IcyColorModel
without
any loss or conversion.public static boolean isCompatible(ImageFileFormat imageFileFormat, Sequence sequence)
public static IcyColorModel getCompatibleColorModel(loci.formats.IFormatWriter writer, int numChannel, DataType dataType)
IcyColorModel
supported by writer
from the specified image description.IcyColorModel
without any loss
or conversion.writer
- IFormatWriter we want to test compatibilitynumChannel
- number of channel of the imagedataType
- image data typepublic static IcyColorModel getCompatibleColorModel(loci.formats.IFormatWriter writer, IcyColorModel colorModel)
IcyColorModel
supported by writer
from the specified IcyColorModel
.IcyColorModel
without any loss
or conversion.writer
- IFormatWriter we want to test compatibilitycolorModel
- the colorModel describing data / image formatpublic static boolean isCompatible(loci.formats.IFormatWriter writer, int numChannel, boolean alpha, DataType dataType)
numChannel
- number of channel of the imagealpha
- true if the image has an alpha channeldataType
- image data typepublic static boolean isCompatible(loci.formats.IFormatWriter writer, IcyColorModel colorModel)
IcyColorModel
. public static boolean isCompatible(loci.formats.IFormatWriter writer, Sequence sequence)
public static void save(Sequence sequence, java.io.File file)
sequence
- sequence to savefile
- file where we want to save sequence@Deprecated public static void save(Sequence sequence, java.io.File file, boolean multipleFiles)
save(Sequence, File, boolean, boolean)
instead.public static void save(Sequence sequence, java.io.File file, boolean multipleFiles, boolean showProgress)
sequence
- sequence to savefile
- file where we want to save sequencemultipleFiles
- flag to indicate if images are saved in separate fileshowProgress
- show progress bar@Deprecated public static void save(Sequence sequence, java.io.File file, int zMin, int zMax, int tMin, int tMax, int fps, boolean multipleFiles)
save(Sequence, File, int, boolean, boolean)
instead.@Deprecated public static void save(Sequence sequence, java.io.File file, int zMin, int zMax, int tMin, int tMax, int fps, boolean multipleFile, boolean showProgress)
save(Sequence, File, int, boolean, boolean)
instead.public static void save(Sequence sequence, java.io.File file, int fps, boolean multipleFile, boolean showProgress)
sequence
- sequence to savefile
- file where we want to save sequencefps
- frame rate for AVI sequence savemultipleFile
- flag to indicate if images are saved in separate fileshowProgress
- show progress bar@Deprecated public static void save(loci.formats.IFormatWriter formatWriter, Sequence sequence, java.io.File file, int zMin, int zMax, int tMin, int tMax, int fps, boolean multipleFile, boolean showProgress)
save(IFormatWriter, Sequence, File, int, boolean, boolean, boolean)
instead.@Deprecated public static void save(loci.formats.IFormatWriter formatWriter, Sequence sequence, java.io.File file, int zMin, int zMax, int tMin, int tMax, int fps, boolean multipleFile, boolean showProgress, boolean addToRecent)
save(IFormatWriter, Sequence, File, int, boolean, boolean, boolean)
instead.public static void save(loci.formats.IFormatWriter formatWriter, Sequence sequence, java.io.File file, int fps, boolean multipleFile, boolean showProgress, boolean addToRecent)
zMin
- zMax
and tMin
- tMax
define the Z
and T images range to save.formatWriter
- writer used to save sequence (define the image format).null
then writer is determined from the file extension.getWriter(ImageFileFormat)
)sequence
- sequence to savefile
- file where we want to save sequence.formatWriter
the file extension may be modified.fps
- frame rate for AVI sequence savemultipleFile
- flag to indicate if images are saved in separate file.file
parameter is considerer as a folder if it doens't have
any extensionshowProgress
- show progress baraddToRecent
- add the saved sequence to recent opened sequence listpublic static void saveImage(byte[] data, int width, int height, int numChannel, DataType dataType, java.io.File file, boolean force) throws loci.formats.FormatException, java.io.IOException
loci.formats.FormatException
java.io.IOException
@Deprecated public static void saveImage(byte[] data, int width, int height, int numChannel, int dataType, boolean signedDataType, java.io.File file, boolean force) throws loci.formats.FormatException, java.io.IOException
saveImage(byte[], int, int, int, DataType, File, boolean)
insteadloci.formats.FormatException
java.io.IOException
public static void saveImage(IcyBufferedImage image, java.io.File file, boolean force) throws loci.formats.FormatException, java.io.IOException
image
- java.io.IOException
loci.formats.FormatException
public static Sequence getCompatibleSequenceForWriter(loci.formats.IFormatWriter writer, Sequence sequence, int posT, int posZ)
writer
- writer used to save sequence (define the image format, cannot be null
)sequence
- sequence to saveposT
- frame index to keep (-1 for all frame)posZ
- slice index to keep (-1 for all slice)