Skip to content

GetGDCMSeriesFileNames() returns list not in order when feed with data containing duplicate slices #2176

Description

@xianghui-formuslabs

Describe the bug

series_reader = sitk.ImageSeriesReader()
series_ids = series_reader.GetGDCMSeriesIDs(source)
series_files = {series_id: series_reader.GetGDCMSeriesFileNames(source, series_id)
                    for series_id in series_ids}

When source contains duplicate slices. The returned series_files is not in order. And no error or warning is thrown.

To Reproduce
Steps to reproduce the behavior:

  1. Operating system, version, and architecture
  • OS: Ubuntu 24.04 LTS
  • Architecture: 12th Gen Intel® Core™ i7-1265U × 12
  1. Programming language, and version
    Python 3.8.19
  2. Version of SimpleITK
    2.2.1
  3. How was SimpleITK installed?
  • binary distribution [e.g. python -m pip install SimpleITK]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions