13 #ifndef mitkAbstractFileWriter_h
14 #define mitkAbstractFileWriter_h
32 struct PrototypeServiceFactory;
124 std::unique_ptr<Impl> d;
142 std::ostream *m_Stream;
221 std::unique_ptr<Impl> d;
A local file representation for streams.
std::string GetFileName()
LocalFile(IFileWriter *writer)
An output stream wrapper.
OutputStream(IFileWriter *writer, std::ios_base::openmode mode=std::ios_base::trunc|std::ios_base::out)
Base class for writing mitk::BaseData objects to files or streams.
const BaseData * GetInput() const override
Get the input data set via SetInput().
void SetInput(const BaseData *data) override
Set the input data for writing.
AbstractFileWriter(const std::string &baseDataType, const CustomMimeType &mimeType, const std::string &description)
void SetDefaultOptions(const Options &defaultOptions)
Options GetOptions() const override
returns a list of the supported options
void SetOutputStream(const std::string &location, std::ostream *os) override
Set an output stream for writing.
~AbstractFileWriter() override
ConfidenceLevel GetConfidenceLevel() const override
The confidence level of the reader or writer implementation.
virtual us::ServiceProperties GetServiceProperties() const
std::string GetOutputLocation() const override
Get the current output location.
void ValidateOutputLocation() const
void AddProgressCallback(const ProgressCallback &callback) override
void SetOutputLocation(const std::string &location) override
Set the output location.
void SetOptions(const Options &options) override
std::string GetDescription() const
virtual std::string GetBaseDataType() const
void SetDescription(const std::string &description)
Sets a human readable description of this writer.
void SetBaseDataType(const std::string &baseDataType)
Sets the name of the mitk::Basedata that this writer is able to handle.
Options GetDefaultOptions() const
us::Any GetOption(const std::string &name) const override
MimeType GetRegisteredMimeType() const
std::string GetMimeTypePrefix() const
void SetMimeTypePrefix(const std::string &prefix)
void Write() override=0
Write the base data to the specified location or output stream.
virtual us::ServiceRegistration< CustomMimeType > RegisterMimeType(us::ModuleContext *context)
us::ServiceRegistration< IFileWriter > RegisterService(us::ModuleContext *context=us::GetModuleContext())
const CustomMimeType * GetMimeType() const
void SetMimeType(const CustomMimeType &mimeType)
void SetOption(const std::string &name, const us::Any &value) override
AbstractFileWriter(const std::string &baseDataType)
void RemoveProgressCallback(const ProgressCallback &callback) override
void SetRanking(int ranking)
Set the service ranking for this file writer.
std::ostream * GetOutputStream() const override
Get the output stream.
AbstractFileWriter(const AbstractFileWriter &other)
Base of all data objects.
The CustomMimeType class represents a custom mime-type which may be registered as a service object....
The MimeType class represents a registered mime-type. It is an immutable wrapper for mitk::CustomMime...
static ModuleContext * GetModuleContext()
Returns the module context of the calling module.
US_UNORDERED_MAP_TYPE< std::string, Any > ServiceProperties
Find image slices visible on a given plane.
ConfidenceLevel
A confidence level describing the confidence of the reader or writer in handling the given data.
std::map< std::string, us::Any > Options
Options for reading or writing data.
The common interface of all MITK file writers.