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

[Bug] Cardiac CINE Segmentations Only Showing First Label #4789

Open
damonms opened this issue Feb 18, 2025 · 2 comments
Open

[Bug] Cardiac CINE Segmentations Only Showing First Label #4789

damonms opened this issue Feb 18, 2025 · 2 comments
Labels
Awaiting Reproduction Can we reproduce the reported bug?

Comments

@damonms
Copy link

damonms commented Feb 18, 2025

Describe the Bug

Hello All!

I am working with cardiac data. I have a ML model that I have trained that automatically identifies regions of interest on the heart. The acquisition data is the same slice position, but just done 20 different times. What I am trying to do is apply this model, generate a mask, and then generate a DICOM SEG file to load into OHIF. From there, I have some post processing I am working on implementing but I am currently stuck with what I suspect is a rendering issue.

The issue that I am facing is that, while the region of interest naturally changes as the heart expands and contracts, which I can capture with my model, and generate an associated mask/DICOM SEG file, when I load this file into OHIF, it only shows the one slice of the SEG file over every one of the 20 frames (i.e, when I scroll, the segmentation does not change, but the image does). If I open this seg file with MicroDicom, I can see that the segmentation does indeed change over time.

Steps to Reproduce

  1. Load in a CINE cardiac scan
  2. Compute an associated DICOM SEG file for one or more segments
  3. Load in the computed DICOM SEG to OHIF
  4. Scroll through the stack
  5. Notice that while the cine changes, the segmentation does not

The current behavior

Note that I just have 3 random regions of interest in the video below for debugging:

CurrentState.mp4

And here is the file in OHIF:

OHIF.mp4

There are no stack traces in the developer console, so it appears to load the segmentation without issue.

The expected behavior

I would expect each of the segments to show as computed for each slice, not just the first of each through the duration of the CINE. I am not sure if this is working as intended however, and what I am actually after is a feature enhancement.

Thanks for taking the time to look at the attached videos. Please let me know if there is anything else I can provide that would be more helpful

OS

Windows 10

Node version

v20.13.1

Browser

Chrome Version 132.0.6834.197 (Official Build) (64-bit)

@damonms damonms added the Awaiting Reproduction Can we reproduce the reported bug? label Feb 18, 2025
@sedghi
Copy link
Member

sedghi commented Feb 19, 2025

We don't currently support 4D SEG. However, it shouldn't be too difficult to implement; you could take a look at it. The logic is within the isReferenceViewable function in the viewport. This function checks if the SEG metadata matches the viewport and renders them accordingly. It seems the 4D metadata aspects are missing from that check.

@damonms
Copy link
Author

damonms commented Feb 19, 2025

Gotcha, that makes sense, thanks for pointing me in the right direction! I'll take a stab at implementing this and push it upstream if it would be of value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Reproduction Can we reproduce the reported bug?
Projects
None yet
Development

No branches or pull requests

2 participants