MCPcopy Create free account
hub / github.com/MITK/MITK / TransferOption

Function TransferOption

Modules/CEST/autoload/IO/mitkCESTGenericDICOMReaderService.cpp:166–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164 }
165
166 void TransferOption(const mitk::IFileIO::Options& sourceOptions, const std::string& sourceName, mitk::IFileIO::Options& options, const std::string& newName)
167 {
168 auto sourceFinding = sourceOptions.find(sourceName);
169 auto finding = options.find(newName);
170
171 bool replaceValue = finding == options.end();
172 if (!replaceValue)
173 {
174 replaceValue = us::any_cast<double>(finding->second) == 0.;
175 }
176
177 if (sourceFinding != sourceOptions.end() && us::any_cast<double>(sourceFinding->second) != 0. && replaceValue)
178 {
179 options[newName] = sourceFinding->second;
180 }
181 }
182
183 void TransferMergeOption(const mitk::IFileIO::Options& sourceOptions, const std::string& sourceName, mitk::IFileIO::Options& options, const std::string& newName)
184 {

Callers 2

GetOptionsMethod · 0.85
ReadMethod · 0.85

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected