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

Method SetDecayTimeOverrideInSec

Modules/PET/src/mitkSUVImageFilter.cpp:368–393  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

366}
367
368void mitk::SUVImageFilter::SetDecayTimeOverrideInSec(double value)
369{
370 // Uniform and per-(timestep, slice) decay-time overrides are mutually
371 // exclusive by design. The caller must explicitly clear the map first;
372 // we refuse to silently discard it because that would mask a likely
373 // application bug (e.g. losing tree-view edits on a stray spinbox event).
374 if (m_DecayTimeOverrideMap.has_value())
375 {
376 mitkThrowException(ConflictingDecayTimeOverrideException)
377 << "SUVImageFilter::SetDecayTimeOverrideInSec: a per-(timestep, "
378 "slice) decay-time override map is already set. Call "
379 "ClearDecayTimeOverrideMap() before engaging the uniform "
380 "override.";
381 }
382 // Zero is valid (ADMIN-style: residual decay factor 2^0 = 1); a NaN would
383 // propagate to an all-NaN output and a negative duration would scale the
384 // dose upward, both silently. Reject them at the boundary.
385 if (!std::isfinite(value) || value < 0.0)
386 {
387 mitkThrowException(InvalidDecayTimeOverrideException)
388 << "SUVImageFilter::SetDecayTimeOverrideInSec: decay time must be a "
389 "finite, non-negative duration in seconds (got " << value << ").";
390 }
391 m_DecayTimeOverrideInSec = value;
392 this->Modified();
393}
394
395void mitk::SUVImageFilter::ClearDecayTimeOverrideInSec()
396{

Calls 1

ModifiedMethod · 0.45