Package org.anchoranalysis.core.format
Enum Class ImageFileFormat
- All Implemented Interfaces:
Serializable
,Comparable<ImageFileFormat>
,Constable
,FileFormat
A type of image format that are read/written to the filesystem, together with the extensions it
may use.
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.
- Author:
- Owen Feehan
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionAll extensions associated with a file-format.An identifier that describes the format, that is meaningful to the end-user.The default extension to write associated with a particular format.boolean
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
Returns the enum constant of this class with the specified name.static ImageFileFormat[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TIFF
TIFF -
PNG
PNG -
JPEG
JPEG -
GIF
GIF -
BMP
Windows Bitmap - note that this comes in many variants. -
OME_TIFF
OME TIFF -
OME_XML
OME XML
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
allExtensions
All extensions associated with a file-format.- Returns:
- a stream of all extensions associated with a particular file format.
-
matches
Description copied from interface:FileFormat
Does a file-path (or file-name) end with an extension expected by this format?The case of the extension is irrelevant i.e. a case insensitive match occurs.
A leading period is also expected before the extension.
- Specified by:
matches
in interfaceFileFormat
- Parameters:
filePath
- the path- Returns:
- true if the path ends with any of the expected extensions for this format.
-
descriptiveIdentifier
Description copied from interface:FileFormat
An identifier that describes the format, that is meaningful to the end-user.- Specified by:
descriptiveIdentifier
in interfaceFileFormat
- Returns:
- a short string that identifies the format (usually the default extension without any leading period).
-
getDefaultExtension
Description copied from interface:FileFormat
The default extension to write associated with a particular format.- Specified by:
getDefaultExtension
in interfaceFileFormat
- Returns:
- the extension
-
matchesIdentifier
Description copied from interface:FileFormat
Does an identifier equal the extension expected by this format?- Specified by:
matchesIdentifier
in interfaceFileFormat
- Parameters:
identifier
- an identifier that should be equal (ignoring case, and with or without a leading period) to any extension associated with the format- Returns:
- true if
identifier
is equal to an extension associated with this format
-