Skip to content

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

Open
@xianghui-formuslabs

Description

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

zivy

zivy commented on Jan 9, 2025

@zivy
Member

Hello @xianghui-formuslabs,

This bug has been traced to ITK and the underlying GDCM library. A bug report was created on the GDCM issue tracker and hopefully @malaterre will address or provide guidance on how we can address the issue.

@dzenanz, should this also open an issue on the ITK tracker? I don't think so as this is a GDCM issue, but just bringing it to your attention.

dzenanz

dzenanz commented on Jan 9, 2025

@dzenanz
Collaborator

Either is fine - opening an issue in ITK which links here, or skipping that step. Either way, let's update GDCM as soon as this issue is fixed.

blowekamp

blowekamp commented on Jan 9, 2025

@blowekamp
Member

Hello @xianghui-formuslabs,

This bug has been traced to ITK and the underlying GDCM library. A bug report was created on the GDCM issue tracker and hopefully @malaterre will address or provide guidance on how we can address the issue.

@dzenanz, should this also open an issue on the ITK tracker? I don't think so as this is a GDCM issue, but just bringing it to your attention.

Nice job tracking down the issue.

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

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