1
votes

The image http://www.barre.nom.fr/medical/samples/files/MR-MONO2-16-head.gz on http://www.barre.nom.fr/medical/samples/is not converting to other image formats. I tried following commands (after extracting the dicom file):

dcm2pnm --write-png MR-MONO2-16-head   out.png
dcm2pnm +obr        MR-MONO2-16-head   out.bmp
dcm2pnm             MR-MONO2-16-head   out.pnm

It also did not work with dcmj2pnm and dcml2pnm. All of them just produce a gray box. The image otherwise is OK and is correctly read by proper dicom viewer softwares. Where is the problem and how can it be solved?

1

1 Answers

2
votes

The problem is that no windowing settings are present in the header. You need to instruct dcm2pnm to calculate a window from the histogram (+Wm) or specify windowing values to apply.

dcm2pnm +Wm +obr MR-MONO2-16-head MR-MONO2-16-head.bmp

yields a bitmap image that looks fine to me.