Skip to content

Commit

Permalink
Update to pydicom 3.0
Browse files Browse the repository at this point in the history
Address deprecation warnings.
  • Loading branch information
blowekamp committed Oct 2, 2024
1 parent b3fd3a5 commit a658847
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rap_sitkcore/read_dcm.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def _read_dcm_pydicom(filename: Path) -> sitk.Image:
img = sitk.GetImageFromArray(~arr, isVector=False)
elif ds.PhotometricInterpretation in ["YBR_FULL_422", "YBR_FULL", "RGB"]:
if ds.PhotometricInterpretation != "RGB":
from pydicom.pixel_data_handlers.util import convert_color_space
from pydicom.pixels import convert_color_space

arr = convert_color_space(ds.pixel_array, ds.PhotometricInterpretation, "RGB")

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SimpleITK >=2.1.0, <2.5.0

numpy
pydicom
pydicom>=3.0.0
requests>=2.31.0

# additional packages for pydicom to expand supported files
Expand Down

0 comments on commit a658847

Please sign in to comment.