MeVisLab Toolbox Reference
ml::FileListTools::DPLConfiguration Class Reference

Manages some DPL (DICOM Processing Library) configurations which control sorting and partitioning of imported DICOM frames. More...

#include <mlFileListToolsDPLConfiguration.h>

Public Types

enum  DplConfigs {
  DPLDefaultConfig = 0 , DPLUserConfig1 , DPLUserConfig2 , DPLUserConfig3 ,
  NUM_USED_DPL_CONFIGS
}
 Available selectable DPL configurations. More...
 

Public Member Functions

 DPLConfiguration ()
 
const DPL::Configuration & getConfig () const
 Returns the used configuration object. More...
 
const std::set< MLuint32 > & getTagIdSet () const
 Returns all ids used in the internally defined configuration. More...
 
void setUpDPLConfig (DplConfigs dplUsedConfig, const std::string dplConfigStringFld[4], const std::string &importFilterConfig, const std::string &importFilterProcessingSettings, size_t minNumFramesInVolume, DPL::Logger &logger, DPL::Processor &processor, DPL::SecondPassPartitioningProvider &addedProvider, MLdouble relativeDistanceTolerance, MLdouble absoluteDistanceTolerance, MLdouble positionToleranceMM, const std::string &seriesBasedPreprocessingCondition, std::string force2DPlusTCondition)
 Sets up the import configuration for a DPL::Processor "processor". More...
 

Static Public Member Functions

static bool hasUIntSetting (const std::string &str, const std::string &tag, unsigned int &val)
 Helper function to read last unsigned integer argument after tag from str. More...
 
static bool hasDoubleSetting (const std::string &str, const std::string &tag, double &val)
 Helper function to read last unsigned integer argument after tag from str. More...
 
static bool hasSingleStringSetting (std::string str, const std::string &tag, std::string &strVal, bool replaceSpaceTags=true)
 Helper function to read a single string without white spaces after tag from str. More...
 
static bool hasDoubleStringSetting (std::string str, const std::string &tag, std::string &str1Val, std::string &str2Val, bool replaceSpaceTags=true)
 Helper function to read two space separated strings without white spaces after tag from str. More...
 

Static Public Attributes

static const char *const DPLUsedConfigNames [NUM_USED_DPL_CONFIGS]
 String names corresponding to the selectable DPL configurations. More...
 
static const char *const DPL_DEFAULT_CONFIG0
 String versions of the default configuration used by the DPL for composing DICOM frames to volumes. More...
 
static const char *const DPL_DEFAULT_CONFIG1
 
static const char *const DPL_DEFAULT_CONFIG2
 

Detailed Description

Manages some DPL (DICOM Processing Library) configurations which control sorting and partitioning of imported DICOM frames.

Definition at line 41 of file mlFileListToolsDPLConfiguration.h.

Member Enumeration Documentation

◆ DplConfigs

Available selectable DPL configurations.

Enumerator
DPLDefaultConfig 

Default configuration (not modifiable)

DPLUserConfig1 

1st modifiable user configuration

DPLUserConfig2 

2nd modifiable user configuration

DPLUserConfig3 

3rd modifiable user configuration

NUM_USED_DPL_CONFIGS 

Definition at line 46 of file mlFileListToolsDPLConfiguration.h.

Constructor & Destructor Documentation

◆ DPLConfiguration()

ml::FileListTools::DPLConfiguration::DPLConfiguration ( )
inline

Definition at line 66 of file mlFileListToolsDPLConfiguration.h.

Member Function Documentation

◆ getConfig()

const DPL::Configuration& ml::FileListTools::DPLConfiguration::getConfig ( ) const
inline

Returns the used configuration object.

Definition at line 69 of file mlFileListToolsDPLConfiguration.h.

◆ getTagIdSet()

const std::set<MLuint32>& ml::FileListTools::DPLConfiguration::getTagIdSet ( ) const
inline

Returns all ids used in the internally defined configuration.

Definition at line 72 of file mlFileListToolsDPLConfiguration.h.

◆ hasDoubleSetting()

static bool ml::FileListTools::DPLConfiguration::hasDoubleSetting ( const std::string &  str,
const std::string &  tag,
double &  val 
)
static

Helper function to read last unsigned integer argument after tag from str.

Parameters
strThe str in which the last expression like tag + "=%lf" is searched.
tagThe string searched and which must be followed by "=%lf".
valReturns the value after tag + "=" if there is any, otherwise undefined.
Returns
true if in str an expression such as tag + "=%lf" was found and lf could be parsed successfully, otherwise false.

◆ hasDoubleStringSetting()

static bool ml::FileListTools::DPLConfiguration::hasDoubleStringSetting ( std::string  str,
const std::string &  tag,
std::string &  str1Val,
std::string &  str2Val,
bool  replaceSpaceTags = true 
)
static

Helper function to read two space separated strings without white spaces after tag from str.

