Medical Imaging Interaction Toolkit  2018.4.99-12ad79a3
Medical Imaging Interaction Toolkit
mitkDICOMFileReaderSelector.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 mitkDICOMFileReaderSelector_h
14 #define mitkDICOMFileReaderSelector_h
15 
16 #include "mitkDICOMFileReader.h"
17 
18 #include <usModuleResource.h>
19 
20 namespace mitk
21 {
22 
42 class MITKDICOMREADER_EXPORT DICOMFileReaderSelector : public itk::LightObject
43 {
44  public:
45 
46  typedef std::list<DICOMFileReader::Pointer> ReaderList;
47 
49  itkNewMacro( DICOMFileReaderSelector )
50 
51 
52  void AddConfig(const std::string& xmlDescription);
56  void AddConfigFile(const std::string& filename);
57 
59  void AddFileReaderCanditate(DICOMFileReader::Pointer reader);
60 
63  void LoadBuiltIn3DConfigs();
66  void LoadBuiltIn3DnTConfigs();
67 
71  ReaderList GetAllConfiguredReaders() const;
72 
74  void SetInputFiles(StringList filenames);
76  const StringList& GetInputFiles() const;
77 
79  DICOMFileReader::Pointer GetFirstReaderWithMinimumNumberOfOutputImages();
80 
81  protected:
82 
84  ~DICOMFileReaderSelector() override;
85 
86  void AddConfigsFromResources(const std::string& path);
87  void AddConfigFromResource(const std::string& resourcename);
88  void AddConfigFromResource(us::ModuleResource& resource);
89 
90  private:
91 
92  StringList m_PossibleConfigurations;
93  StringList m_InputFilenames;
94  ReaderList m_Readers;
95 
96  };
97 
98 } // namespace
99 
100 #endif // mitkDICOMFileReaderSelector_h
#define MITKDICOMREADER_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
std::list< DICOMFileReader::Pointer > ReaderList
Simple best-reader selection.
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:49
std::vector< std::string > StringList