DICOM convertion getting grayscale

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
rzamana
Posts: 2
Joined: 2011-10-19T09:50:19-07:00
Authentication code: 8675308

DICOM convertion getting grayscale

Post by rzamana »

I'm using the ImageMagick 6.7.3-1

Code: Select all

$ convert --version
Version: ImageMagick 6.7.3-1 2011-10-19 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP OpenCL   
When I try to convert a DICOM file, the converted file is getting all gray.

This are the DCM files that I'm using

And this is one converted image
[ ]'s

Rafael Zamana
Py, JS, Enthusiastic PHP and other languages... Developer, NERD, Human and Father...
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: DICOM convertion getting grayscale

Post by fmw42 »

Your input and output images look the same using IM display. Your viewer is probably stretching it automatically. Try auto-level to stretch the dynamic range before the output.

convert brain_001.dcm -auto-level brain_001.jpg


The above works for me on IM 6.7.3.1 Q16 Mac OSX Tiger
rzamana
Posts: 2
Joined: 2011-10-19T09:50:19-07:00
Authentication code: 8675308

Re: DICOM convertion getting grayscale

Post by rzamana »

Thanks fmw42.

This fixed my problem.
[ ]'s

Rafael Zamana
Py, JS, Enthusiastic PHP and other languages... Developer, NERD, Human and Father...
Post Reply