MeVisLab Toolbox Reference
mlFileListToolsDPLConfiguration.h
Go to the documentation of this file.
1// Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2// **InsertLicense** code
3//----------------------------------------------------------------------------------
6
11//----------------------------------------------------------------------------------
12#pragma once
13
14// Local includes
16
17// ML includes
18#include <mlTypeDefs.h>
19#include <FMEThirdPartyWarningsDisable.h>
20#include <set>
21#include <string>
22#include <FMEThirdPartyWarningsRestore.h>
23
24// DPL stuff
25#include <DPL_Configuration.h>
26
27namespace DPL {
28 class Logger;
29 class Processor;
30 class SecondPassPartitioningProvider;
31}
32
34
35namespace FileListTools {
36
37//----------------------------------------------------------------------------------
40//----------------------------------------------------------------------------------
42
43 public:
44
47 DPLDefaultConfig = 0,
51 NUM_USED_DPL_CONFIGS
52 };
53
55 static const char * const DPLUsedConfigNames[NUM_USED_DPL_CONFIGS];
56
60 static const char * const DPL_DEFAULT_CONFIG0;
61 static const char * const DPL_DEFAULT_CONFIG1;
62 static const char * const DPL_DEFAULT_CONFIG2;
64
65 // Constructor, creating a default initialized DPL::Configuration member and an empty set of tag ids.
66 DPLConfiguration(): _config(), _tagIdSet() {};
67
69 const DPL::Configuration &getConfig() const { return _config; }
70
72 const std::set<MLuint32> &getTagIdSet() const { return _tagIdSet; }
73
97 const std::string dplConfigStringFld[4],
98 const std::string &importFilterConfig,
99 const std::string &importFilterProcessingSettings,
101 DPL::Logger &logger,
102 DPL::Processor &processor,
103 DPL::SecondPassPartitioningProvider &addedProvider,
107 const std::string &seriesBasedPreprocessingCondition,
108 std::string force2DPlusTCondition);
109
116 static bool hasUIntSetting(const std::string &str,
117 const std::string &tag,
118 unsigned int &val);
119
126 static bool hasDoubleSetting(const std::string &str,
127 const std::string &tag,
128 double &val);
129
139 static bool hasSingleStringSetting(std::string str,
140 const std::string &tag,
141 std::string &strVal,
142 bool replaceSpaceTags=true);
143
155 static bool hasDoubleStringSetting(std::string str,
156 const std::string &tag,
157 std::string &str1Val,
158 std::string &str2Val,
159 bool replaceSpaceTags=true);
160
161 private:
162
164 DPL::Configuration _config;
165
167 std::set<MLuint32> _tagIdSet;
168};
169
170}; // end namespace FileListTools.
171
Project global and OS specific declarations.
#define MLFILE_LIST_TOOLS_EXPORT
DLL export macro definition.
Manages some DPL (DICOM Processing Library) configurations which control sorting and partitioning of ...
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.
const std::set< MLuint32 > & getTagIdSet() const
Returns all ids used in the internally defined configuration.
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.
static const char *const DPL_DEFAULT_CONFIG0
String versions of the default configuration used by the DPL for composing DICOM frames to volumes.
DplConfigs
Available selectable DPL configurations.
@ DPLUserConfig3
3rd modifiable user configuration
@ DPLUserConfig2
2nd modifiable user configuration
@ DPLUserConfig1
1st modifiable user configuration
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.
const DPL::Configuration & getConfig() const
Returns the used configuration object.
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.
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".
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
double MLdouble
Definition mlTypeDefs.h:217
Forward and includes of internally used DPL classes.
Namespace containing a number of tools and classes to scan directories for files, assign attributes t...
boost::log::sources::severity_channel_logger< SeverityLevel > Logger