Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::PreferenceListReaderOptionsFunctor Struct Reference

Option callback functor with a preference list/ black list option selection strategy. More...

#include <mitkPreferenceListReaderOptionsFunctor.h>

Inheritance diagram for mitk::PreferenceListReaderOptionsFunctor:
Collaboration diagram for mitk::PreferenceListReaderOptionsFunctor:

Public Types

using ListType = std::vector< std::string >
 

Public Member Functions

bool operator() (IOUtil::LoadInfo &loadInfo) const override
 Applies the preference/black list strategy to select and configure a reader. More...
 
 PreferenceListReaderOptionsFunctor ()
 Default constructor with empty preference and black lists. More...
 
 PreferenceListReaderOptionsFunctor (const ListType &preference, const ListType &black)
 Constructor with preference and black lists. More...
 
 PreferenceListReaderOptionsFunctor (const ListType &preference, const IFileReader::Options &options)
 Constructor with preference list and reader options. More...
 
 PreferenceListReaderOptionsFunctor (const ListType &preference, const ListType &black, const IFileReader::Options &options)
 Constructor with preference list, black list, and reader options. More...
 

Protected Attributes

const ListType m_PreferenceList
 
const ListType m_BlackList
 
const IFileReader::Options m_Options
 

Detailed Description

Option callback functor with a preference list/ black list option selection strategy.

This functor can be used if a option selection should be done without user interaction. Setting up the functor one can specify a preference and black lists of controller descriptions. Any controller description on the black list will be ignored and never selected. The first controller description found on the preference list will be selected. Any controller listed on the black list is always ignored. Even if it is also listed on the preference list. If no preference listed controller is available, the functor will use the pre selected reader. If no pre selected controller is available, the functor will use the first not black listed reader. If user options (non empty) are specified for the functor, the selected reader will be set with these user options.

See also
IOUtil

Definition at line 44 of file mitkPreferenceListReaderOptionsFunctor.h.

Member Typedef Documentation

◆ ListType

using mitk::PreferenceListReaderOptionsFunctor::ListType = std::vector<std::string>

Definition at line 46 of file mitkPreferenceListReaderOptionsFunctor.h.

Constructor & Destructor Documentation

◆ PreferenceListReaderOptionsFunctor() [1/4]

mitk::PreferenceListReaderOptionsFunctor::PreferenceListReaderOptionsFunctor ( )

Default constructor with empty preference and black lists.

◆ PreferenceListReaderOptionsFunctor() [2/4]

mitk::PreferenceListReaderOptionsFunctor::PreferenceListReaderOptionsFunctor ( const ListType &  preference,
const ListType &  black 
)

Constructor with preference and black lists.

Parameters
preferenceList of preferred reader descriptions (first match wins).
blackList of blacklisted reader descriptions (always excluded).

◆ PreferenceListReaderOptionsFunctor() [3/4]

mitk::PreferenceListReaderOptionsFunctor::PreferenceListReaderOptionsFunctor ( const ListType &  preference,
const IFileReader::Options &  options 
)

Constructor with preference list and reader options.

Parameters
preferenceList of preferred reader descriptions.
optionsOptions to apply to the selected reader.

◆ PreferenceListReaderOptionsFunctor() [4/4]

mitk::PreferenceListReaderOptionsFunctor::PreferenceListReaderOptionsFunctor ( const ListType &  preference,
const ListType &  black,
const IFileReader::Options &  options 
)

Constructor with preference list, black list, and reader options.

Parameters
preferenceList of preferred reader descriptions.
blackList of blacklisted reader descriptions.
optionsOptions to apply to the selected reader.

Member Function Documentation

◆ operator()()

bool mitk::PreferenceListReaderOptionsFunctor::operator() ( IOUtil::LoadInfo &  loadInfo) const
overridevirtual

Applies the preference/black list strategy to select and configure a reader.

Parameters
loadInfoThe load info containing reader selector and options.
Returns
True if a reader was successfully selected.

Implements mitk::IOUtil::ReaderOptionsFunctorBase.

Member Data Documentation

◆ m_BlackList

const ListType mitk::PreferenceListReaderOptionsFunctor::m_BlackList
protected

Definition at line 82 of file mitkPreferenceListReaderOptionsFunctor.h.

◆ m_Options

const IFileReader::Options mitk::PreferenceListReaderOptionsFunctor::m_Options
protected

Definition at line 83 of file mitkPreferenceListReaderOptionsFunctor.h.

◆ m_PreferenceList

const ListType mitk::PreferenceListReaderOptionsFunctor::m_PreferenceList
protected

Definition at line 81 of file mitkPreferenceListReaderOptionsFunctor.h.


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