-
- All Superinterfaces:
Comparable<org.scijava.Prioritized>,org.scijava.Contextual,Groupable,HasFormat,org.scijava.plugin.HasPluginInfo,HasSource,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 Subinterfaces:
TypedParser<M>
- All Known Implementing Classes:
AbstractParser,APNGFormat.Parser,AVIFormat.Parser,BMPFormat.Parser,DefaultParser,DICOMFormat.Parser,EPSFormat.Parser,FITSFormat.Parser,GIFFormat.Parser,ICSFormat.Parser,ImageIOFormat.Parser,JPEG2000Format.Parser,JPEGFormat.Parser,JPEGTileFormat.Parser,KontronFormat.Parser,LegacyQTFormat.Parser,MicromanagerFormat.Parser,MinimalTIFFFormat.Parser,MNGFormat.Parser,NativeQTFormat.Parser,NRRDFormat.Parser,PCXFormat.Parser,PGMFormat.Parser,PICTFormat.Parser,ScancoISQFormat.Parser,StratecPQCTFormat.Parser,TestImgFormat.Parser,TIFFFormat.BaseTIFFParser,TIFFFormat.Parser,TIFFJAIFormat.Parser
public interface Parser extends HasFormat, HasSource, Groupable
Interface for all SCIFIO Parsers.Parsersare used to create type-specificMetadataappropriate for theirFormatby reading from an image source.- Author:
- Mark Hiner
- See Also:
Format
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LocationInfo[]getAdvancedImageUsedLocations(int imageIndex, boolean noPixels)Returns an array of LocationInfo objects representing the Locations needed to open the current series.LocationInfo[]getAdvancedUsedLocations(boolean noPixels)Returns an array of LocationInfo objects representing the Locations needed to open this dataset.org.scijava.io.location.Location[]getImageUsedFiles(int imageIndex)Returns an array of filenames needed to open the indicated image index.org.scijava.io.location.Location[]getImageUsedFiles(int imageIndex, boolean noPixels)Returns an array of filenames needed to open the indicated image.MetadatagetMetadata()org.scijava.io.handle.DataHandle<org.scijava.io.location.Location>getSource()org.scijava.io.location.LocationgetSourceLocation()Set<MetadataLevel>getSupportedMetadataLevels()Returns a list of MetadataLevel options for determining the granularity of Metadata collection.org.scijava.io.location.Location[]getUsedFiles()Returns an array of filenames needed to open this dataset.org.scijava.io.location.Location[]getUsedLocations(boolean noPixels)Returns an array of filenames needed to open this dataset.Metadataparse(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> stream)Creates aMetadataobject from the provided image source.Metadataparse(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> handle, SCIFIOConfig config)Asparse(DataHandle)with configuration options.Metadataparse(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> stream, Metadata meta)Parses metadata from the provided image source to an existingMetadataobject (overwriting may occur).Metadataparse(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> stream, Metadata meta, SCIFIOConfig config)/** Asparse(DataHandle, Metadata)with configuration options.Metadataparse(org.scijava.io.location.Location location)Creates aMetadataobject using the provided location of an image source.Metadataparse(org.scijava.io.location.Location fileName, SCIFIOConfig config)Asparse(Location)with configuration options.Metadataparse(org.scijava.io.location.Location location, Metadata meta)Parses metadata using the provided name of an image source, and writes to an existingMetadataobject (overwriting may occur).Metadataparse(org.scijava.io.location.Location fileName, Metadata meta, SCIFIOConfig config)Asparse(Location, Metadata)with configuration options.voidupdateSource(org.scijava.io.location.Location source)Updates the source being operated on by this parser (e.g. in multi-file formats).-
Methods inherited from interface org.scijava.Contextual
context, getContext, setContext
-
Methods inherited from interface io.scif.Groupable
fileGroupOption, hasCompanionFiles, isSingleFile
-
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
-
parse
Metadata parse(org.scijava.io.location.Location location) throws IOException, FormatException
Creates aMetadataobject using the provided location of an image source.- Parameters:
location- theLocationof the image source to parse.- Returns:
- A new
Metadataobject of the appropriate type. - Throws:
IOExceptionFormatException
-
parse
Metadata parse(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> stream) throws IOException, FormatException
Creates aMetadataobject from the provided image source.- Parameters:
stream- a random access handle to the image source to parse.- Returns:
- A new
Metadataobject of the appropriate type. - Throws:
IOExceptionFormatException
-
parse
Metadata parse(org.scijava.io.location.Location location, Metadata meta) throws IOException, FormatException
Parses metadata using the provided name of an image source, and writes to an existingMetadataobject (overwriting may occur).- Parameters:
location- theLocationof the image source to parse.meta- A baseMetadatato fill.- Returns:
- The provided
Metadataafter parsing. - Throws:
IllegalArgumentException- if meta is not assignable from theMetadataassociated with thisParser's FormatIOExceptionFormatException
-
parse
Metadata parse(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> stream, Metadata meta) throws IOException, FormatException
Parses metadata from the provided image source to an existingMetadataobject (overwriting may occur).- Parameters:
stream- ADataHandleto the image source to parse.meta- A baseMetadatato fill.- Returns:
- The provided
Metadataafter parsing. - Throws:
IllegalArgumentException- if meta is not assignable from theMetadataassociated with thisParser's FormatIOExceptionFormatException
-
parse
Metadata parse(org.scijava.io.location.Location fileName, SCIFIOConfig config) throws IOException, FormatException
Asparse(Location)with configuration options.- Parameters:
fileName- Name of the image source to parse.config- Configuration information to use for this parse.- Returns:
- A new
Metadataobject of the appropriate type. - Throws:
IOExceptionFormatException
-
parse
Metadata parse(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> handle, SCIFIOConfig config) throws IOException, FormatException
Asparse(DataHandle)with configuration options.- Parameters:
handle- aDataHandleto the image source to parse.config- Configuration information to use for this parse.- Returns:
- A new
Metadataobject of the appropriate type. - Throws:
IOExceptionFormatException
-
parse
Metadata parse(org.scijava.io.location.Location fileName, Metadata meta, SCIFIOConfig config) throws IOException, FormatException
Asparse(Location, Metadata)with configuration options.- Parameters:
fileName- theLocationof the image source to parse.meta- A baseMetadatato fill.config- Configuration information to use for this parse.- Returns:
- The provided
Metadataafter parsing. - Throws:
IllegalArgumentException- if meta is not assignable from theMetadataassociated with thisParser's FormatIOExceptionFormatException
-
parse
Metadata parse(org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> stream, Metadata meta, SCIFIOConfig config) throws IOException, FormatException
/** Asparse(DataHandle, Metadata)with configuration options.- Parameters:
stream- a random access handle to the image source to parse.meta- A baseMetadatato fill.config- Configuration information to use for this parse.- Returns:
- The provided
Metadataafter parsing. - Throws:
IllegalArgumentException- if meta is not assignable from theMetadataassociated with thisParser's FormatIOExceptionFormatException
-
getMetadata
Metadata getMetadata()
- Returns:
- The last metadata instance parsed by this parser.
-
getSource
org.scijava.io.handle.DataHandle<org.scijava.io.location.Location> getSource()
- Returns:
- The last
DataHandleread by this parser.
-
getSourceLocation
org.scijava.io.location.Location getSourceLocation()
- Returns:
- The last Location read from by this parser.
-
updateSource
void updateSource(org.scijava.io.location.Location source) throws IOException
Updates the source being operated on by this parser (e.g. in multi-file formats).- Throws:
IOException
-
getUsedFiles
org.scijava.io.location.Location[] getUsedFiles()
Returns an array of filenames needed to open this dataset.
-
getUsedLocations
org.scijava.io.location.Location[] getUsedLocations(boolean noPixels)
Returns an array of filenames needed to open this dataset. If the 'noPixels' flag is set, then only files that do not contain pixel data will be returned.
-
getImageUsedFiles
org.scijava.io.location.Location[] getImageUsedFiles(int imageIndex)
Returns an array of filenames needed to open the indicated image index.
-
getImageUsedFiles
org.scijava.io.location.Location[] getImageUsedFiles(int imageIndex, boolean noPixels)
Returns an array of filenames needed to open the indicated image. If the 'noPixels' flag is set, then only files that do not contain pixel data will be returned.
-
getAdvancedUsedLocations
LocationInfo[] getAdvancedUsedLocations(boolean noPixels)
Returns an array of LocationInfo objects representing the Locations needed to open this dataset. If the 'noPixels' flag is set, then only files that do not contain pixel data will be returned.
-
getAdvancedImageUsedLocations
LocationInfo[] getAdvancedImageUsedLocations(int imageIndex, boolean noPixels)
Returns an array of LocationInfo objects representing the Locations needed to open the current series. If the 'noPixels' flag is set, then only files that do not contain pixel data will be returned.
-
getSupportedMetadataLevels
Set<MetadataLevel> getSupportedMetadataLevels()
Returns a list of MetadataLevel options for determining the granularity of Metadata collection.
-
-