# Import displays Dicom Image differently in mathematica 9 and 10

Mathematica 9 (windows 10) displays image as:

mathematica 10.2 (windows 10:) displays image as:

Here is the source file:

How to achieve same display as mathematica 9? No code generated above image. Just the file was imported.

• I think we need the actual source image to figure out what might be going wrong here, not just what's displayed. Dec 4 '15 at 5:50
• @MichaelWitt uploaded source image Dec 4 '15 at 16:32

The root cause is probably that the image is a 16 bit gray-value image which needs adjustment before it can be displayed on most standard monitors (which will have 8 bit gray-values).

For some reason this mapping goes differently in Mathematica 9...

Import["https://dl.dropboxusercontent.com/u/68983831/46405725"]


... than in Mathematica 10:

A workaround would be to do the re-scaling yourself using ImageAdjust of the data component of the file:

Import["https://dl.dropboxusercontent.com/u/68983831/46405725",
{"DICOM", "Data"}][[1]] // Image // ImageAdjust


or by simply dividing by 256:

Import["https://dl.dropboxusercontent.com/u/68983831/46405725",
{"DICOM", "Data"}][[1]] /256. // Image


• Probably you mean dividing by 255. because channel values for images of type "Byte" in Mathematica run from 0 to 255. Dec 6 '15 at 13:44
• @AlexeyPopkov no, division by 256 is right shifting by 8 bits, and since the dicom image is 16 bit, this scales back to 8 bits. Dec 6 '15 at 14:21