Read a date string we can use for assembling a SeriesTime / fallback injection-time date. Prefers SeriesDate (0008,0021), falls back to the AcquisitionDate at slot (0,0). Returns empty if neither is available.
| 542 | // injection-time date. Prefers SeriesDate (0008,0021), falls back to the |
| 543 | // AcquisitionDate at slot (0,0). Returns empty if neither is available. |
| 544 | std::string ResolveSeriesReferenceDate(const mitk::IPropertyProvider* provider) |
| 545 | { |
| 546 | const std::string seriesDate = |
| 547 | mitk::GetFirstDICOMValueAsString(provider, mitk::DICOMTagPath(0x0008, 0x0021)); |
| 548 | if (!seriesDate.empty()) |
| 549 | { |
| 550 | return seriesDate; |
| 551 | } |
| 552 | return mitk::GetFirstDICOMValueAsString(provider, mitk::DICOMTagPath(0x0008, 0x0022)); |
| 553 | } |
| 554 | |
| 555 | // Resolve the half-life: use the caller-supplied value if finite, |
| 556 | // otherwise fall back to item 0 of the Radiopharmaceutical Information |
no test coverage detected