comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Reading DICOM images
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Reading DICOM images [message #47190 is a reply to message #47102] Wed, 25 January 2006 05:01 Go to previous messageGo to previous message
Peter Clinch is currently offline  Peter Clinch
Messages: 98
Registered: April 1996
Member
holgi0251@lycos.de wrote:

> I am trying to process DICOM-images of human lung tissue from a Siemens
> Multidetector CT-scanner. The gray-levels should range from -1000 HU to
> something like +2000. When I read the image slices ("im =
> read_dicom(filename, image_index=1) the grey levels are compressed to
> the range 0 ... 255. The situation slightly improves, when I predefine
> the variable by "im = fltarr(512,512)". But I still don“t get negative
> graylevels.

There are a few possible Gotchas in there. First up, there's actually
no such thing as a "DICOM file": what DICOM specifies is what will come
over a network connection when you ask for an image. Most people,
understandably, store files as what would come over a connection in the
same order, but there's no need to.

You need to know what the file description says is specified. CT data
is often pulled in from the basic hardware as 12 bit unsigned integers
which gives you a 4K range but will obviously /not/ allow for negative
numbers. Because the data is inherently digital it's quite unlikely to
be in a floating point representation, and it is entirely likely the
actual stored value is an unsigned or always positive integer that
you'll need to window to get the right HU value.

You may need to do a little hacking to see what the data representation
really is. It's not /too/ hard to work through a DICOM header and look
around, but that does assume you're happy doing a bit of low level byte
to byte parsing.

Pete.
--
Peter Clinch Medical Physics IT Officer
Tel 44 1382 660111 ext. 33637 Univ. of Dundee, Ninewells Hospital
Fax 44 1382 640177 Dundee DD1 9SY Scotland UK
net p.j.clinch@dundee.ac.uk http://www.dundee.ac.uk/~pjclinch/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: MODE in IDL?
Next Topic: 2D density plot *** hist_2d *** LARGE ARRAYS

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 04:16:41 PDT 2025

Total time taken to generate the page: 1.76347 seconds