Medical Imaging Interaction Toolkit  2025.12.02
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 
47 class MITKDICOM_EXPORT DICOMFileReaderSelector : public itk::LightObject
48 {
49  public:
50 
51  typedef std::list<DICOMFileReader::Pointer> ReaderList;
52 
54  itkNewMacro( DICOMFileReaderSelector );
55 
58  void AddConfig(const std::string& xmlDescription);
61  void AddConfigFile(const std::string& filename);
65 
67  void AddFileReaderCanditate(DICOMFileReader::Pointer reader);
68 
76 
84 
89 
91  void SetInputFiles(StringList filenames);
93  const StringList& GetInputFiles() const;
94 
97 
98  protected:
99 
102 
103  void AddConfigsFromResources(const std::string& path);
104  void AddConfigFromResource(const std::string& resourcename);
105 
106  private:
107 
108  StringList m_PossibleConfigurations;
109  StringList m_InputFilenames;
110  ReaderList m_Readers;
111 
112  };
113 
114 } // namespace
115 
116 #endif
#define MITKDICOM_EXPORT
Simple best-reader selection.
std::list< DICOMFileReader::Pointer > ReaderList
void AddConfigFromResource(const std::string &resourcename)
void AddConfig(const std::string &xmlDescription)
Add a configuration as expected by DICOMReaderConfigurator. Configs can only be reset by instantiatin...
mitkClassMacroItkParent(DICOMFileReaderSelector, itk::LightObject)
void AddFileReaderCanditate(DICOMFileReader::Pointer reader)
Add a whole pre-configured reader to the selection process.
void AddConfigFromResource(us::ModuleResource &resource)
Add a configuration that is stored in the passed us::ModuleResourse. Configs can only be reset by ins...
void LoadBuiltIn3DnTConfigs()
Load 3D+t image creating configurations from the MITK module system (see us::Module::FindResources())...
void SetInputFiles(StringList filenames)
Input files.
DICOMFileReader::Pointer GetFirstReaderWithMinimumNumberOfOutputImages()
Execute the analysis and selection process. The first reader with a minimal number of outputs will be...
ReaderList GetAllConfiguredReaders() const
Return all the DICOMFileReaders that are currently used for selection by this class....
void AddConfigFile(const std::string &filename)
Add a configuration as expected by DICOMReaderConfigurator. Configs can only be reset by instantiatin...
void AddConfigsFromResources(const std::string &path)
void LoadBuiltIn3DConfigs()
Load 3D image creating configurations from the MITK module system (see us::Module::FindResources())....
const StringList & GetInputFiles() const
Input files.
Find image slices visible on a given plane.
std::vector< std::string > StringList