[Insight-users] Dicom slice position

Jolinda Smith jolinda at darkwing . uoregon . edu
Thu, 3 Jul 2003 17:10:53 -0700


Hi George,

As far as I know ITK does not include functions for reading arbitrary
DICOM tags. Your options are to either use a dicom library such as
DCMTK, or start from scratch using the DICOM standard. Having done the
latter, I recommend the former! I'd give you a quick answer on how to
read DICOM tags, but I'm afraid there isn't one. It's not a simple
format -- the standard is over 1000 pages long. (I can give a long
answer if you really want it.)

If you need your application to read DICOM files directly, check out
DCMTK. I haven't used it, but it's supposed to be very good. But if you
can stand to read metaimage volumes instead, your life will be a lot
easier.

BTW, I don't know how general your application is, but there are some
sequences that produce multiple images per slice. If you need to handle
such sequences, you'll need to identify what slice goes with what
volume. Some scanners and sequences use the "temporal position id" for
this, but other cases have to be dealt with on a sequence-by-sequence
basis.

Jolinda

----- Original Message ----- 
From: "Iordanescu, Gheorghe (NIH/CC/DRD)" <GIordanescu at cc . nih . gov>
To: "'Jolinda Smith'" <jolinda at darkwing . uoregon . edu>;
<insight-users at itk . org>
Sent: Thursday, July 03, 2003 4:05 PM
Subject: RE: [Insight-users] Dicom slice position


> Jolinda,
>
> Thank you very much for your reply. The information you gave me is
very
> useful but I still need some help. I already have a code that reads
Dicom
> images and finally gives me an ITK image. I was interested though in
using
> ITK classes to do this. All the code is there - I only need some
guidance on
> how to extract the necessary fields. Instead of writing the info from
the
> dicom header in a txt file on the disk, I would like to use it and
build the
> 3d ITK image. I think this would be a big improvement for our code...
>
> George
>
>
>
> -----Original Message-----
> From: Jolinda Smith [mailto:jolinda at darkwing . uoregon . edu]
> Sent: Thursday, July 03, 2003 6:36 PM
> To: insight-users at itk . org
> Subject: Re: [Insight-users] Dicom slice position
>
> Hi George,
>
> Just a quick note -- be very careful of the "slice thickness" and
"slice
> spacing" fields. Slice spacing is supposed to be the center-to-center
> distance between slices, but in reality it's meaning is
scanner-dependent.
> "Image number" will not necessarily help either. What you can trust
are the
> "Image Orientation Patient" and "Image Position Patient" fields. You
can use
> the first to calculate the slice normal, and the second to calculate
the
> position of the slice along the slice normal (as well as the distance
> between adjacent slices).
>
> Or, you could use my program MRIConvert, which does all that for you.
>
> Jolinda Smith
> Lewis Center for NeuroImaging
> University of Oregon
> jolinda at uoregon . edu
> http://lcni . uoregon . edu/~jolinda/MRIConvert
> ----- Original Message ----- 
> From: Iordanescu, Gheorghe (NIH/CC/DRD)
> To: 'insight-users at itk . org'
> Sent: Wednesday, July 02, 2003 10:22 AM
> Subject: [Insight-users] Dicom slice position
>
> Hi everybody,
>
> I would like to read a sequence of Dicom images in a volume.
Unfortunately
> the images' names do not correspond to their order in space. For this
I
> would like to read from each image header the "Image number", "Patient
> position", "slice thickness".and "pixel spacing". Does anybody have an
> example of how to read these fields from a dicom header? Thank you
very
> much.
>
> George
>