13 #ifndef mitkFileReaderWriterBase_h
14 #define mitkFileReaderWriterBase_h
43 typedef std::map<std::string, us::Any>
Options;
A custom mime-type that can be registered as a service object.
Common base class for file reader and writer implementations.
void SetRanking(int ranking)
Set the service ranking for this file reader/writer.
Options GetOptions() const
Get all current options merged with defaults.
virtual ~FileReaderWriterBase()
const CustomMimeType * GetMimeType() const
Get the associated MIME type (const).
void RemoveProgressCallback(const ProgressCallback &callback)
Remove a previously registered progress callback.
void AddProgressCallback(const ProgressCallback &callback)
Register a callback for progress notifications.
void SetMimeTypePrefix(const std::string &prefix)
Set the prefix used for auto-generated MIME type names.
std::string m_Description
Options GetDefaultOptions() const
Get the default options.
std::map< std::string, us::Any > Options
Map of option names to their values.
void SetOption(const std::string &name, const us::Any &value)
Set a single option value.
Options m_Options
Options supported by this reader. Set sensible default values!
std::unique_ptr< CustomMimeType > m_CustomMimeType
std::string GetDescription() const
Get the human-readable description of this reader/writer.
CustomMimeType * GetMimeType()
Get the associated MIME type (mutable).
FileReaderWriterBase(const FileReaderWriterBase &other)
us::ServiceRegistration< CustomMimeType > m_MimeTypeReg
void SetOptions(const Options &options)
Set multiple options at once.
MimeType GetRegisteredMimeType() const
Get the MIME type as registered with the service framework.
std::string m_MimeTypePrefix
std::string GetMimeTypePrefix() const
Get the prefix used for auto-generated MIME type names.
void SetDefaultOptions(const Options &defaultOptions)
Set the default options.
Message1< float > m_ProgressMessage
int GetRanking() const
Get the current service ranking.
us::ServiceRegistration< CustomMimeType > RegisterMimeType(us::ModuleContext *context)
Register the MIME type as a CppMicroServices service.
void UnregisterMimeType()
Unregister a previously registered MIME type service.
us::Any GetOption(const std::string &name) const
Get the value of a specific option.
mitk::MessageAbstractDelegate1< float > ProgressCallback
Delegate type for progress notification callbacks.
void SetDescription(const std::string &description)
Set a human-readable description of this reader/writer.
void SetMimeType(const CustomMimeType &mimeType)
Set the MIME type for this reader/writer.
Abstract base class for message delegates with one parameter.
Immutable, value-type wrapper for a registered mime-type.
An Any class represents a general type and is capable of storing any type, supporting type-safe extra...
Find image slices visible on a given plane.