Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
Simple best-reader selection. More...
#include <mitkDICOMFileReaderSelector.h>
Public Types | |
typedef std::list< DICOMFileReader::Pointer > | ReaderList |
Public Member Functions | |
mitkClassMacroItkParent (DICOMFileReaderSelector, itk::LightObject) | |
void | AddConfig (const std::string &xmlDescription) |
Add a configuration as expected by DICOMReaderConfigurator. Configs can only be reset by instantiating a new DICOMFileReaderSelector. More... | |
void | AddConfigFile (const std::string &filename) |
Add a configuration as expected by DICOMReaderConfigurator. Configs can only be reset by instantiating a new DICOMFileReaderSelector. More... | |
void | AddFileReaderCanditate (DICOMFileReader::Pointer reader) |
Add a whole pre-configured reader to the selection process. More... | |
void | LoadBuiltIn3DConfigs () |
Load 3D image creating configurations from the MITK module system (see us::Module::FindResources()). For a default set of configurations, look into the directory Resources of the DICOMReader module. More... | |
void | LoadBuiltIn3DnTConfigs () |
Load 3D+t image creating configurations from the MITK module system (see us::Module::FindResources()). For a default set of configurations, look into the directory Resources of the DICOMReader module. More... | |
ReaderList | GetAllConfiguredReaders () const |
Return all the DICOMFileReaders that are currently used for selection by this class. The readers returned by this method depend on what config files have been added earlier (or which of the built-in readers have been loaded) More... | |
void | SetInputFiles (StringList filenames) |
Input files. More... | |
const StringList & | GetInputFiles () const |
Input files. More... | |
DICOMFileReader::Pointer | GetFirstReaderWithMinimumNumberOfOutputImages () |
Execute the analysis and selection process. The first reader with a minimal number of outputs will be returned. More... | |
Static Public Member Functions | |
static Pointer | New () |
Protected Member Functions | |
DICOMFileReaderSelector () | |
~DICOMFileReaderSelector () override | |
void | AddConfigsFromResources (const std::string &path) |
void | AddConfigFromResource (const std::string &resourcename) |
void | AddConfigFromResource (us::ModuleResource &resource) |
Simple best-reader selection.
This class implements a process of comparing different DICOMFileReaders and selecting the reader with the minimal number of mitk::Images in its output.
The code found in this class can
To create a selection of potential readers, the class makes use of mitk::DICOMReaderConfigurator, i.e. DICOMFileReaderSelector also expects the configuration files/strings to be in the format expected by mitk::DICOMReaderConfigurator.
Two convenience methods load "default" configurations from compiled-in resources: LoadBuiltIn3DConfigs() and LoadBuiltIn3DnTConfigs().
Definition at line 42 of file mitkDICOMFileReaderSelector.h.
typedef std::list<DICOMFileReader::Pointer> mitk::DICOMFileReaderSelector::ReaderList |
Definition at line 46 of file mitkDICOMFileReaderSelector.h.
|
protected |
Definition at line 24 of file mitkDICOMFileReaderSelector.cpp.
References ~DICOMFileReaderSelector().
|
overrideprotected |
Definition at line 29 of file mitkDICOMFileReaderSelector.cpp.
References GetAllConfiguredReaders().
Referenced by DICOMFileReaderSelector().
void mitk::DICOMFileReaderSelector::AddConfig | ( | const std::string & | xmlDescription | ) |
Add a configuration as expected by DICOMReaderConfigurator. Configs can only be reset by instantiating a new DICOMFileReaderSelector.
Definition at line 132 of file mitkDICOMFileReaderSelector.cpp.
References AddConfigFile().
Referenced by LoadBuiltIn3DnTConfigs().
void mitk::DICOMFileReaderSelector::AddConfigFile | ( | const std::string & | filename | ) |
Add a configuration as expected by DICOMReaderConfigurator. Configs can only be reset by instantiating a new DICOMFileReaderSelector.
Definition at line 152 of file mitkDICOMFileReaderSelector.cpp.
References SetInputFiles().
Referenced by AddConfig().
|
protected |
Definition at line 93 of file mitkDICOMFileReaderSelector.cpp.
References AddFileReaderCanditate(), ModuleContext::GetModule(), and us::GetModuleContext().
Referenced by AddConfigFromResource(), and AddConfigsFromResources().
|
protected |
Definition at line 71 of file mitkDICOMFileReaderSelector.cpp.
References AddConfigFromResource(), and us::ModuleResource::IsValid().
|
protected |
Definition at line 42 of file mitkDICOMFileReaderSelector.cpp.
References AddConfigFromResource(), ModuleContext::GetModule(), us::GetModuleContext(), and us::ModuleResource::IsValid().
Referenced by GetAllConfiguredReaders().
void mitk::DICOMFileReaderSelector::AddFileReaderCanditate | ( | DICOMFileReader::Pointer | reader | ) |
Add a whole pre-configured reader to the selection process.
Definition at line 101 of file mitkDICOMFileReaderSelector.cpp.
References LoadBuiltIn3DConfigs().
Referenced by AddConfigFromResource().
std::list< mitk::DICOMFileReader::Pointer > mitk::DICOMFileReaderSelector::GetAllConfiguredReaders | ( | ) | const |
Return all the DICOMFileReaders that are currently used for selection by this class. The readers returned by this method depend on what config files have been added earlier (or which of the built-in readers have been loaded)
Definition at line 35 of file mitkDICOMFileReaderSelector.cpp.
References AddConfigsFromResources().
Referenced by ~DICOMFileReaderSelector().
mitk::DICOMFileReader::Pointer mitk::DICOMFileReaderSelector::GetFirstReaderWithMinimumNumberOfOutputImages | ( | ) |
Execute the analysis and selection process. The first reader with a minimal number of outputs will be returned.
Definition at line 183 of file mitkDICOMFileReaderSelector.cpp.
References max(), MITK_DEBUG, MITK_ERROR, and MITK_INFO.
Referenced by GetInputFiles().
const mitk::StringList & mitk::DICOMFileReaderSelector::GetInputFiles | ( | ) | const |
Input files.
Definition at line 176 of file mitkDICOMFileReaderSelector.cpp.
References GetFirstReaderWithMinimumNumberOfOutputImages().
Referenced by SetInputFiles().
void mitk::DICOMFileReaderSelector::LoadBuiltIn3DConfigs | ( | ) |
Load 3D image creating configurations from the MITK module system (see us::Module::FindResources()). For a default set of configurations, look into the directory Resources of the DICOMReader module.
Definition at line 111 of file mitkDICOMFileReaderSelector.cpp.
References LoadBuiltIn3DnTConfigs().
Referenced by AddFileReaderCanditate().
void mitk::DICOMFileReaderSelector::LoadBuiltIn3DnTConfigs | ( | ) |
Load 3D+t image creating configurations from the MITK module system (see us::Module::FindResources()). For a default set of configurations, look into the directory Resources of the DICOMReader module.
Definition at line 125 of file mitkDICOMFileReaderSelector.cpp.
References AddConfig().
Referenced by LoadBuiltIn3DConfigs().
mitk::DICOMFileReaderSelector::mitkClassMacroItkParent | ( | DICOMFileReaderSelector | , |
itk::LightObject | |||
) |
|
static |
void mitk::DICOMFileReaderSelector::SetInputFiles | ( | StringList | filenames | ) |
Input files.
Definition at line 169 of file mitkDICOMFileReaderSelector.cpp.
References GetInputFiles().
Referenced by AddConfigFile().