Skip to content

Commit

Permalink
Merge pull request #304 from randlet/patch-2
Browse files Browse the repository at this point in the history
Use a copy of the DICOM pixel_array dataset for the DicomImage class
  • Loading branch information
jrkerns committed Jun 29, 2020
2 parents 1230dc7 + 90f08bb commit 14a5296
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pylinac/core/image.py
Expand Up @@ -704,7 +704,7 @@ def __init__(self, path: str, *, dtype=None, dpi: NumberLike=None, sid: NumberLi
if dtype is not None:
self.array = ds.pixel_array.astype(dtype)
else:
self.array = ds.pixel_array
self.array = ds.pixel_array.copy()
# convert values to HU or CU: real_values = slope * raw + intercept
is_ct_storage = self.metadata.SOPClassUID.name == 'CT Image Storage'
has_rescale_tags = hasattr(self.metadata, 'RescaleSlope') and hasattr(self.metadata, 'RescaleIntercept')
Expand Down

0 comments on commit 14a5296

Please sign in to comment.