When performing a Winston Lutz analysis on an image set where the images don't get inverted, a ValueError: output array is read-only exception gets thrown.
To Reproduce
Run WL analysis with attached image set.
Additional context
The reason it occurs is because the DicomImage class sets the array attribute to the dicom dataset pixel_array attribute (here)which is read only. Since it's read only self.array -= min_value in ground (here) triggers the ValueError. The demo image doesn't trigger the same issue because self.array is reassigned in invert (here.
Describe the bug
When performing a Winston Lutz analysis on an image set where the images don't get inverted, a
ValueError: output array is read-only
exception gets thrown.To Reproduce
Run WL analysis with attached image set.
Additional context
The reason it occurs is because the DicomImage class sets the
array
attribute to the dicom datasetpixel_array
attribute (here)which is read only. Since it's read onlyself.array -= min_value
inground
(here) triggers the ValueError. The demo image doesn't trigger the same issue becauseself.array
is reassigned ininvert
(here.PR incoming.