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] @cornerstonejs 2.0 strange renderer behavior #1586

Open
AlexMold opened this issue Nov 13, 2024 · 7 comments
Open

[Bug] @cornerstonejs 2.0 strange renderer behavior #1586

AlexMold opened this issue Nov 13, 2024 · 7 comments

Comments

@AlexMold
Copy link

Describe the Bug

Hi guys,

Appreciate your work. Help me please with found bug or wrong/insufficient implementation.

I've implemented the React app, which allows you to upload and render .dcm files.
However, faced with strange behavior, all scan projections were distinguished perfectly, but on images, vertical lines appeared that interfered with scan discovery.

Steps to Reproduce

Attaching the gist and video

The current behavior

And seems like the coronal view shifted a bit to right

https://gist.github.com/AlexMold/ad292158b27a35c04be93a9a1548cffc

https://www.loom.com/share/c8c7e90e4c434665a03590b245bc33fe?sid=76d064f5-ef24-40f1-a6a3-8cdc1d4bd781the

The expected behavior

without any lines, clear as at OHIF ;)

OS

macOS

Node version

20.13

Browser

latest Chrome, latest Firefox

@AlexMold AlexMold changed the title [Bug] Strange renderer behavior [Bug] @cornerstonejs 2.0 strange renderer behavior Nov 13, 2024
@sedghi
Copy link
Member

sedghi commented Nov 13, 2024

Hmm, weird
Could you kindly provide the data if it has been anonymized and you can confirm that there is no patient health information present in any of the headers or embedded within the pixel data?

@AlexMold
Copy link
Author

@sedghi
Copy link
Member

sedghi commented Nov 13, 2024

This looks correct in viewer.ohif.org/localbasic

CleanShot.2024-11-13.at.14.40.41.mp4

@AlexMold
Copy link
Author

I supposed so ;)
The gist of the code mostly is copy of examples
https://github.com/cornerstonejs/cornerstone3D/blob/main/packages/tools/examples/labelmapRendering/index.ts

Copy link
Member

sedghi commented Nov 13, 2024

I suspect your series includes more than one display set, and OHIF can group them into reconstructive display sets. However, Cornerstone, being a rendering library, doesn't have this capability, which explains the situation.

You can look here for how to group them https://github.com/OHIF/Viewers/blob/master/extensions/default/src/getSopClassHandlerModule.js

@AlexMold
Copy link
Author

Thanks, I will try to figure out what it doesn't mean )
I thought that distinguishing DisplayMode would be good enough.

export enum DisplayMode {
  STACK = "CT_STACK",
  VOLUME = "CT_VOLUME",
}

export const ViewportMapping = {
  CD: DisplayMode.STACK, //	Color flow Doppler 	768 x 576	8	0,442 MB
  CR: DisplayMode.STACK, //	Computed radiography 	3520 x 4280	12	30 MB	2
  DSA: DisplayMode.STACK, //	Digital Subtraction Angiography 	512 x 512	8	 	15-40
  DX: DisplayMode.STACK, //	Digital Radiography 	2048 x 2048	12	 	2
  MG: DisplayMode.STACK, //	Mammography 	4608 x 5200	14	45,7 MB	1
  US: DisplayMode.STACK, //	Ultrasound 	512 x 512	8	0,262 MB	20-240
  XA: DisplayMode.STACK, //	X-Ray Angiography 	512 x 512	16

  CT: DisplayMode.VOLUME, //	Computed tomography 	512 x 512	16	0,524 MB	40-3000
  MR: DisplayMode.VOLUME, //	Magnetic Resonance 	256 x 256	16	0,131 MB	60-3000
  NM: DisplayMode.VOLUME, //	Nuclear Medicine 	256 x 256	 	0,128 MB
  PET: DisplayMode.VOLUME, //	Positron Emission Tomography - PET 	128 x 128	 	32 MB
};

Obviously, I was wrong (

🙇‍♂️

Copy link
Member

sedghi commented Nov 13, 2024

No you need to look at the metadata of the series and try to separate the groups

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

No branches or pull requests

2 participants