Skip to content

Fix floating-point Parametric Map access - #478

Merged
CPBridge merged 1 commit into
ImagingDataCommons:masterfrom
vera-rubin:fix/float-parametric-map-access
Oct 30, 2026
Merged

CPBridge merged 1 commit into
ImagingDataCommons:masterfrom
vera-rubin:fix/float-parametric-map-access

Conversation

@vera-rubin

Copy link
Copy Markdown
Contributor

We get AttributeError from Image.get_frames() on float32/float64 Parametric Maps with a nonidentity real-world mapping. With slope 2 and intercept 1, the documented default should map [0, 1, 2, 3] to [1, 3, 5, 7]. Calling get_stored_frame() or get_stored_frames() first also fails on missing PixelRepresentation, which DICOM forbids for float pixel data. These accessors should return the original stored values.

This change initializes float input dtypes for loaded images and passes the detected pixel-data keyword through stored-frame decoding.

We've added a parameterized regression test for uint16, float32, and float64 with eager and lazy reading, and ran the existing image, Parametric Map, reader, and decoder tests.

— ChipLab

@CPBridge

Copy link
Copy Markdown
Collaborator

Hi @vera-rubin, thanks for this fix. As a note, it was a little hard to figure out from your message what the issue actually is, but I dug into it a little bit and the issues are real and your fix is appropriate.

@CPBridge
CPBridge merged commit 93dceeb into ImagingDataCommons:master Oct 30, 2026
13 checks passed
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