Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pydicom.dicomdir.DicomDir deprecated, breaks dicomutils.all_modalities_metadata #129

Closed
strixy16 opened this issue Oct 23, 2024 · 0 comments · Fixed by #130
Closed

pydicom.dicomdir.DicomDir deprecated, breaks dicomutils.all_modalities_metadata #129

strixy16 opened this issue Oct 23, 2024 · 0 comments · Fixed by #130
Assignees
Labels
bug Something isn't working

Comments

@strixy16
Copy link
Collaborator

When running autopipeline --dryrun, get the following error:

Traceback (most recent call last):
  File "/Users/katyscott/Documents/RECIST-play/.pixi/envs/default/bin/autopipeline", line 5, in <module>
    from imgtools.autopipeline import main
  File "/Users/katyscott/Documents/RECIST-play/.pixi/envs/default/lib/python3.12/site-packages/imgtools/__init__.py", line 1, in <module>
    from . import io, ops, utils, pipeline
  File "/Users/katyscott/Documents/RECIST-play/.pixi/envs/default/lib/python3.12/site-packages/imgtools/io/__init__.py", line 2, in <module>
    from .loaders import *
  File "/Users/katyscott/Documents/RECIST-play/.pixi/envs/default/lib/python3.12/site-packages/imgtools/io/loaders.py", line 17, in <module>
    from ..modules import StructureSet, Dose, PET, Scan, Segmentation
  File "/Users/katyscott/Documents/RECIST-play/.pixi/envs/default/lib/python3.12/site-packages/imgtools/modules/__init__.py", line 1, in <module>
    from .segmentation import *
  File "/Users/katyscott/Documents/RECIST-play/.pixi/envs/default/lib/python3.12/site-packages/imgtools/modules/segmentation.py", line 10, in <module>
    from ..utils import array_to_image, image_to_array
  File "/Users/katyscott/Documents/RECIST-play/.pixi/envs/default/lib/python3.12/site-packages/imgtools/utils/__init__.py", line 4, in <module>
    from .dicomutils import *
  File "/Users/katyscott/Documents/RECIST-play/.pixi/envs/default/lib/python3.12/site-packages/imgtools/utils/dicomutils.py", line 63, in <module>
    def all_modalities_metadata(dicom_data: Union[pydicom.dataset.FileDataset, pydicom.dicomdir.DicomDir]) -> Dict[str, T]:
                                                                               ^^^^^^^^^^^^^^^^
AttributeError: module 'pydicom' has no attribute 'dicomdir'

From DICOMDIR reference
DicomDir is deprecated and will be removed in pydicom v3.0, use :class:~pydicom.fileset.FileSet instead.

@strixy16 strixy16 added the bug Something isn't working label Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants