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

Method DoRead

Modules/Core/src/IO/mitkItkImageIO.cpp:525–555  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

523 }
524
525 std::vector<BaseData::Pointer> ItkImageIO::DoRead()
526 {
527 std::vector<BaseData::Pointer> result;
528
529 auto image = LoadRawMitkImageFromImageIO(this->m_ImageIO, this->GetLocalFileName());
530
531 const itk::MetaDataDictionary& dictionary = this->m_ImageIO->GetMetaDataDictionary();
532
533 //meta data handling
534 auto props = ExtractMetaDataAsPropertyList(this->m_ImageIO->GetMetaDataDictionary(), this->GetMimeType()->GetName(), this->m_DefaultMetaDataKeys);
535 for (auto& [name, prop] : *(props->GetMap()))
536 {
537 image->SetProperty(name, prop);
538 }
539
540 // Handle UID
541 if (dictionary.HasKey(PROPERTY_KEY_UID))
542 {
543 itk::MetaDataObject<std::string>::ConstPointer uidData = dynamic_cast<const itk::MetaDataObject<std::string>*>(dictionary.Get(PROPERTY_KEY_UID));
544 if (uidData.IsNotNull())
545 {
546 mitk::UIDManipulator uidManipulator(image);
547 uidManipulator.SetUID(uidData->GetMetaDataObjectValue());
548 }
549 }
550
551 MITK_INFO << "...finished!";
552
553 result.push_back(image.GetPointer());
554 return result;
555 }
556
557 AbstractFileIO::ConfidenceLevel ItkImageIO::GetReaderConfidenceLevel() const
558 {

Callers 1

ReadMethod · 0.45

Calls 8

GetLocalFileNameMethod · 0.80
IsNotNullMethod · 0.80
GetPointerMethod · 0.80
GetNameMethod · 0.45
GetMimeTypeMethod · 0.45
SetPropertyMethod · 0.45
GetMethod · 0.45
SetUIDMethod · 0.45

Tested by

no test coverage detected