Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
mitkFileReaderSelector.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 mitkFileReaderSelector_h
14 #define mitkFileReaderSelector_h
15 
16 #include <mitkIFileReader.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;
45  long GetServiceId() const;
46 
47  bool operator<(const Item &other) const;
48 
49  private:
50  friend class FileReaderSelector;
51 
52  Item();
53 
54  struct Impl;
56  };
57 
59  FileReaderSelector(const std::string &path);
60 
62 
64 
65  bool IsEmpty() const;
66 
67  std::vector<MimeType> GetMimeTypes() const;
68 
83  std::vector<Item> Get() const;
84 
85  Item Get(long id) const;
86 
87  Item GetDefault() const;
88  long GetDefaultId() const;
89 
90  Item GetSelected() const;
91  long GetSelectedId() const;
92 
93  bool Select(const Item &item);
94  bool Select(long id);
95 
97 
98  private:
99  struct Impl;
101  };
102 
104 }
105 
106 #endif
#define MITKCORE_EXPORT
IFileReader * GetReader() const
Item & operator=(const Item &other)
us::ServiceReference< IFileReader > GetReference() const
bool operator<(const Item &other) const
std::string GetDescription() const
IFileReader::ConfidenceLevel GetConfidenceLevel() const
void Swap(FileReaderSelector &fws)
bool Select(const Item &item)
std::vector< Item > Get() const
Get a sorted list of file reader items.
std::vector< MimeType > GetMimeTypes() const
long GetSelectedId() const
FileReaderSelector(const std::string &path)
FileReaderSelector & operator=(const FileReaderSelector &other)
Item Get(long id) const
FileReaderSelector(const FileReaderSelector &other)
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 for all MITK file readers.