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

Invert function not working some CR images #764

Open
idemopacs opened this issue Aug 31, 2023 · 8 comments · Fixed by #786
Open

Invert function not working some CR images #764

idemopacs opened this issue Aug 31, 2023 · 8 comments · Fixed by #786
Assignees

Comments

@idemopacs
Copy link

idemopacs commented Aug 31, 2023

Describe the Bug

I am facing issue with Invert / Reset function with some of CR images.
When I apply the invert function to the image with below code , image is getting invert
const { invert } = viewport.getProperties();
viewport.setProperties({ invert: !invert });
viewport.render();

but after that if I reset viewport properties , Invert property of image is not getting reset
viewport.resetCamera();
viewport.resetProperties();

After loading image in viewport if I check the Invert property of image , I am getting value as 'true'.
const { invert } = viewport.getProperties();

Steps to Reproduce

CRInvertIssue.zip

  1. Copy attached files to tools example folder 'tools\examples\local'.
  2. run example 'yarn run example local'
  3. Load the attached image
  4. Click Invert button
  5. Click Reset button

The current behavior

After clicking Invert button image is getting inverted but after clicking Reset button Invert property of image is not getting reset

The expected behavior

Invert property of Image should be reset.

OS

Windows 10

Node version

v16.17.1

Browser

Chrome 114.0.5735.134

@idemopacs
Copy link
Author

@jbocce , have you checked this issue?

Thanks
idemopacs

@jbocce
Copy link
Collaborator

jbocce commented Sep 18, 2023

@idemopacs
Copy link
Author

@jbocce , @sedghi

I have upgraded cornerstoneJS from V1.19.1 to latest V1.27.1 and this issue is reappearing.
Please check the example attached in above post with latest V1.27.1

Thanks

@jbocce
Copy link
Collaborator

jbocce commented Oct 30, 2023

@idemopacs, thanks for bringing this to our attention. I have also just confirmed that it is indeed reappearing..

@Max-Kharitonov
Copy link

@jbocce I this issue with Photometric Interpretation. So MONOCHROME1 should be inverted by deafult.
and it looks that when we are reseting viewport stackviewport doesn`t care about it.
https://dicom.innolitics.com/ciods/rt-dose/image-pixel/00280004

@jbocce
Copy link
Collaborator

jbocce commented Nov 13, 2023

@Max-Kharitonov, are you saying that this is still an issue for you? If so, if possible, please provide fully anonymized DICOM data that demonstrates the problem. Thank you.

@Max-Kharitonov
Copy link

1out.json
@jbocce

@jbocce
Copy link
Collaborator

jbocce commented Nov 20, 2023

Thanks @Max-Kharitonov. Could you please provide the actual anonymized DICOM file instead? Thanks.

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