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

DICOM: wrong inversion for 16bit MONOCHROME1 when WindowCenter and WindowWidth are set #3620

Open
ballaminut opened this issue Oct 13, 2020 · 1 comment

Comments

@ballaminut
Copy link

If a DICOM image:

  • has a value for DICOM attribute (0028,1050) WindowCenter
  • has a value for DICOM attribute (0028,1051) WindowWidth
  • is MONOCHROME1
  • has two bytes per pixels
    the values of bytes are modified in a wrong way.

IMHO this is due to a wrong calculation of the maxPixel value (line 415)

    long maxPixelValue = maxPixelRange + (centerPixelValue/2);

probably the intended calculation was

    long maxPixelValue = centerPixelValue + (maxPixelRange/2);
@dgault
Copy link
Member

dgault commented Oct 14, 2020

Hi @ballaminut , thank you for opening the issues and starting the investigation. Do you have sample files showing these issues which we could use for testing purposes?

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