InsightSoftwareConsortium / ITK

Insight Toolkit (ITK) -- Official Repository. ITK builds on a proven, spatially-oriented architecture for processing, segmentation, and registration of scientific images in two, three, or more dimensions.
https://itk.org
Apache License 2.0
1.4k stars 663 forks source link

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

Open lassoan opened 3 years ago

lassoan commented 3 years ago

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

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.