DIAGNijmegen / rse-panimg

Conversion of medical images to MHA and TIFF.
Apache License 2.0
13 stars 5 forks source link

ZeroDivisionError in dicom.py #74

Closed jmsmkn closed 2 years ago

jmsmkn commented 2 years ago

Uncaught ZeroDivisionError can in L173 of dicom.py - @nlessmann could you solve this as part of #71 ?

  File "panimg/panimg.py", line 90, in _convert_directory
    _convert_directory(
  File "panimg/panimg.py", line 116, in _convert_directory
    builder_result = _build_files(
  File "panimg/panimg.py", line 148, in _build_files
    for result in builder(files=files):
  File "panimg/image_builders/dicom.py", line 434, in image_builder_dicom
    studies = _validate_dicom_files(files=files, file_errors=file_errors)
  File "panimg/image_builders/dicom.py", line 173, in _validate_dicom_files
    elif len(headers) % n_time > 0: