Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
mitkFileWriterSelector.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 mitkFileWriterSelector_h
14 #define mitkFileWriterSelector_h
15 
16 #include <mitkIFileWriter.h>
17 
18 #include <mitkMimeType.h>
19 
20 #include <usServiceReference.h>
21 
22 #include <string>
23 #include <vector>
24 
25 namespace mitk
26 {
27  class BaseData;
28 
30  {
31  public:
33  {
34  public:
35  Item(const Item &other);
36  ~Item();
37 
38  Item &operator=(const Item &other);
39 
41  std::string GetDescription() const;
44  std::string GetBaseDataType() const;
46  long GetServiceId() const;
47 
48  bool operator<(const Item &other) const;
49 
50  private:
51  friend class FileWriterSelector;
52 
53  Item();
54 
55  struct Impl;
57  };
58 
60  FileWriterSelector(const BaseData *baseData,
61  const std::string &destMimeType = std::string(),
62  const std::string &path = std::string());
63 
65 
67 
68  bool IsEmpty() const;
69 
84  std::vector<Item> Get(const std::string &mimeType) const;
85 
94  std::vector<Item> Get() const;
95 
96  Item Get(long id) const;
97 
98  Item GetDefault() const;
99  long GetDefaultId() const;
100 
101  Item GetSelected() const;
102  long GetSelectedId() const;
103 
104  bool Select(const std::string &mimeType);
105  bool Select(const Item &item);
106  bool Select(long id);
107 
108  std::vector<MimeType> GetMimeTypes() const;
109 
111 
112  private:
113  struct Impl;
115  };
116 
118 }
119 
120 #endif
#define MITKCORE_EXPORT
Base of all data objects.
Definition: mitkBaseData.h:44
Item & operator=(const Item &other)
std::string GetDescription() const
bool operator<(const Item &other) const
IFileWriter::ConfidenceLevel GetConfidenceLevel() const
IFileWriter * GetWriter() const
us::ServiceReference< IFileWriter > GetReference() const
std::string GetBaseDataType() const
void Swap(FileWriterSelector &fws)
std::vector< Item > Get() const
Get a sorted list of file writer info objects.
long GetSelectedId() const
bool Select(const std::string &mimeType)
FileWriterSelector(const BaseData *baseData, const std::string &destMimeType=std::string(), const std::string &path=std::string())
Item Get(long id) const
std::vector< Item > Get(const std::string &mimeType) const
Get a sorted list of file writer info objects.
bool Select(const Item &item)
FileWriterSelector(const FileWriterSelector &other)
FileWriterSelector & operator=(const FileWriterSelector &other)
std::vector< MimeType > GetMimeTypes() const
The MimeType class represents a registered mime-type. It is an immutable wrapper for mitk::CustomMime...
Definition: mitkMimeType.h:37
Find image slices visible on a given plane.
void swap(CustomMimeType &l, CustomMimeType &r)
ConfidenceLevel
A confidence level describing the confidence of the reader or writer in handling the given data.
Definition: mitkIFileIO.h:46
The common interface of all MITK file writers.