Skip to content

Commit

Permalink
chore: use dcmread instead of deprecated read_file
Browse files Browse the repository at this point in the history
  • Loading branch information
IamGianluca committed Apr 5, 2024
1 parent 7c14ae9 commit ae3dc27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blazingai/vision/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from joblib import Parallel, delayed
from loguru import logger
from PIL import Image
from pydicom import filereader
from pydicom import dcmread
from pydicom.pixel_data_handlers.util import apply_voi_lut
from tqdm import tqdm

Expand Down Expand Up @@ -65,7 +65,7 @@ def convert_dicom2numpy(
) -> np.ndarray | ValueError:
# credits: https://www.kaggle.com/raddar/convert-dicom-to-np-array-the-correct-way
try:
dicom = filereader.read_file(img_path)
dicom = dcmread(img_path)
except ValueError as e:
return e

Expand Down

0 comments on commit ae3dc27

Please sign in to comment.