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

BF+ENH: Fixes to DICOM scaling, make frame filtering explicit #1342

Merged
merged 2 commits into from
Sep 5, 2024

Commits on Aug 12, 2024

  1. BF+ENH: Fixes to DICOM scaling, make frame filtering explicit

    Fixes how we handle DICOM scaling, particularly for Philips and
    multi-frame files. For Philips data scale factors without defined
    units should be avoided, and instead a private tag should be used
    to make image intensities comparable across series. For multi-frame
    DICOM, it is possible to have different scale factors (potentially
    coming from different tags) per-frame. We also prefer scale factors
    from a RealWorldValueMapping provided they have defined units.
    
    The base Wrapper class now has a few new attributes and methods to
    support this functionality. In particular an attribute `scale_factors`
    that provides an array of slope/intercept pairs, and a method
    `get_unscaled_data` that will return the reordered/reshaped data but
    without the scaling applied. A `vendor` attribute was also added
    to better support vendor-specific implementation details.
    
    For the MultiFrameWrapper I also added an attribute `frame_order`
    which exposes the order used to sort the frames, and use this
    to return the `scale_factors` in sorted order. While implementing
    this I kept bumping into issues due to the (implicit) frame filtering
    that was happening in the `image_shape` property, so I made this
    filtering explicit and configurable and moved it into the class
    initialization.
    moloney committed Aug 12, 2024
    Configuration menu
    Copy the full SHA
    fd56bf4 View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2024

  1. Configuration menu
    Copy the full SHA
    f0264ab View commit details
    Browse the repository at this point in the history