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] Error: Failed to normalize the multiframe dataset, the data is not multi-frame #4549

Open
victormylle-dm opened this issue Nov 26, 2024 · 5 comments
Assignees
Labels
Awaiting Data to Reproduce The maintainers have requested anonymized data to reproduce the issue.

Comments

@victormylle-dm
Copy link

victormylle-dm commented Nov 26, 2024

Describe the Bug

I have an issue with OHIF 3.8.5, when I want to segment a patient, the brush becomes very laggy and no segmentation is done. This doesn't happen with all patient, most of them work fine. I tried updating OHIF to version 3.9.0 and 3.9.1, which resolved the laggy brush issue. Now I am able to create segmentation for all patients but when trying to save the segmentation it gives an error:

Route /segmentation Error Boundary
Error: Failed to normalize the multiframe dataset, the data is not multi-frame. — null "Route /segmentation"

Now, i am not able to segment any patient anymore, all of them fail when trying to save.

Steps to Reproduce

  1. Segment patient
  2. Save patient

The current behavior

In Bug description

The expected behavior

The brush should not be laggy and segmentations should be saved properly.

OS

macOS 15.1

Node version

18.16.1

Browser

Safari 18.1, Firefox 132.0.2

@victormylle-dm victormylle-dm added the Awaiting Reproduction Can we reproduce the reported bug? label Nov 26, 2024
Copy link
Member

sedghi commented Nov 26, 2024

This is not enough detail for bug report. Can you give us videos, images, or data?

@victormylle-dm
Copy link
Author

I won't be able to provide you with the data but I have screen recordings. The first one is a screen recording of the behavior in version 3.8.5 and the second one is the behavior in version 3.9.1. You can see that the segmentation does not work in 3.8.5 while it works in 3.9.1. But then when I want to save the segmentation, an error occurs. The error occurs for every patient (not only the ones that did not work in 3.8.5)

OHIF.3.8.5.mov
OHIF.3.9.1.mp4

@victormylle-dm
Copy link
Author

victormylle-dm commented Dec 6, 2024

So I went deep on this issue and found where it goes wrong.

storeSegmentation: async segmentationId => {
commandsManager.run('storeSegmentation', { segmentationId });
},

Here a call to the commandsManager is done for 'storeSegmentation' without a given context.

const { commandName, commandOptions, context } = command;

Next, on this line the context is still empty. In the runCommand function, the command definition is tried to be fetched.

if (Array.isArray(contextName)) {
contexts.push(...contextName.map(name => this.getContext(name)).filter(it => !!it));
} else if (contextName) {
const context = this.getContext(contextName);
if (context) {
contexts.push(context);
}
}

The command is searched over all contexts but the same command name is used in the CORNERSTONE context and SEGMENTATION context. A for loop is done over these contexts so the storeSegmentation of the SEGMENTATION context will be run. This function, however, requires a datasource as argument but this is never given. The CORNERSTONE storeSegmentation will call the SEGMENATION context command and gives it the datasource argument.

I think we want the CORNERSTONE storeSegmentation to be called first.

I did a dirty fix by replacing:

storeSegmentation: async segmentationId => {
commandsManager.run('storeSegmentation', { segmentationId });
},

with

storeSegmentation: async segmentationId => { commandsManager.run({commandName: 'storeSegmentation', context: 'CORNERSTONE'}, { segmentationId }, ); },
This saves the segmentation now but the segmentation is saved in reverse!

@victormylle-dm
Copy link
Author

victormylle-dm commented Dec 10, 2024

When saving the segmentation, the segmentation is saved in reverse! The dirty fix does not work completely!

@sedghi
Copy link
Member

sedghi commented Dec 11, 2024

Without data to reproduce the issue, I can't really help. I hope you understand that the problem is related to the data.

@sedghi sedghi removed Bug Awaiting Reproduction Can we reproduce the reported bug? labels Dec 11, 2024
@sedghi sedghi added the Awaiting Data to Reproduce The maintainers have requested anonymized data to reproduce the issue. label Dec 11, 2024 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Data to Reproduce The maintainers have requested anonymized data to reproduce the issue.
Projects
None yet
Development

No branches or pull requests

2 participants