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

API: Add color-flow support (GE proposal) #140

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

forderud
Copy link
Member

@forderud forderud commented Sep 11, 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/flow display 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
}

An implementation of this is found in the TestViewer GenerateBitmap function.

Screenshot

image

@forderud forderud force-pushed the cf-support branch 18 times, most recently from 2478c03 to df246fd Compare March 23, 2020 13:18
Fredrik Orderud added 5 commits May 25, 2020 15:25
Also, prefix enum values with "IMAGE_" to make room for a separate enum for color-map types.
Specify type when calling GetColorMap.
…low data

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.

Only an API update so far. Actual color-flow support will be added in a later PR.
The important part here is the TestViewer GenerateBitmap function, which serves as a reference implementation of color-flow display.
@forderud forderud marked this pull request as draft July 14, 2021 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant