-
Notifications
You must be signed in to change notification settings - Fork 330
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] Rendering crashes when rendering multiple viewports at high resolution #1476
Comments
Can you check the latest OHIF viewer, which now includes Cornerstone 3D 2.0? Here are the migration guides: Try OHIF locally: https://viewer-dev.ohif.org/localbasic |
Do you have real need for 64 viewports? what is your usecase? |
I have developed a web for medical imaging film printing, which is commonly used in 8X8 format. The use of viewport is also for the convenience of adjusting individual images. Do you have any better suggestions? Thank you very much |
Can you provide a simple example of using Cornerstone3D that I can run locally? There shouldn't be any issues since we use one texture, render it offscreen, and copy it over each viewport if the image is the same. If the image differs, that might be a separate issue, possibly exceeding the WebGL maximum texture size limit. |
The following code is a minimal reproduction that can run in the cornerstone3D repo's example. When using 4K monitor scaling175%, it will crash.
|
Yeah i can see it, seems like if i make the Although i did use the setViewport API const viewportInputs = [];
for (let i = 0; i < 64; i++) {
const element = document.createElement('div');
element.style.width = '100%';
element.style.height = '100%';
gridContainer.appendChild(element);
const viewportId = `CT_STACK_${i}`;
const viewportInput: Types.PublicViewportInput = {
viewportId,
type: ViewportType.STACK,
element,
};
viewportInputs.push(viewportInput);
}
renderingEngine.setViewports(viewportInputs); |
Yes, this problem only occurs when the resolution reaches a certain size. In addition, my usage scenario mainly involves 64 different images, which is limited by the WebGL maximum texture size. Therefore, I can only rely on limiting the size of elements to avoid crashing, right? Thank you for your response. |
I guess we need to take a look at how much we can increase the resolution of one viewport until it breaks. That should be important. |
Describe the Bug
I want to use Cornerstone3D to render multiple viewports. When I increase the resolution of these viewports, I've discovered that the rendering crashes once it reaches a certain size.
Here is a minimal reproduction using cornerstone3D example. When I increased the gridContainer.style.width to 1200px. the rendering crashed. (windows11, gtx1080, edge, 4K monitor scaling175%):
Steps to Reproduce
The current behavior
There were no errors in the console, but the rendering crashed and the Cornerstone tool also malfunctioned.
![image](https://private-user-images.githubusercontent.com/45812192/369684908-5049d510-3af6-4231-921f-27ba94acdcbb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk4MTEwMTEsIm5iZiI6MTczOTgxMDcxMSwicGF0aCI6Ii80NTgxMjE5Mi8zNjk2ODQ5MDgtNTA0OWQ1MTAtM2FmNi00MjMxLTkyMWYtMjdiYTk0YWNkY2JiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE3VDE2NDUxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNhYTYxNzNmYzk4NjM0ZTI5Y2MxZDhmYjFhN2E3Yjg0NjYwOGRkZDAyMGUxM2UxM2ZhYmY2MjQzNTMxYzdjNTcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.BXT98Xgrmh4QhR277g9N63duJMdw836rC9KqeHFQSzc)
The expected behavior
It seems that the rendering crash is also related to the scaling size setting of Windows. Is there any relevant information to solve this problem or methods for identifying the problem. Thank you very much!
![image](https://private-user-images.githubusercontent.com/45812192/369684743-3e7d1b27-895d-486f-aa9b-e3e91e52675c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk4MTEwMTEsIm5iZiI6MTczOTgxMDcxMSwicGF0aCI6Ii80NTgxMjE5Mi8zNjk2ODQ3NDMtM2U3ZDFiMjctODk1ZC00ODZmLWFhOWItZTNlOTFlNTI2NzVjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE3VDE2NDUxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdhZGI1OTY5MDBjNWQ0ZGMzZjA2ODRkNWZiNGQzOTk4NDhmOTZmYjNiMjQ2NzQ5YjJlNDUyNzBkMjNiZTgzYzImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.9NsN8jMJAm1DoDKUov6KZ4NlHffh6yrYfx1GK97zuY8)
OS
Windows11
Node version
18.19.2
Browser
Edge 129.0.2792.52
The text was updated successfully, but these errors were encountered: