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

Function ReadNumericTagAt

Modules/PET/src/mitkSUVCalculationHelper.cpp:218–226  ·  view source on GitHub ↗

Read a numeric DICOM tag at (timestep, slice). Returns NaN if the tag is absent at that slot or cannot be parsed.

Source from the content-addressed store, hash-verified

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

Callers 1

DeduceDecayCorrectionMethod · 0.85

Calls 2

GetValueMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected