From bb4dad72aa4b1e2ddf9bf521b1bcb5b2f21c01d9 Mon Sep 17 00:00:00 2001 From: Umar Yousafzai <39500143+uyousafzai54@users.noreply.github.com> Date: Fri, 2 Jun 2023 15:00:36 -0400 Subject: [PATCH] add stop_before_pixels tag and set to True to speed up dcm reads (#80) AYE AYE --- imgtools/utils/crawl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgtools/utils/crawl.py b/imgtools/utils/crawl.py index 732691d..666fb4d 100644 --- a/imgtools/utils/crawl.py +++ b/imgtools/utils/crawl.py @@ -25,7 +25,7 @@ def crawl_one(folder): rel_path = dcm_path.relative_to(folder_path.parent.parent) # rel_path of dicom from folder rel_posix = rel_path.parent.as_posix() # folder name + until parent folder of dicom - meta = dcmread(dcm, force=True) + meta = dcmread(dcm, force=True, stop_before_pixels=True) patient = str(meta.PatientID) study = str(meta.StudyInstanceUID) series = str(meta.SeriesInstanceUID)