Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
mitkIModelProvider.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 mitkIModelProvider_h
14 #define mitkIModelProvider_h
15 
16 #include <mitkDataStorage.h>
17 #include <mitkIFileIO.h>
18 #include <mitkServiceInterface.h>
19 
20 namespace mitk
21 {
22  class BaseData;
23 }
24 
25 namespace itk
26 {
27  template <class T>
28  class SmartPointer;
29 }
30 
31 namespace mitk
32 {
48  struct MITKCORE_EXPORT IFileReader : public IFileIO
49  {
50  virtual ~IFileReader();
51 
56  virtual void SetInput(const std::string &location) = 0;
57 
67  virtual void SetInput(const std::string &location, std::istream *is) = 0;
68 
73  virtual std::string GetInputLocation() const = 0;
74 
79  virtual std::istream *GetInputStream() const = 0;
80 
92  virtual std::vector<itk::SmartPointer<BaseData>> Read() = 0;
93 
107  virtual DataStorage::SetOfObjects::Pointer Read(mitk::DataStorage &ds) = 0;
108  };
109 
110 } // namespace mitk
111 
112 MITK_DECLARE_SERVICE_INTERFACE(mitk::IFileReader, "org.mitk.IFileReader")
113 
114 #endif
#define MITKCORE_EXPORT
Data management class that handles 'was created by' relations.
#define MITK_DECLARE_SERVICE_INTERFACE(IFace, IId)
Find image slices visible on a given plane.
The common interface for all MITK file readers.
virtual ~IFileReader()
virtual void SetInput(const std::string &location)=0
Set the input location.
virtual std::string GetInputLocation() const =0
Get the current input location.
virtual DataStorage::SetOfObjects::Pointer Read(mitk::DataStorage &ds)=0
Reads the specified file or input stream, loading its contents into the provided DataStorage.
virtual std::vector< itk::SmartPointer< BaseData > > Read()=0
Reads the specified file or input stream and returns its contents.
virtual std::istream * GetInputStream() const =0
Get the input stream.
virtual void SetInput(const std::string &location, std::istream *is)=0
Set an input stream to read from.