Package loci.formats
Class FormatHandler
java.lang.Object
loci.formats.FormatHandler
- All Implemented Interfaces:
Closeable,AutoCloseable,IFormatHandler,IMetadataConfigurable
- Direct Known Subclasses:
FormatReader,FormatWriter
Abstract superclass of all biological file format readers and writers.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String[]Suffixes for supported compression types.protected StringName of current file.protected StringName of this file format.protected static final org.slf4j.Loggerprotected MetadataOptionsMetadata parsing options.protected String[]Valid suffixes for this file format. -
Constructor Summary
ConstructorsConstructorDescriptionFormatHandler(String format, String suffix) Constructs a format handler with the given name and default suffix.FormatHandler(String format, String[] suffixes) Constructs a format handler with the given name and default suffixes. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckSuffix(String name, String suffix) Performs suffix matching for the given filename.static booleancheckSuffix(String name, String[] suffixList) Performs suffix matching for the given filename.Gets the name of this file format.Class<?> Returns the native data type of image planes for this reader, as returned byIFormatReader.openPlane(int, int, int, int, int)orIFormatWriter.savePlane(int, java.lang.Object).String[]Gets the default file suffixes for this file format.booleanisThisType(String name) Checks if a file matches the type of this format handler.voidsetMetadataOptions(MetadataOptions options) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface loci.formats.IFormatHandler
setId
-
Field Details
-
LOGGER
protected static final org.slf4j.Logger LOGGER -
COMPRESSION_SUFFIXES
Suffixes for supported compression types. -
format
Name of this file format. -
suffixes
Valid suffixes for this file format. -
currentId
Name of current file. -
metadataOptions
Metadata parsing options.
-
-
Constructor Details
-
FormatHandler
Constructs a format handler with the given name and default suffix. -
FormatHandler
Constructs a format handler with the given name and default suffixes.
-
-
Method Details
-
getSupportedMetadataLevels
- Specified by:
getSupportedMetadataLevelsin interfaceIMetadataConfigurable
-
getMetadataOptions
- Specified by:
getMetadataOptionsin interfaceIMetadataConfigurable
-
setMetadataOptions
- Specified by:
setMetadataOptionsin interfaceIMetadataConfigurable
-
isThisType
Checks if a file matches the type of this format handler. The default implementation checks filename suffixes against those known for this format.- Specified by:
isThisTypein interfaceIFormatHandler
-
getFormat
Description copied from interface:IFormatHandlerGets the name of this file format.- Specified by:
getFormatin interfaceIFormatHandler
-
getSuffixes
Description copied from interface:IFormatHandlerGets the default file suffixes for this file format.- Specified by:
getSuffixesin interfaceIFormatHandler
-
getNativeDataType
Description copied from interface:IFormatHandlerReturns the native data type of image planes for this reader, as returned byIFormatReader.openPlane(int, int, int, int, int)orIFormatWriter.savePlane(int, java.lang.Object). For most readers this type will be a byte array; however, some readers call external APIs that work with other types such asBufferedImage.- Specified by:
getNativeDataTypein interfaceIFormatHandler
-
checkSuffix
Performs suffix matching for the given filename. -
checkSuffix
Performs suffix matching for the given filename.
-