Skip to content

Commit

Permalink
add stop_before_pixels tag and set to True to speed up dcm reads (#80)
Browse files Browse the repository at this point in the history
AYE AYE
  • Loading branch information
uyousafzai54 committed Jun 2, 2023
1 parent d99950f commit bb4dad7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imgtools/utils/crawl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit bb4dad7

Please sign in to comment.