public abstract class FormatHandler extends Object implements IFormatHandler
Modifier and Type | Field and Description |
---|---|
static String[] |
COMPRESSION_SUFFIXES
Suffixes for supported compression types.
|
protected String |
currentId
Name of current file.
|
protected String |
format
Name of this file format.
|
protected static org.slf4j.Logger |
LOGGER |
protected MetadataOptions |
metadataOptions
Metadata parsing options.
|
protected String[] |
suffixes
Valid suffixes for this file format.
|
Constructor and Description |
---|
FormatHandler(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.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
checkSuffix(String name,
String suffix)
Performs suffix matching for the given filename.
|
static boolean |
checkSuffix(String name,
String[] suffixList)
Performs suffix matching for the given filename.
|
String |
getFormat()
Gets the name of this file format.
|
MetadataOptions |
getMetadataOptions() |
Class<?> |
getNativeDataType()
Returns the native data type of image planes for this reader, as returned
by
IFormatReader.openPlane(int, int, int, int, int) or IFormatWriter.savePlane(int, java.lang.Object) . |
String[] |
getSuffixes()
Gets the default file suffixes for this file format.
|
Set<MetadataLevel> |
getSupportedMetadataLevels() |
boolean |
isThisType(String name)
Checks if a file matches the type of this format handler.
|
void |
setMetadataOptions(MetadataOptions options) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setId
protected static final org.slf4j.Logger LOGGER
public static final String[] COMPRESSION_SUFFIXES
protected String format
protected String[] suffixes
protected String currentId
protected MetadataOptions metadataOptions
public FormatHandler(String format, String suffix)
public Set<MetadataLevel> getSupportedMetadataLevels()
getSupportedMetadataLevels
in interface IMetadataConfigurable
public MetadataOptions getMetadataOptions()
getMetadataOptions
in interface IMetadataConfigurable
public void setMetadataOptions(MetadataOptions options)
setMetadataOptions
in interface IMetadataConfigurable
public boolean isThisType(String name)
isThisType
in interface IFormatHandler
public String getFormat()
IFormatHandler
getFormat
in interface IFormatHandler
public String[] getSuffixes()
IFormatHandler
getSuffixes
in interface IFormatHandler
public Class<?> getNativeDataType()
IFormatHandler
IFormatReader.openPlane(int, int, int, int, int)
or IFormatWriter.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 as
BufferedImage
.getNativeDataType
in interface IFormatHandler
public static boolean checkSuffix(String name, String suffix)
Copyright © 2017 Open Microscopy Environment