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

Home » Public Forums » archive » Re: pixel size in 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: pixel size in DICOM images [message #52697 is a reply to message #52696] Tue, 27 February 2007 06:54 Go to previous messageGo to previous message
Mike[2] is currently offline  Mike[2]
Messages: 99
Registered: December 2005
Member
On Feb 27, 9:32 am, Peter Clinch <p.j.cli...@dundee.ac.uk> wrote:
> As far as I can tell the QUERY_DICOM routine doesn't actually tell me
> the pixel size (i.e., mm in the original target, not number of pixels
> making up the image) of an image. Which is a shame, as I'd really like
> to know what that is!
>
> Have I got that wrong, or are there any suggestions from The Team as to
> how I'd most easily go about getting that?

To get the pixel size and image dimensions, you can use IDLffDICOM:

IDL> dcm = obj_new('IDLffDICOM')
IDL> var = dcm->read(filename)
IDL> Nx = *(dcm->getvalue('0028'x,'0010'x))[0]
IDL> Ny = *(dcm->getvalue('0028'x,'0011'x))[0]
IDL> pixel_size = *(dcm->getvalue('0028'x,'0030'x))[0]
IDL> help, Nx, Ny, pixel_size
NX UINT = 512
NY UINT = 512
PIXEL_SIZE STRING = '0.9765625\0.9765625 '
IDL> print, float(strsplit(pixel_size, '\', /extract))
0.976562 0.976562

Although I often use the DICOM standard to look up group/element
pairs, it is even easier to use IDLffDICOM::dumpelements:

IDL> dcm->dumpelements

Regards, Mike
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: pixel size in DICOM images
Next Topic: Help with georeferencing using envi

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

Current Time: Sat Oct 11 02:44:19 PDT 2025

Total time taken to generate the page: 1.12347 seconds