Read a numeric DICOM tag at (timestep, slice). Returns NaN if the tag is absent at that slot or cannot be parsed.
| 216 | // Read a numeric DICOM tag at (timestep, slice). Returns NaN if the tag |
| 217 | // is absent at that slot or cannot be parsed. |
| 218 | double ReadNumericTagAt(const mitk::DICOMProperty* prop, |
| 219 | mitk::TimeStepType t, |
| 220 | mitk::SlicedData::IndexValueType s) |
| 221 | { |
| 222 | if (nullptr == prop) return std::numeric_limits<double>::quiet_NaN(); |
| 223 | const std::string raw = prop->GetValue(t, s, true, true); |
| 224 | if (raw.empty()) return std::numeric_limits<double>::quiet_NaN(); |
| 225 | return mitk::ConvertDICOMStrToValue<double>(raw); |
| 226 | } |
| 227 | |
| 228 | // Compare two OFDateTimes at second resolution: true if they represent |
| 229 | // the same wall-clock second (sub-second jitter is ignored). Used by |
no test coverage detected