Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkIFileIO.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkIFileIO_h
14 #define mitkIFileIO_h
15 
16 #include <MitkCoreExports.h>
17 #include <mitkMessage.h>
18 
19 #include <usAny.h>
20 
21 #include <map>
22 #include <string>
23 
24 namespace mitk
25 {
44  {
45  // The order of the enum values is important: it is used
46  // to rank writer implementations
47 
57  {
58  Unsupported = 0,
59  PartiallySupported = 8,
60  Supported = 16
61  };
62 
80  typedef std::map<std::string, us::Any> Options;
81 
89 
90  virtual ~IFileIO();
91 
100  virtual ConfidenceLevel GetConfidenceLevel() const = 0;
101 
108  virtual Options GetOptions() const = 0;
109 
115  virtual us::Any GetOption(const std::string &name) const = 0;
116 
121  virtual void SetOptions(const Options &options) = 0;
122 
128  virtual void SetOption(const std::string &name, const us::Any &value) = 0;
129 
137  virtual void AddProgressCallback(const ProgressCallback &callback) = 0;
138 
143  virtual void RemoveProgressCallback(const ProgressCallback &callback) = 0;
144 
152  static std::string PROP_DESCRIPTION();
153 
164  static std::string PROP_MIMETYPE();
165  };
166 }
167 
168 #endif
#define MITKCORE_EXPORT
Abstract base class for message delegates with one parameter.
Definition: mitkMessage.h:101
An Any class represents a general type and is capable of storing any type, supporting type-safe extra...
Definition: usAny.h:145
Find image slices visible on a given plane.
Common interface for all MITK file readers and writers.
Definition: mitkIFileIO.h:44
static std::string PROP_MIMETYPE()
Service property name for the mime-type associated with this reader or writer.
ConfidenceLevel
A confidence level describing the reader's or writer's ability to handle the given data or file forma...
Definition: mitkIFileIO.h:57
std::map< std::string, us::Any > Options
Options for reading or writing data.
Definition: mitkIFileIO.h:80
virtual ConfidenceLevel GetConfidenceLevel() const =0
Get the confidence level of this reader or writer for the current input.
virtual us::Any GetOption(const std::string &name) const =0
Get the value of a specific option.
virtual void AddProgressCallback(const ProgressCallback &callback)=0
Register a progress callback.
virtual ~IFileIO()
static std::string PROP_DESCRIPTION()
Service property name for a human-readable description.
mitk::MessageAbstractDelegate1< float > ProgressCallback
Callback delegate type for progress reporting.
Definition: mitkIFileIO.h:88
virtual void RemoveProgressCallback(const ProgressCallback &callback)=0
Remove a previously registered progress callback.
virtual void SetOption(const std::string &name, const us::Any &value)=0
Set the value of a specific option.
virtual Options GetOptions() const =0
Get the current options map.
virtual void SetOptions(const Options &options)=0
Set multiple options at once.