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

DICOM tag string handling issues #1204

Open
Punzo opened this issue May 10, 2024 · 0 comments
Open

DICOM tag string handling issues #1204

Punzo opened this issue May 10, 2024 · 0 comments

Comments

@Punzo
Copy link
Contributor

Punzo commented May 10, 2024

Reference commits and discussions

  1. Discourse thread
  2. 8418771
  3. ENH: Virtualize DICOM database #1154
  4. ENH+BUG for the visual DICOM browser #1203

Description

The current DICOM tag string handling implementation may have sneaky errors due to the storage of DICOM tags as strings. This can lead to various manifestations of bugs, especially when comparing tag strings. While storing these tags as int could address these issues, the codebase might need to support private tags in the future, necessitating a string representation.

Proposed Solution

Given these considerations, we need to:

  1. String Handling:

    • Keep the tag representation as a string to support potential private tags.
    • Ensure consistent conversion methods across the codebase to avoid string comparison issues, such as capitalization and zero-padding.
    • Add normalization for tag strings to ensure consistency in tagcache methods.
  2. Documentation:

    • Improve documentation for tagcache to describe how tag strings are formatted.
    • Update dicomTagToString method documentation to clarify string formatting expectations (and just have only one static method in the ctkDICOMDatabase class).
    • Include thorough documentation in get/set methods describing input formatting and output formats.
  3. Unit Testing:

    • Create robust unit tests for DICOM tag handling to prevent regressions.

Reference Information

A regression related to #1154 was identified in this Discourse thread and a simple fix was proposed in #1203.

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

No branches or pull requests

1 participant