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

WIP: Extend API with color-flow support - DO NOT MERGE #2

Closed
wants to merge 4 commits into from

Conversation

forderud
Copy link
Owner

@forderud forderud commented Aug 4, 2019

Proposal to extend the API to also support display of color-flow data, in addition to tissue. This is intended to be a simple representation that is compatible with the way color-flow data is processed by any vendor.

Please note that the color-flow appearance is unlikely to exactly match the appearance on the original system, since the "internal" vendor encoding and algorithms are likely to be more advanced. The goal is therefore to get visual appearance that is fairly close to the original.

Integration of this extension will probably require bidirectional code for converting between the "internal" vendor encoding and the Image3dAPI encoding of flow data.

Changes:

  • New 16bit color-flow format (8bit signed frequency value, 8bit unsigned power/bandwidth value)
  • New color-map types for "flow color" [RGB] and "flow arbitration" [FreqPow]
  • New IImage3dStream interface for grouping together "tissue" vs. "flow" frames

Tissue vs. flow algorithm:

/** Reference algorithm for displaying "tissue" vs. "flow" data for a given on-screen pixel.
    Optimized for readability, not for speed. */
static RGBA ColorLookop(uint8_t tissue_val,
                        uint16_t flow_val,
                        array<RGBA,    256>     tissue_cm,
                        array<RGBA,    256*256> flow_cm,
                        array<uint8_t, 256*256> flow_arb) {

    if (flow_arb[flow_val] > tissue_val)
        return flow_cm[flow_val]; // display flow
    else
        return tissue_cm[tissue_val]; // display tissue
}

Assumptions

  • Straight-forward to convert "internal" flow representation to the proposed format in the loader.
  • Straight-forward to integrate proposed format into a PACS system that might use another "internal" format for flow data.

Fredrik Orderud added 3 commits August 5, 2019 22:44
Also, prefix enum values with "IMAGE_" to make room for a separate enum for color-map types.
Specify type when calling GetColorMap.
…low data

Proposal to extend the API to also support display of color-flow data, in addition to tissue. This is intended to be a simple representation that is compatible with the way color-flow data is processed by any vendor.

Please note that the color-flow appearance is unlikely to exactly match the appearance on the original system, since the "internal" vendor encoding and algorithms are likely to be more advanced. The goal is therefore to get visual appearance that is fairly close to the original.

Integration of this extension will probably require bidirectional code for converting between the "internal" vendor encoding and the Image3dAPI encoding of flow data.
@forderud
Copy link
Owner Author

Have now published the API proposal on MedicalUltrasound#140 . Therefore, closing this PR.

@forderud forderud closed this Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant