- java.lang.Object
-
- org.scijava.AbstractContextual
-
- org.scijava.plugin.AbstractRichPlugin
-
- org.scijava.service.AbstractService
-
- io.scif.services.DefaultDatasetIOService
-
- All Implemented Interfaces:
SCIFIOService,DatasetIOService,Comparable<org.scijava.Prioritized>,org.scijava.Contextual,org.scijava.Disposable,org.scijava.Identifiable,org.scijava.Initializable,org.scijava.Locatable,org.scijava.log.Logged,org.scijava.plugin.HasPluginInfo,org.scijava.plugin.RichPlugin,org.scijava.plugin.SciJavaPlugin,org.scijava.Prioritized,org.scijava.service.Service,org.scijava.Versioned
public class DefaultDatasetIOService extends org.scijava.service.AbstractService implements DatasetIOService
DefaultDatasetIOServiceimplementation.- Author:
- Mark Hiner
-
-
Constructor Summary
Constructors Constructor Description DefaultDatasetIOService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanOpen(String source)Determines whether the given source can be opened as aDatasetusing theDatasetIOService.open(Location)method.booleancanOpen(org.scijava.io.location.Location source)Determines whether the given source can be opened as aDatasetusing theDatasetIOService.open(Location)method.booleancanSave(org.scijava.io.location.Location destination)Determines whether the given destination can be used to save aDatasetusing theDatasetIOService.save(Dataset, Location)method.net.imagej.Datasetopen(String source)net.imagej.Datasetopen(String source, SCIFIOConfig config)Loads a dataset from a source (such as a file on disk).net.imagej.Datasetopen(org.scijava.io.location.Location source)Loads a dataset from a source (such as a file on disk).net.imagej.Datasetopen(org.scijava.io.location.Location source, SCIFIOConfig config)AsDatasetIOService.open(Location), with the givenio.scif.config.SCIFIOConfig.List<net.imagej.Dataset>openAll(String source)List<net.imagej.Dataset>openAll(String source, SCIFIOConfig config)List<net.imagej.Dataset>openAll(org.scijava.io.location.Location source)Load all the datasets from a given source.List<net.imagej.Dataset>openAll(org.scijava.io.location.Location source, SCIFIOConfig config)AsDatasetIOService.openAll(Location), with a givenio.scif.config.SCIFIOConfig.Metadatasave(net.imagej.Dataset dataset, String destination)Saves a dataset to a destination (such as a file on disk).Metadatasave(net.imagej.Dataset dataset, String destination, SCIFIOConfig config)Saves a dataset to a destination (such as a file on disk).Metadatasave(net.imagej.Dataset dataset, org.scijava.io.location.Location destination)Saves a dataset to a destination (such as a file on disk).Metadatasave(net.imagej.Dataset dataset, org.scijava.io.location.Location destination, SCIFIOConfig config)Saves a dataset to a destination (such as a file on disk).-
Methods inherited from class org.scijava.service.AbstractService
getContext, setContext, toString
-
Methods inherited from class org.scijava.plugin.AbstractRichPlugin
getInfo, getPriority, setInfo, setPriority
-
Methods inherited from class org.scijava.AbstractContextual
context
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.scijava.Contextual
context, getContext, setContext
-
Methods inherited from interface org.scijava.Disposable
dispose
-
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, log
-
Methods inherited from interface org.scijava.service.Service
initialize, registerEventHandlers
-
Methods inherited from interface org.scijava.Versioned
getVersion
-
-
-
-
Method Detail
-
canOpen
public boolean canOpen(org.scijava.io.location.Location source)
Description copied from interface:DatasetIOServiceDetermines whether the given source can be opened as aDatasetusing theDatasetIOService.open(Location)method.- Specified by:
canOpenin interfaceDatasetIOService
-
canOpen
public boolean canOpen(String source)
Description copied from interface:DatasetIOServiceDetermines whether the given source can be opened as aDatasetusing theDatasetIOService.open(Location)method.- Specified by:
canOpenin interfaceDatasetIOService
-
canSave
public boolean canSave(org.scijava.io.location.Location destination)
Description copied from interface:DatasetIOServiceDetermines whether the given destination can be used to save aDatasetusing theDatasetIOService.save(Dataset, Location)method.- Specified by:
canSavein interfaceDatasetIOService
-
open
public net.imagej.Dataset open(org.scijava.io.location.Location source) throws IOException
Description copied from interface:DatasetIOServiceLoads a dataset from a source (such as a file on disk).- Specified by:
openin interfaceDatasetIOService- Throws:
IOException
-
open
public net.imagej.Dataset open(String source) throws IOException
- Specified by:
openin interfaceDatasetIOService- Throws:
IOException- See Also:
DatasetIOService.open(Location)
-
open
public net.imagej.Dataset open(org.scijava.io.location.Location source, SCIFIOConfig config) throws IOException
Description copied from interface:DatasetIOServiceAsDatasetIOService.open(Location), with the givenio.scif.config.SCIFIOConfig.- Specified by:
openin interfaceDatasetIOService- Throws:
IOException
-
open
public net.imagej.Dataset open(String source, SCIFIOConfig config) throws IOException
Description copied from interface:DatasetIOServiceLoads a dataset from a source (such as a file on disk).- Specified by:
openin interfaceDatasetIOService- Throws:
IOException
-
openAll
public List<net.imagej.Dataset> openAll(org.scijava.io.location.Location source) throws IOException
Description copied from interface:DatasetIOServiceLoad all the datasets from a given source. (Useful for files containing image series)- Specified by:
openAllin interfaceDatasetIOService- Parameters:
source- the source location of the images- Returns:
- a list of all datasets contained by the image file.
- Throws:
IOException
-
openAll
public List<net.imagej.Dataset> openAll(String source) throws IOException
- Specified by:
openAllin interfaceDatasetIOService- Throws:
IOException- See Also:
DatasetIOService.openAll(Location)
-
openAll
public List<net.imagej.Dataset> openAll(String source, SCIFIOConfig config) throws IOException
- Specified by:
openAllin interfaceDatasetIOService- Throws:
IOException- See Also:
DatasetIOService.openAll(Location)
-
openAll
public List<net.imagej.Dataset> openAll(org.scijava.io.location.Location source, SCIFIOConfig config) throws IOException
Description copied from interface:DatasetIOServiceAsDatasetIOService.openAll(Location), with a givenio.scif.config.SCIFIOConfig.- Specified by:
openAllin interfaceDatasetIOService- Parameters:
source- path on the diskconfig- SCIFIOConfig file- Returns:
- a list of all datasets contained by the image file.
- Throws:
IOException
-
save
public Metadata save(net.imagej.Dataset dataset, String destination) throws IOException
Description copied from interface:DatasetIOServiceSaves a dataset to a destination (such as a file on disk).- Specified by:
savein interfaceDatasetIOService- Parameters:
dataset- The dataset to save.destination- Where the dataset should be saved (e.g., a file path on disk).- Throws:
IOException
-
save
public Metadata save(net.imagej.Dataset dataset, org.scijava.io.location.Location destination) throws IOException
Description copied from interface:DatasetIOServiceSaves a dataset to a destination (such as a file on disk).- Specified by:
savein interfaceDatasetIOService- Parameters:
dataset- The dataset to save.destination- Where the dataset should be saved (e.g., a file path on disk).- Throws:
IOException
-
save
public Metadata save(net.imagej.Dataset dataset, String destination, SCIFIOConfig config) throws IOException
Description copied from interface:DatasetIOServiceSaves a dataset to a destination (such as a file on disk).- Specified by:
savein interfaceDatasetIOService- Parameters:
dataset- The dataset to save.destination- Where the dataset should be saved (e.g., a file path on disk).config- Theio.scif.config.SCIFIOConfigdescribing how the data should be saved.- Throws:
IOException
-
save
public Metadata save(net.imagej.Dataset dataset, org.scijava.io.location.Location destination, SCIFIOConfig config) throws IOException
Description copied from interface:DatasetIOServiceSaves a dataset to a destination (such as a file on disk).- Specified by:
savein interfaceDatasetIOService- Parameters:
dataset- The dataset to save.destination- Where the dataset should be saved (e.g., a file path on disk).config- Theio.scif.config.SCIFIOConfigdescribing how the data should be saved.- Throws:
IOException
-
-