Parameters
strThe str in which the last expression like tag + "=%1023s %1023s" is searched.
tagThe string searched and which must be followed by "=%1023s %1023s".
str1ValReturns the value after tag + "=" if there is any, otherwise undefined. The maximum value size read is 1023 characters.
str2ValReturns the value after tag + "=" if there is any, otherwise undefined. The maximum value size read is 1023 characters.
replaceSpaceTagsIf true then all appearances of the substring "<sp>" are replaced by single spaces.
Returns
true if in str an expression such as tag + "=%1023s %1023s" was found and "=%1023s %1023s" could be parsed successfully, otherwise false.

◆ hasSingleStringSetting()

static bool ml::FileListTools::DPLConfiguration::hasSingleStringSetting ( std::string  str,
const std::string &  tag,
std::string &  strVal,
bool  replaceSpaceTags = true 
)
static

Helper function to read a single string without white spaces after tag from str.

Parameters
strThe str in which the last expression like tag + "=%1023s" is searched.
tagThe string searched and which must be followed by "=%1023s".
strValReturns the value after tag + "=" if there is any, otherwise undefined. The maximum value size read is 1023 characters.
replaceSpaceTagsIf true then all appearances of the substring "<sp>" are replaced by single spaces.
Returns
true if in str an expression such as tag + "=%1023s" was found and "=%1023s" could be parsed successfully, otherwise false.

◆ hasUIntSetting()

static bool ml::FileListTools::DPLConfiguration::hasUIntSetting ( const std::string &  str,
const std::string &  tag,
unsigned int &  val 
)
static

Helper function to read last unsigned integer argument after tag from str.

Parameters
strThe str in which the last expression like tag + "=%u" is searched.
tagThe string searched and which must be followed by "=%u".
valReturns the value after tag + "=" if there is any, otherwise undefined.
Returns
true if in str an expression such as tag + "=%u" was found and u could be parsed successfully, otherwise false.

◆ setUpDPLConfig()

void ml::FileListTools::DPLConfiguration::setUpDPLConfig ( DplConfigs  dplUsedConfig,
const std::string  dplConfigStringFld[4],
const std::string &  importFilterConfig,
const std::string &  importFilterProcessingSettings,
size_t  minNumFramesInVolume,
DPL::Logger &  logger,
DPL::Processor &  processor,
DPL::SecondPassPartitioningProvider &  addedProvider,
MLdouble  relativeDistanceTolerance,
MLdouble  absoluteDistanceTolerance,
MLdouble  positionToleranceMM,
const std::string &  seriesBasedPreprocessingCondition,
std::string  force2DPlusTCondition 
)

Sets up the import configuration for a DPL::Processor "processor".

Parameters
dplUsedConfigThe selector for the DplConfiguration to be used for importing (if it is not overridden by a non empty importFilterConfig).
dplConfigStringFldThe dpl configurations from which can be selected by dplUsedConfig.
importFilterConfigIf non empty this dpl configuration overrides the selected configuration from dplUsedConfig otherwise this is ignored.
importFilterProcessingSettingsIf non empty these settings are parsed line-wise and override importer settings if any matching ones are found.
minNumFramesInVolumeThe minimum number of frames needed to be composed to a volume.
loggerThe dpl logger in which dpl log messages are sent during import processings.
processorThe dpl processor which is going to be used for importing DICOM frames.
addedProviderA second pass partitioner for the DPL processor which allows splitting of series'.
relativeDistanceToleranceThe maximum difference between 2 slice distances in percents that does not split up a 3D volume.
absoluteDistanceToleranceThe maximum difference between 2 slice distances in mm that does not split up a 3D volume.
positionToleranceMMAbsolute tolerance in mm, added to the previous value to decide if a volume is homogeneous.
seriesBasedPreprocessingConditionOfficial documentation is: Sets the string condition representing if frames of a series should be processed for the series only. If the string is "1" or a condition evaluating to true for the frames of a series, the frames are processed per series. Currently only the value "1" is considered true, all others are considered false.
force2DPlusTConditionA DICOM tag condition string; if evaluates to true for the first image in an image set, a 2D+T image set will be created (instead of a 3D or inhomogeneous image).

Member Data Documentation

◆ DPL_DEFAULT_CONFIG0

const char* const ml::FileListTools::DPLConfiguration::DPL_DEFAULT_CONFIG0
static

String versions of the default configuration used by the DPL for composing DICOM frames to volumes.

Definition at line 60 of file mlFileListToolsDPLConfiguration.h.

◆ DPL_DEFAULT_CONFIG1

const char* const ml::FileListTools::DPLConfiguration::DPL_DEFAULT_CONFIG1
static

Definition at line 61 of file mlFileListToolsDPLConfiguration.h.

◆ DPL_DEFAULT_CONFIG2

const char* const ml::FileListTools::DPLConfiguration::DPL_DEFAULT_CONFIG2
static

Definition at line 62 of file mlFileListToolsDPLConfiguration.h.

◆ DPLUsedConfigNames

const char* const ml::FileListTools::DPLConfiguration::DPLUsedConfigNames[NUM_USED_DPL_CONFIGS]
static

String names corresponding to the selectable DPL configurations.

Definition at line 55 of file mlFileListToolsDPLConfiguration.h.


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