Updates:
Labels: -Priority-Medium Priority-High Milestone-Release1.0
Comment #4 on issue 150 by
darcy...@gmail.com: _pixel_data_numpy in
I'm not familiar with color images, but after reading a bit, I agree that
the fix looks correct, but unfortunately it is a backwards-incompatible
change, because the order of indices of pixel_array is changed
(SamplesPerPixel is moved from first index to last index). As you mention,
that would be correct for PlanarConfiguration=1, but it seems that
PlanarConfiguration of 0 is the dicom default. Code out there might have
rearranged the order to compensate, so I'm thinking to introduce this in
pydicom 1.0, where there will be other backwards incompatible changes.
While we are at it, then, a couple of thoughts. The code should not assume
PlanarConfiguration is specified, so should check ('PlanarConfiguration' in
ds) before testing it (and set a local variable to 0 if not there). Also,
there should be the correct branching for PlanarConfiguration of 1 also.