Medical Imaging Interaction Toolkit  2024.06.00
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)
 
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 AddConfigFromResource (us::ModuleResource &resource)
 Add a configuration that is stored in the passed us::ModuleResourse. 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 DICOM 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 DICOM 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...
 

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)
 

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().

Remarks
If you use LoadBuiltIn3DConfigs() and LoadBuiltIn3DnTConfigs() you must ensure that the MitkDICOM module (and therefore its resources) is properly loaded. If the module is not available these methods will do nothing. This can especially lead to problems if these methods are used in the scope of another module's activator.

Definition at line 47 of file mitkDICOMFileReaderSelector.h.

Member Typedef Documentation

◆ ReaderList

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

Definition at line 51 of file mitkDICOMFileReaderSelector.h.

Constructor & Destructor Documentation

◆ DICOMFileReaderSelector()

mitk::DICOMFileReaderSelector::DICOMFileReaderSelector ( )
protected

◆ ~DICOMFileReaderSelector()

mitk::DICOMFileReaderSelector::~DICOMFileReaderSelector ( )
overrideprotected

Member Function Documentation

◆ AddConfig()

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.

◆ AddConfigFile()

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.

◆ AddConfigFromResource() [1/2]

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

◆ AddConfigFromResource() [2/2]

void mitk::DICOMFileReaderSelector::AddConfigFromResource ( us::ModuleResource resource)

Add a configuration that is stored in the passed us::ModuleResourse. Configs can only be reset by instantiating a new DICOMFileReaderSelector.

◆ AddConfigsFromResources()

void mitk::DICOMFileReaderSelector::AddConfigsFromResources ( const std::string &  path)
protected

◆ AddFileReaderCanditate()

void mitk::DICOMFileReaderSelector::AddFileReaderCanditate ( DICOMFileReader::Pointer  reader)

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

◆ GetAllConfiguredReaders()

ReaderList 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)

◆ GetFirstReaderWithMinimumNumberOfOutputImages()

DICOMFileReader::Pointer mitk::DICOMFileReaderSelector::GetFirstReaderWithMinimumNumberOfOutputImages ( )

Execute the analysis and selection process. The first reader with a minimal number of outputs will be returned.

◆ GetInputFiles()

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

Input files.

◆ LoadBuiltIn3DConfigs()

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 DICOM module.

Remarks
If you use this function you must ensure that the MitkDICOM module(and therefore its resources) is properly loaded. If the module is not available this function will do nothing. This can especially lead to problem if this function is used in the scope of another module's activator.

◆ LoadBuiltIn3DnTConfigs()

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 DICOM module.

Remarks
If you use this function you must ensure that the MitkDICOM module(and therefore its resources) is properly loaded. If the module is not available this function will do nothing. This can especially lead to problem if this function is used in the scope of another module's activator.

◆ mitkClassMacroItkParent()

mitk::DICOMFileReaderSelector::mitkClassMacroItkParent ( DICOMFileReaderSelector  ,
itk::LightObject   
)

◆ New()

static Pointer mitk::DICOMFileReaderSelector::New ( )
static

◆ SetInputFiles()

void mitk::DICOMFileReaderSelector::SetInputFiles ( StringList  filenames)

Input files.


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