InsightSoftwareConsortium / InsightSoftwareConsortium/ITK

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

Open
#2,086 1 comment 0 reactions 0 assignees View on GitHub
status:Use_Milestone_Backlog type:Bug
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.