Skip to content

Check VOI LUT items against the class in PseudoColorSoftcopyPresentationState - #535

Merged
CPBridge merged 1 commit into
ImagingDataCommons:masterfrom
CedricConday:bugfix/pseudo-color-voi-lut-check
Nov 29, 2026
Merged

CPBridge merged 1 commit into
ImagingDataCommons:masterfrom
CedricConday:bugfix/pseudo-color-voi-lut-check

Conversation

@CedricConday

Copy link
Copy Markdown
Contributor

Fixes #534.

The item check for voi_lut_transformations in PseudoColorSoftcopyPresentationState.__init__ passed the argument itself as the second argument of isinstance, so any non-empty list raised TypeError: isinstance() arg 2 must be a type, a tuple of types, or a union. It now checks against SoftcopyVOILUTTransformation, as GrayscaleSoftcopyPresentationState does.

Test: test_construction_pseudo_color_with_voi_lut builds a pseudo-color presentation state with one VOI LUT transformation and checks the resulting SoftcopyVOILUTSequence, then checks that a wrong item type gives the intended TypeError message. It fails on master and passes here. The full suite passes locally (2591 passed, 8 skipped) and flake8 is clean on both files.

@CedricConday
CedricConday force-pushed the bugfix/pseudo-color-voi-lut-check branch from 532fc8f to 084050c Compare November 27, 2026 19:24

@CPBridge CPBridge left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@CPBridge
CPBridge merged commit c9c9878 into ImagingDataCommons:master Nov 29, 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.

PseudoColorSoftcopyPresentationState raises TypeError for any voi_lut_transformations

2 participants