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

Window Dicom Element Freezes Webpage On iOS Devices (Blazor) #1568

Open
allanhitch opened this issue Dec 7, 2023 · 3 comments
Open

Window Dicom Element Freezes Webpage On iOS Devices (Blazor) #1568

allanhitch opened this issue Dec 7, 2023 · 3 comments
Labels
question Further information is requested
Milestone

Comments

@allanhitch
Copy link

allanhitch commented Dec 7, 2023

When displaying any dicom our webpage becomes unresponsive on all iOS devices (tested with an iPad10 and iPhone14pro) until the popup is closed. The viewer is responsive on android and desktop devices. This is being rendered on a Blazor window popup.

Code to display the dicom:

<div id="@($"dwv:{_fileName}{Index}")">
    <div id='layerGroup0'></div>
</div>

JS Invoke call:

var stream = new DotNetStreamReference(await response.Content.ReadAsStreamAsync());
await JS.InvokeVoidAsync("loadDicomFile", $"dwv:{_fileName}{Index}", stream);

loadDicomFile JS:

const arrayBuffer = await contentStreamRef.arrayBuffer();
const app = new dwv.App();

const viewConfig0 = new dwv.ViewConfig('layerGroup0');
const viewConfigs = { '*': [viewConfig0] };

const options = new dwv.AppOptions(viewConfigs);
options.tools = { WindowLevel: new dwv.ToolConfig() };

app.init(options);

app.addEventListener('load', function () {
    app.setTool('WindowLevel');
});

app.loadImageObject([{ name: "", filename: "", data: arrayBuffer }]);
@ivmartel ivmartel added the question Further information is requested label Dec 11, 2023
@allanhitch
Copy link
Author

  • Using .Net 8

  • Blazor

  • DevExpress controls

  • Seeing high CPU usage on PC when using any browser.

  • Spikes from 1-3% to ~20% CPU usage for the tab when opening the windowed Dicom.

  • Spike in CPU only starts once mouse click and drag to adjust contrast and opacity begins.

  • CPU usage drops back to normal range once user stops adjusting

  • Theory is the mobile/tablet devices can't handle the spike in resource usage.

  • Similar popup windows do not spike CPU usage

Screenshot 2023-12-11 094303
Screenshot 2023-12-11 094549

@ivmartel
Copy link
Owner

Windowing can be costly, it gets worse with large data (high number of columns and rows). What size is the data you are loading?
I mainly use Firefox and Chrome, it's been some time I did not test with Safari or Edge.

@ivmartel ivmartel added this to the 0.34.0 milestone Dec 18, 2023
@allanhitch
Copy link
Author

I just tested Firefox on the iPhone with the same results. The DCM files are all around 8-9 MB in size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants