Medical Imaging Interaction Toolkit
2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
|
The common interface of all MITK file writers. More...
#include <mitkIFileWriter.h>
Public Member Functions | |
~IFileWriter () override | |
virtual void | SetInput (const BaseData *data)=0 |
Set the input data for writing. More... | |
virtual const BaseData * | GetInput () const =0 |
Get the input data set via SetInput(). More... | |
virtual void | SetOutputLocation (const std::string &location)=0 |
Set the output location. More... | |
virtual std::string | GetOutputLocation () const =0 |
Get the current output location. More... | |
virtual void | SetOutputStream (const std::string &location, std::ostream *os)=0 |
Set an output stream for writing. More... | |
virtual std::ostream * | GetOutputStream () const =0 |
Get the output stream. More... | |
virtual void | Write ()=0 |
Write the input data. More... | |
Public Member Functions inherited from mitk::IFileIO | |
virtual | ~IFileIO () |
virtual ConfidenceLevel | GetConfidenceLevel () const =0 |
The confidence level of the reader or writer implementation. More... | |
virtual Options | GetOptions () const =0 |
returns a list of the supported options More... | |
virtual us::Any | GetOption (const std::string &name) const =0 |
virtual void | SetOptions (const Options &options)=0 |
virtual void | SetOption (const std::string &name, const us::Any &value)=0 |
virtual void | AddProgressCallback (const ProgressCallback &callback)=0 |
virtual void | RemoveProgressCallback (const ProgressCallback &callback)=0 |
Static Public Member Functions | |
static std::string | PROP_BASEDATA_TYPE () |
Service property name for the supported mitk::BaseData sub-class. More... | |
Static Public Member Functions inherited from mitk::IFileIO | |
static std::string | PROP_DESCRIPTION () |
Service property name for a description. More... | |
static std::string | PROP_MIMETYPE () |
Service property name for the mime-type associated with this file writer. More... | |
Additional Inherited Members | |
Public Types inherited from mitk::IFileIO | |
enum | ConfidenceLevel { Unsupported, PartiallySupported, Supported } |
A confidence level describing the confidence of the reader or writer in handling the given data. More... | |
typedef std::map< std::string, us::Any > | Options |
Options for reading or writing data. More... | |
typedef mitk::MessageAbstractDelegate1< float > | ProgressCallback |
The common interface of all MITK file writers.
Implementations of this interface must be registered as a service to make themselves available via the service registry. If the implementation is stateful, the service should be registered using a PrototypeServiceFactory.
The file writer implementation is associated with a mime-type, specified in the service property PROP_MIMETYPE() and a mitk::BaseData sub-class as specified in the PROP_BASEDATA_TYPE() service property. The specified mime-type should have a corresponding CustomMimeType service object, registered by the reader or some other party.
It is recommended to derive new implementations from AbstractFileWriter or AbstractFileIO (if both reader and writer is implemented), which provide correct service registration semantics.
A more in-depth explanation is available on the concepts pages in the developer manual.
Definition at line 56 of file mitkIFileWriter.h.
|
override |
|
pure virtual |
Get the input data set via SetInput().
Implemented in mitk::AbstractFileWriter.
|
pure virtual |
Get the current output location.
If no stream is set (i.e. GetOutputStream returns nullptr
), the returned location string is required to represent a file-system path.
Implemented in mitk::AbstractFileWriter.
|
pure virtual |
Get the output stream.
Implemented in mitk::AbstractFileWriter.
|
static |
Service property name for the supported mitk::BaseData sub-class.
The property value must be of type std::string
.
|
pure virtual |
Set the input data for writing.
data | The input data. |
Implemented in mitk::AbstractFileWriter.
|
pure virtual |
Set the output location.
location | A file-system path. |
The location argument specifies a file-system path where the input data must be written. This method must remove any previously set output stream.
Implemented in mitk::AbstractFileWriter.
|
pure virtual |
Set an output stream for writing.
location | A custom label for the output stream. |
os | The output stream. |
If os
is nullptr
, this clears the current output stream and location
is interpreted as a file-system path. Otherwise, location
is a custom label describing the output stream os
.
Implemented in mitk::AbstractFileWriter.
|
pure virtual |
Write the input data.
If GetOutputStream() returns a non-null value, this method must use the returned stream object to write the data set via SetInput(). If no output stream was set, the data must be written to the path returned by GetOutputLocation().
mitk::Exception |
Implemented in mitk::AbstractFileWriter, mitk::ContourModelWriter, mitk::PointSetWriterService, mitk::DICOMSegmentationIO, mitk::ItkImageIO, mitk::PlanarFigureIO, mitk::DICOMPMIO, mitk::GeometryDataWriterService, mitk::MultiLabelSegmentationIO, mitk::MAPRegistrationWrapperIO, mitk::ContourModelSetWriter, mitk::SurfaceVtkLegacyIO, mitk::SurfaceVtkXmlIO, mitk::ExampleDataStructureWriterService, mitk::ImageVtkLegacyIO, mitk::ImageVtkXmlIO, mitk::SurfaceStlIO, mitk::LegacyFileWriterService, mitk::SegmentationTaskListIO, and mitk::ROIIO.