InsightSoftwareConsortium / InsightSoftwareConsortium/ITK
Image loading from png stack is silently corrupted if number of components varies
- Dominant language
- C++
- Stars
- 1.7k
- Forks
- 748
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 64
Description
### 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
Contributor guide
Assessment
This issue has not been assessed yet.