| 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 | { |
no test coverage detected