|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Common interface for all MITK file readers and writers. More...
#include <mitkIFileIO.h>

Public Types | |
| enum | ConfidenceLevel { Unsupported , PartiallySupported , Supported } |
| A confidence level describing the reader's or writer's ability to handle the given data or file format. More... | |
| typedef std::map< std::string, us::Any > | Options |
| Options for reading or writing data. More... | |
| typedef mitk::MessageAbstractDelegate1< float > | ProgressCallback |
| Callback delegate type for progress reporting. More... | |
Public Member Functions | |
| virtual | ~IFileIO () |
| virtual ConfidenceLevel | GetConfidenceLevel () const =0 |
| Get the confidence level of this reader or writer for the current input. More... | |
| virtual Options | GetOptions () const =0 |
| Get the current options map. More... | |
| virtual us::Any | GetOption (const std::string &name) const =0 |
| Get the value of a specific option. More... | |
| virtual void | SetOptions (const Options &options)=0 |
| Set multiple options at once. More... | |
| virtual void | SetOption (const std::string &name, const us::Any &value)=0 |
| Set the value of a specific option. More... | |
| virtual void | AddProgressCallback (const ProgressCallback &callback)=0 |
| Register a progress callback. More... | |
| virtual void | RemoveProgressCallback (const ProgressCallback &callback)=0 |
| Remove a previously registered progress callback. More... | |
Static Public Member Functions | |
| static std::string | PROP_DESCRIPTION () |
| Service property name for a human-readable description. More... | |
| static std::string | PROP_MIMETYPE () |
| Service property name for the mime-type associated with this reader or writer. More... | |
Common interface for all MITK file readers and writers.
This interface defines the shared API for file I/O operations in MITK, including confidence levels for format support, user-configurable options, and progress reporting. It is not meant to be implemented directly. It is inherited from IFileWriter and IFileReader, and a default implementation is provided in AbstractFileIO via AbstractFileWriter and AbstractFileReader.
Definition at line 43 of file mitkIFileIO.h.
| typedef std::map<std::string, us::Any> mitk::IFileIO::Options |
Options for reading or writing data.
Options are key-value pairs used in reader or writer implementations to customize certain aspects of the reading/writing process. Options may be supplied by users calling the SetOption() method or they may be presented as an input mask in the context of a graphical user interface.
The keys are human-readable labels and the type of the option value specifies the user interface representation. If a key contains multiple segments (sub-strings separated by a '.' character), only the last segment is displayed. If the last segment is equal to the string "enum", the option is treated as a finite enumeration of values where the values are contained in a corresponding std::vector<std::string> value. The same option key without the "enum" segment is considered to hold the current selection from the enumeration.
Definition at line 80 of file mitkIFileIO.h.
| typedef mitk::MessageAbstractDelegate1<float> mitk::IFileIO::ProgressCallback |
Callback delegate type for progress reporting.
The delegate receives a float value between 0.0 and 1.0 indicating the current progress of a read or write operation.
Definition at line 88 of file mitkIFileIO.h.
A confidence level describing the reader's or writer's ability to handle the given data or file format.
Higher values indicate stronger confidence. The level is used to rank multiple competing reader or writer implementations so that the most suitable one is selected automatically.
| Enumerator | |
|---|---|
| Unsupported | The reader/writer cannot handle the data. |
| PartiallySupported | The reader/writer can handle the data with limitations. |
| Supported | The reader/writer fully supports the data. |
Definition at line 56 of file mitkIFileIO.h.
|
virtual |
|
pure virtual |
Register a progress callback.
| [in] | callback | The callback delegate to add. |
The callback will be invoked during read or write operations to report progress.
Implemented in mitk::AbstractFileWriter, and mitk::AbstractFileReader.
|
pure virtual |
Get the confidence level of this reader or writer for the current input.
The level is used to rank multiple competing implementations. A higher confidence level results in the reader or writer being preferred.
Implemented in mitk::MultiLabelSegmentationStackWriterBase, mitk::MultiLabelSegmentationStackReader, mitk::LegacyLabelSetImageIO, mitk::BaseDICOMReaderService, mitk::AbstractFileWriter, mitk::AbstractFileReader, mitk::AbstractFileIOWriter, and mitk::AbstractFileIOReader.
|
pure virtual |
Get the value of a specific option.
| [in] | name | The name of the option. |
Implemented in mitk::AbstractFileWriter, mitk::AbstractFileReader, and mitk::CESTDICOMManualReaderService.
|
pure virtual |
Get the current options map.
The returned map contains both default and user-set options.
Implemented in mitk::AbstractFileWriter, mitk::AbstractFileReader, and mitk::CESTDICOMManualReaderService.
|
static |
Service property name for a human-readable description.
The property value must be of type std::string.
|
static |
Service property name for the mime-type associated with this reader or writer.
The property value must be of type std::string and must correspond to a registered CustomMimeType name.
|
pure virtual |
Remove a previously registered progress callback.
| [in] | callback | The callback delegate to remove. |
Implemented in mitk::AbstractFileWriter, and mitk::AbstractFileReader.
|
pure virtual |
Set the value of a specific option.
| [in] | name | The name of the option. |
| [in] | value | The new value for the option. |
Implemented in mitk::AbstractFileWriter, and mitk::AbstractFileReader.
|
pure virtual |
Set multiple options at once.
| [in] | options | A map of option names to their new values. |
Implemented in mitk::AbstractFileWriter, and mitk::AbstractFileReader.