[Insight-users] load a CT scan (DICOM)
Stephen R. Aylward
aylward@unc.edu
Fri, 13 Sep 2002 12:49:41 -0400
Hi,
The answer may be simple...Sometimes dicom transfers occur in order - so
the file numbers actually correspond (by luck) to how the slices should
be ordered to create a 3D volume.
In that case, you can use the MetaImage format to read the dicom slices
to create a volume. You can use the Insight/Example/MetaImageImporter
to walk you thru the process to create a MetaImage header file that will
allow the slices to be loaded. Or you can write the MetaImage header
file yourself. The MetaImage header format is simple and will resemble
NDims = 3
DimSize = 512 512 <Enter#OfSlicesHere>
ElementSpacing = <EnterXPointSize> <EnterYPointSize> <EnterSliceSpacing>
HeaderSize = -1
ElementType = MET_USHORT
ElementByteOrderMSB = True
ElementDataFile = LIST
<EnterFileNameOfFirstSlice>
<EnterFileNameOFSecondSlice>
<EnterFileNameOfThirdSlice>
.
.
.
This is assuming the slices are 512x512 (most CT scans) of Unsigned
Shorts (valid for most CT dicom), and the Byte Ordering is MSB (the
default for most dicom). By setting HeaderSize = -1 the program will
automatically calculate the header size for each slice under the
assumption that the pixel data occurs at the end of each slice's file
(which is generally true for dicom).
HOWEVER, DICOM does not guarantee order of delivery of slices - so, the
file numbering might be absolutely unrelated to how the slices should be
ordered to create a 3D volume. You can try to figure out the ordering,
but that is really tedious. Otherwise, we are working on a program to
automatically generate 3D MetaImages from a directory of dicom files.
It may be a few weeks before that program is ready.
I hope this helps,
Stephen
Alberto Bert wrote:
> Hi all,
>
> I'm interested in loading a CT (comput. tomography) scan in itk.
> I know that DicomImageIO can get DICOM file (medical images standard
> format), but in this case each slice (2D images at specified z, forming
> the 3D image when in stak) is in a separate file. I mean, I would like
> to read several 2D DICOM files (each containing a slice) and organizing
> them to form a 3D image for itk.
>
> Any one can help me?
>
> Alberto
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
--
===============================================
Dr. Stephen R. Aylward
Assistant Professor of Radiology
Adjunct Assistant Professor of Computer Science
http://caddlab.rad.unc.edu
aylward@unc.edu
(919) 966-9695