public enum ImageFileFormat extends Enum<ImageFileFormat> implements FileFormat
Note this is not a complete list of the types of images that Anchor can read or write, rather just those that are explicitly mentioned in the code-based, for operations relating to their extensions.
Enum Constant and Description |
---|
BMP
Windows Bitmap - note that this comes in many variants.
|
GIF
GIF
|
JPEG
JPEG
|
OME_TIFF
OME TIFF
|
OME_XML
OME XML
|
PNG
PNG
|
TIFF
TIFF
|
Modifier and Type | Method and Description |
---|---|
java.util.stream.Stream<String> |
allExtensions()
All extensions associated with a file-format.
|
String |
descriptiveIdentifier()
An identifier that describes the format, that is meaningful to the end-user.
|
String |
getDefaultExtension()
The default extension to write associated with a particular format.
|
boolean |
matches(String filePath)
Does a file-path (or file-name) end with an extension expected by this format?
|
boolean |
matchesIdentifier(String identifier)
Does an identifier equal the extension expected by this format?
|
static ImageFileFormat |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ImageFileFormat[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ImageFileFormat TIFF
public static final ImageFileFormat PNG
public static final ImageFileFormat JPEG
public static final ImageFileFormat GIF
public static final ImageFileFormat BMP
public static final ImageFileFormat OME_TIFF
public static final ImageFileFormat OME_XML
public static ImageFileFormat[] values()
for (ImageFileFormat c : ImageFileFormat.values()) System.out.println(c);
public static ImageFileFormat valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic java.util.stream.Stream<String> allExtensions()
public boolean matches(String filePath)
FileFormat
The case of the extension is irrelevant i.e. a case insensitive match occurs.
A leading period is also expected before the extension.
matches
in interface FileFormat
filePath
- the pathpublic String descriptiveIdentifier()
FileFormat
descriptiveIdentifier
in interface FileFormat
public String getDefaultExtension()
FileFormat
getDefaultExtension
in interface FileFormat
public boolean matchesIdentifier(String identifier)
FileFormat
matchesIdentifier
in interface FileFormat
identifier
- an identifier that should be equal (ignoring case, and with or without a
leading period) to any extension associated with the formatidentifier
is equal to an extension associated with this formatCopyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.