qurit / rt-utils

A minimal Python library to facilitate the creation and manipulation of DICOM RTStructs.
MIT License
191 stars 56 forks source link

Use force=True to force reading in rt_utils/image_helper.py (load_dcm_images_from_path ) #39

Open xfuren opened 2 years ago

xfuren commented 2 years ago

Sometime we have not-so-standard DICOM files.... Suggestion...

        ds = dcmread(os.path.join(root, file),force=True)
        if hasattr(ds, 'ImageOrientationPatient'):
            series_data.append(ds)
asim-shrestha commented 2 years ago

Hi xfuren, we haven't dealt with this since we dont like potentially going against the DICOM standard but we can add an optional parameter to set this

YadiHe commented 1 month ago

Maybe Ihave not-so-standard DICOM files,But ds = dcmread(os.path.join(root, file),force=True)

still: dicom_path exists: True RT Structure file found: /root/autodl-tmp/datasets/CBCT/001925CBCT/RS.001925.dcm Error reading RT Structure /root/autodl-tmp/datasets/CBCT/001925CBCT/RS.001925.dcm: No DICOM Images found in input path.

ekamperi commented 2 weeks ago

I also encountered the error:

AttributeError: 'FileDataset' object has no attribute 'ImageOrientationPatient'

from an RTSTRUCT file generated by varian eclipse 16.1. I thought those were pretty standard. No?