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

Method GetReader

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

Source from the content-addressed store, hash-verified

250 }
251
252 DICOMFileReader::Pointer CESTDICOMManualReaderService::GetReader(const mitk::StringList& relevantFiles) const
253 {
254 auto selector = mitk::DICOMFileReaderSelector::New();
255
256 const std::string mergeStrategy = this->GetOption(OPTION_NAME_MERGE()).ToString();
257
258 if (mergeStrategy == OPTION_NAME_MERGE_YES())
259 {
260 auto r = ::us::GetModuleContext()->GetModule()->GetResource("cest_DKFZ.xml");
261 selector->AddConfigFromResource(r);
262 }
263
264 selector->LoadBuiltIn3DnTConfigs();
265 selector->SetInputFiles(relevantFiles);
266
267 mitk::DICOMFileReader::Pointer reader = selector->GetFirstReaderWithMinimumNumberOfOutputImages();
268 if (reader.IsNotNull())
269 {
270 //reset tag cache to ensure that additional tags of interest
271 //will be regarded by the reader if set later on.
272 reader->SetTagCache(nullptr);
273 }
274
275 return reader;
276 }
277
278 std::vector<itk::SmartPointer<BaseData>> CESTDICOMManualReaderService::Read()
279 {

Callers

nothing calls this directly

Calls 14

GetOptionMethod · 0.95
OPTION_NAME_MERGEFunction · 0.85
OPTION_NAME_MERGE_YESFunction · 0.85
GetModuleContextFunction · 0.85
GetResourceMethod · 0.80
AddConfigFromResourceMethod · 0.80
IsNotNullMethod · 0.80
NewFunction · 0.50
ToStringMethod · 0.45
GetModuleMethod · 0.45

Tested by

no test coverage detected