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

Function ResolveHalfLifeSeconds

Modules/PET/src/mitkSUVCalculationHelper.cpp:560–573  ·  view source on GitHub ↗

Resolve the half-life: use the caller-supplied value if finite, otherwise fall back to item 0 of the Radiopharmaceutical Information Sequence. Returns NaN if neither source yields a half-life. Multi-tracer callers should always supply the resolved half-life explicitly so the selection matches their tracer-index choice.

Source from the content-addressed store, hash-verified

558 // callers should always supply the resolved half-life explicitly so the
559 // selection matches their tracer-index choice.
560 double ResolveHalfLifeSeconds(const mitk::IPropertyProvider* provider,
561 double providedHalfLifeSeconds)
562 {
563 if (std::isfinite(providedHalfLifeSeconds) && providedHalfLifeSeconds > 0.0)
564 {
565 return providedHalfLifeSeconds;
566 }
567 const auto infos = mitk::GetRadiopharmaceuticalInfos(provider);
568 if (infos.empty())
569 {
570 return std::numeric_limits<double>::quiet_NaN();
571 }
572 return infos[0].halfLifeSeconds;
573 }
574}
575
576// "Step 1" .. "Step 4" in the comments below refer to the canonical

Callers 1

DeduceDecayCorrectionMethod · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected