13 #ifndef mitkAbstractFileIO_h
14 #define mitkAbstractFileIO_h
41 IFileReader *Clone()
const override {
return ReaderClone(); }
52 const std::string &description)
59 IFileWriter *Clone()
const override {
return WriterClone(); }
189 const std::string &description);
virtual ConfidenceLevel GetReaderConfidenceLevel() const
ConfidenceLevel GetConfidenceLevel() const override
Get the confidence level of this reader or writer for the current input.
AbstractFileIOReader(const CustomMimeType &mimeType, const std::string &description)
Abstract base class for implementing a combined file reader and writer.
AbstractFileIO(const std::string &baseDataType)
Construct with a BaseData type name only.
ConfidenceLevel GetReaderConfidenceLevel() const override
Get the reader confidence level for the current input.
std::pair< us::ServiceRegistration< IFileReader >, us::ServiceRegistration< IFileWriter > > RegisterService(us::ModuleContext *context=us::GetModuleContext())
Register both reader and writer as CppMicroServices services.
void SetReaderDescription(const std::string &description)
Set the description for the reader part.
void SetWriterDescription(const std::string &description)
Set the description for the writer part.
std::string GetWriterDescription() const
Get the description of the writer part.
Options GetDefaultReaderOptions() const
Get the default options for the reader part.
std::string GetReaderDescription() const
Get the description of the reader part.
void SetWriterRanking(int ranking)
Set the service ranking for the writer part.
void SetWriterOption(const std::string &name, const us::Any &value)
Set a single writer option.
int GetWriterRanking() const
Get the service ranking for the writer part.
Options GetReaderOptions() const
Get the reader-specific options.
AbstractFileIO(const AbstractFileIO &other)
Copy constructor.
int GetReaderRanking() const
Get the service ranking for the reader part.
AbstractFileIO(const std::string &baseDataType, const CustomMimeType &mimeType, const std::string &description)
Construct with a BaseData type, MIME type, and description.
void SetReaderOption(const std::string &name, const us::Any &value)
Set a single reader option.
void SetReaderOptions(const Options &options)
Set multiple reader options at once.
void SetWriterOptions(const Options &options)
Set multiple writer options at once.
Options GetDefaultWriterOptions() const
Get the default options for the writer part.
void SetDefaultWriterOptions(const Options &defaultOptions)
Set default options for the writer part.
us::Any GetWriterOption(const std::string &name) const
Get the value of a specific writer option.
void SetMimeType(const CustomMimeType &mimeType)
Set the shared MIME type for both reader and writer.
ConfidenceLevel GetWriterConfidenceLevel() const override
Get the writer confidence level for the current input data.
us::Any GetReaderOption(const std::string &name) const
Get the value of a specific reader option.
void SetDefaultReaderOptions(const Options &defaultOptions)
Set default options for the reader part.
Options GetWriterOptions() const
Get the writer-specific options.
void SetReaderRanking(int ranking)
Set the service ranking for the reader part.
const CustomMimeType * GetMimeType() const
Get the shared MIME type.
Base class for creating mitk::BaseData objects from files or streams.
ConfidenceLevel GetConfidenceLevel() const override
Determine confidence for reading the current input.
Base class for writing mitk::BaseData objects to files or streams.
ConfidenceLevel GetConfidenceLevel() const override
Determine confidence for writing the current input data.
A custom mime-type that can be registered as a service object.
An Any class represents a general type and is capable of storing any type, supporting type-safe extra...
static ModuleContext * GetModuleContext()
Returns the module context of the calling module.
Find image slices visible on a given plane.
virtual ConfidenceLevel GetWriterConfidenceLevel() const
AbstractFileIOWriter(const std::string &baseDataType, const CustomMimeType &mimeType, const std::string &description)
ConfidenceLevel GetConfidenceLevel() const override
Get the confidence level of this reader or writer for the current input.
AbstractFileIOWriter(const std::string &baseDataType)
ConfidenceLevel
A confidence level describing the reader's or writer's ability to handle the given data or file forma...
std::map< std::string, us::Any > Options
Options for reading or writing data.
The common interface for all MITK file readers.
The common interface of all MITK file writers.