[BitBucket user: Sébastien Jodogne] [BitBucket date: 2017-03-31.09:40:18] See the following discussion on the forum: https://groups.google.com/d/msg/orthanc-users/V5jCSXNgu0w/raYSUx26AQAJ "MONOCHROME1" and "MONOCHROME2" are currently taken as synonyms by Orthanc, whereas "MONOCHROME1" should map the lowest value as white instead of black. Two sample images are attached. Here is a sample Matlab/Octave script that does the expected calculation: ``` monochrome1 = 'bcdd600a-a6a9c522-5f0a6e84-8657c9f3-b76e59b7'; size1 = [ 2010 2446 ]; monochrome2 = 'f00947b7-f61f7164-c93414d1-c6fbda6a-9e92ed20'; size2 = [ 1572 2010 ]; function image = LoadImage(id, size) # Download the raw pixel data raw = urlread([ 'http://localhost:8042/instances/' id '/content/PixelData/0' ]); # Write it to some temporary file f = fopen('tmp', 'wb'); fwrite(f, raw); fclose(f); # Load back as a Matlab matrix f = fopen('tmp', 'r'); image = fread(f, size, 'uint16'); fclose(f); endfunction colormap(gray); a = LoadImage(monochrome1, size1); imagesc((max(max(a)) - a)') #a = LoadImage(monochrome2, size2); imagesc(a') # Monochrome1 (chest): Raw background is white, should be rendered as black => invert # Monochrome2 (key): Raw background is white, should be rendered as white ```
Created attachment 87 [details] Monochrome1.dcm
Created attachment 88 [details] Monochrome2.dcm
[BitBucket user: Sébastien Jodogne] [BitBucket date: 2017-03-31.09:42:42] As a temporary workaround, it is possible to use the "invert contrast" button in the Orthanc Web Viewer: ![Invert.png](4027862789-Invert.png)
Created attachment 94 [details] 4027862789-Invert.png
[BitBucket user: Sébastien Jodogne] [BitBucket date: 2017-06-09.14:14:58] Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1) → https://hg.orthanc-server.com/orthanc/changeset/e002430baa41