Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkItkImageIO.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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef MITKITKFILEIO_H
18 #define MITKITKFILEIO_H
19 
20 #include "mitkAbstractFileIO.h"
21 
22 #include <itkImageIOBase.h>
23 
24 namespace mitk
25 {
35  {
36  public:
38  ItkImageIO(const CustomMimeType &mimeType, itk::ImageIOBase::Pointer imageIO, int rank);
39 
40  // -------------- AbstractFileReader -------------
41 
43  virtual std::vector<itk::SmartPointer<BaseData>> Read() override;
44 
45  virtual ConfidenceLevel GetReaderConfidenceLevel() const override;
46 
47  // -------------- AbstractFileWriter -------------
48 
49  virtual void Write() override;
50  virtual ConfidenceLevel GetWriterConfidenceLevel() const override;
51 
52  protected:
53  virtual std::vector<std::string> FixUpImageIOExtensions(const std::string &imageIOName);
54 
55  // Fills the m_DefaultMetaDataKeys vector with default values
56  virtual void InitializeDefaultMetaDataKeys();
57 
58  private:
59  ItkImageIO(const ItkImageIO &other);
60 
61  ItkImageIO *IOClone() const override;
62 
63  itk::ImageIOBase::Pointer m_ImageIO;
64 
65  std::vector<std::string> m_DefaultMetaDataKeys;
66  };
67 
68 } // namespace mitk
69 
70 #endif /* MITKITKFILEIO_H */
itk::SmartPointer< Self > Pointer
#define MITKCORE_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
virtual std::vector< itk::SmartPointer< BaseData > > Read() override=0
Reads a path or stream and creates a list of BaseData objects.
The CustomMimeType class represents a custom mime-type which may be registered as a service object...
ConfidenceLevel
A confidence level describing the confidence of the reader or writer in handling the given data...
Definition: mitkIFileIO.h:49
Abstract class for implementing a reader and writer.