-
- All Superinterfaces:
Comparable<org.scijava.Prioritized>,org.scijava.Contextual,HasFormat,org.scijava.plugin.HasPluginInfo,org.scijava.Identifiable,org.scijava.Locatable,org.scijava.log.Logged,org.scijava.Prioritized,org.scijava.plugin.RichPlugin,SCIFIOPlugin,org.scijava.plugin.SciJavaPlugin,org.scijava.Versioned
- All Known Implementing Classes:
AbstractChecker,APNGFormat.Checker,AVIFormat.Checker,BMPFormat.Checker,DefaultChecker,DICOMFormat.Checker,GIFFormat.Checker,JPEG2000Format.Checker,JPEGFormat.Checker,KontronFormat.Checker,MicromanagerFormat.Checker,MinimalTIFFFormat.Checker,MNGFormat.Checker,NativeQTFormat.Checker,NRRDFormat.Checker,PCXFormat.Checker,PGMFormat.Checker,ScancoISQFormat.Checker,StratecPQCTFormat.Checker,TestImgFormat.Checker
public interface Checker extends HasFormat
Interface for all SCIFIO Checker components.Checkercomponents are used to determine if theFormatthey are associated with is compatibile with a given image. This is accomplished via theisFormat(org.scijava.io.location.Location)methods.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancheckHeader(byte[] block)Checks if the given bytes are a valid header for thisFormat.booleanisFormat(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> stream)Checks if the given stream is a valid stream for thisFormat.booleanisFormat(org.scijava.io.location.Location loc)Checks if the provided image source is compatible with thisFormat.booleanisFormat(org.scijava.io.location.Location loc, SCIFIOConfig config)Checks if the provided image source is compatible with thisFormat.booleansuffixNecessary()Whether the file extension matching one of the format's suffixes is necessary to identify the file as a source compatible with this format.booleansuffixSufficient()Whether the file extension matching one of the format's suffixes is sufficient to identify the file as a source compatible with this format.-
Methods inherited from interface org.scijava.Contextual
context, getContext, setContext
-
Methods inherited from interface io.scif.HasFormat
getFormat, getFormatName
-
Methods inherited from interface org.scijava.plugin.HasPluginInfo
getInfo, setInfo
-
Methods inherited from interface org.scijava.Locatable
getLocation
-
Methods inherited from interface org.scijava.Prioritized
compareTo, getPriority, setPriority
-
Methods inherited from interface org.scijava.plugin.RichPlugin
getIdentifier
-
Methods inherited from interface io.scif.SCIFIOPlugin
getVersion, log
-
-
-
-
Method Detail
-
suffixNecessary
boolean suffixNecessary()
Whether the file extension matching one of the format's suffixes is necessary to identify the file as a source compatible with this format.
-
suffixSufficient
boolean suffixSufficient()
Whether the file extension matching one of the format's suffixes is sufficient to identify the file as a source compatible with this format.If false, the source will have to be read to determine compatibility.
-
isFormat
boolean isFormat(org.scijava.io.location.Location loc)
Checks if the provided image source is compatible with thisFormat. Will not open the source during this process.- Parameters:
loc- path to the image source to check.- Returns:
- True if the image source is compatible with this
Format.
-
isFormat
boolean isFormat(org.scijava.io.location.Location loc, SCIFIOConfig config)
Checks if the provided image source is compatible with thisFormat.If
openis true and the source name is insufficient to determine the image type, the source may be opened for further analysis, or other relatively expensive file system operations (such as file existence tests and directory listings) may be performed.- Parameters:
loc- path to the image source to check.config-SCIFIOConfigfor this isFormat call.- Returns:
- True if the image source is compatible with this
Format.
-
isFormat
boolean isFormat(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> stream) throws IOException
Checks if the given stream is a valid stream for thisFormat.- Parameters:
stream- the image source to check.- Returns:
- True if
streamis compatible with thisFormat. - Throws:
IOException
-
checkHeader
boolean checkHeader(byte[] block)
Checks if the given bytes are a valid header for thisFormat.- Parameters:
block- the byte array to check.- Returns:
- True if
blockis compatible with thisFormat.
-
-