Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::DICOMFileReaderSelector Class Reference

Simple best-reader selection. More...

#include <mitkDICOMFileReaderSelector.h>

Inheritance diagram for mitk::DICOMFileReaderSelector:
Collaboration diagram for mitk::DICOMFileReaderSelector:

Public Types

typedef std::list< DICOMFileReader::Pointer > ReaderList
 

Public Member Functions

 mitkClassMacroItkParent (DICOMFileReaderSelector, itk::LightObject) static Pointer New()
 
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 mitk::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 mitk::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 StringListGetInputFiles () 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...
 

Protected Member Functions

 DICOMFileReaderSelector ()
 
virtual ~DICOMFileReaderSelector ()
 
void AddConfigsFromResources (const std::string &path)
 
void AddConfigFromResource (const std::string &resourcename)
 
void AddConfigFromResource (us::ModuleResource &resource)
 

Detailed Description

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

  • just be used to select a reader using this simple strategy
  • be taken as an example of how to use DICOMFileReaders

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 46 of file mitkDICOMFileReaderSelector.h.

Member Typedef Documentation

typedef std::list<DICOMFileReader::Pointer> mitk::DICOMFileReaderSelector::ReaderList

Definition at line 50 of file mitkDICOMFileReaderSelector.h.

Constructor & Destructor Documentation

mitk::DICOMFileReaderSelector::DICOMFileReaderSelector ( )
protected

Definition at line 28 of file mitkDICOMFileReaderSelector.cpp.

mitk::DICOMFileReaderSelector::~DICOMFileReaderSelector ( )
protectedvirtual

Definition at line 33 of file mitkDICOMFileReaderSelector.cpp.

Member Function Documentation

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 136 of file mitkDICOMFileReaderSelector.cpp.

References mitk::New().

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 156 of file mitkDICOMFileReaderSelector.cpp.

void mitk::DICOMFileReaderSelector::AddConfigFromResource ( const std::string &  resourcename)
protected
void mitk::DICOMFileReaderSelector::AddConfigFromResource ( us::ModuleResource resource)
protected

Definition at line 75 of file mitkDICOMFileReaderSelector.cpp.

References us::ModuleResource::IsValid().

void mitk::DICOMFileReaderSelector::AddConfigsFromResources ( const std::string &  path)
protected
void mitk::DICOMFileReaderSelector::AddFileReaderCanditate ( DICOMFileReader::Pointer  reader)

Add a whole pre-configured reader to the selection process.

Definition at line 105 of file mitkDICOMFileReaderSelector.cpp.

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 39 of file mitkDICOMFileReaderSelector.cpp.

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 187 of file mitkDICOMFileReaderSelector.cpp.

References max(), MITK_DEBUG, MITK_ERROR, MITK_INFO, and mitk::New().

const mitk::StringList & mitk::DICOMFileReaderSelector::GetInputFiles ( ) const

Input files.

Definition at line 180 of file mitkDICOMFileReaderSelector.cpp.

void mitk::DICOMFileReaderSelector::LoadBuiltIn3DConfigs ( )

Load 3D image creating configurations from the MITK module system (see mitk::Module::FindResources). For a default set of configurations, look into the directory Resources of the DICOMReader module.

Definition at line 115 of file mitkDICOMFileReaderSelector.cpp.

void mitk::DICOMFileReaderSelector::LoadBuiltIn3DnTConfigs ( )

Load 3D+t image creating configurations from the MITK module system (see mitk::Module::FindResources). For a default set of configurations, look into the directory Resources of the DICOMReader module.

Definition at line 129 of file mitkDICOMFileReaderSelector.cpp.

mitk::DICOMFileReaderSelector::mitkClassMacroItkParent ( DICOMFileReaderSelector  ,
itk::LightObject   
)
void mitk::DICOMFileReaderSelector::SetInputFiles ( StringList  filenames)

Input files.

Definition at line 173 of file mitkDICOMFileReaderSelector.cpp.


The documentation for this class was generated from the following files: