Skip to content

Image loading from png stack is silently corrupted if number of components varies #2086

Description

@lassoan

Description

User reported corrupted loading of a frame from a series of png images. It turned out that one of the frames was RGB while all the others RGBA.

Steps to Reproduce

Load the data set provided here: https://discourse.slicer.org/t/sequence-of-pngs-getting-interlaced-artifact/14374?u=lassoan

Expected behavior

ITK should reject loading of this corrupted volume (or fix it automatically, but probably simpler and safer to reject it, with a nice descriptive error message).

Actual behavior

ITK loaded the data set and one frame of the volume was corrupted.

Reproducibility

100%

Versions

v5.1.1

Environment

C++, Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:Use_Milestone_BacklogUse "Backlog" milestone instead of label for issues without a fixed deadlinetype:BugInconsistencies or issues which will cause an incorrect result under some or all circumstances

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions