Pull a named property (attached out-of-band — e.g. the lifted vendor private datetimes from BaseDICOMReaderService, see issue #783) as a DICOMProperty so the caller can read per-(t, s) values uniformly with the standard tag-of-interest properties.
| 198 | // DICOMProperty so the caller can read per-(t, s) values uniformly with |
| 199 | // the standard tag-of-interest properties. |
| 200 | const mitk::DICOMProperty* FindNamedDICOMProperty(const mitk::IPropertyProvider* provider, |
| 201 | const std::string& propertyName) |
| 202 | { |
| 203 | if (nullptr == provider) return nullptr; |
| 204 | auto baseProp = provider->GetConstProperty(propertyName.c_str()); |
| 205 | if (baseProp.IsNull()) return nullptr; |
| 206 | return dynamic_cast<const mitk::DICOMProperty*>(baseProp.GetPointer()); |
| 207 | } |
| 208 | |
| 209 | // Parse a DICOM DT-format string ("YYYYMMDDHHMMSS[.FFFFFF][&ZZXX]") into |
| 210 | // an OFDateTime. Returns true on success. |
no test coverage detected