Skip to content

Fix qSPECT DICOM pixel scaling, acquisition timestamps, and saving - #122

Merged
plesqui merged 3 commits into
devfrom
fix/qspect-dicom-time
Nov 3, 2026
Merged

plesqui merged 3 commits into
devfrom
fix/qspect-dicom-time

Conversation

@plesqui

@plesqui plesqui commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Correct three issues in qSPECT DICOM conversion:

  • Apply input real-world or rescale pixel mappings before converting to Bq/mL, validate unsupported mappings, and record the applied scaling in the conversion summary.
  • Use acquisition date/time to determine the scan timestamp and elapsed time since injection.
  • Explicitly set signed pixel-value metadata to prevent DICOM saving errors.
    Includes regression tests for pixel mapping, acquisition timestamps, and signed pixel metadata.

Apply linear RealWorldValueMappingSequence values to stored pixels before
converting counts to Bq/mL, with RescaleSlope and RescaleIntercept as a
fallback and identity mapping when neither is present.

Reject incomplete, nonlinear, or conflicting real-world mappings, report
the applied mapping in the conversion summary, and add regression tests.
@plesqui
plesqui requested a review from xchou1011 November 3, 2026 21:45
@plesqui
plesqui merged commit aa26500 into dev Nov 3, 2026
5 checks passed
@plesqui
plesqui deleted the fix/qspect-dicom-time branch November 3, 2026 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants