[Insight-developers] RE: [Insight-users] load a CT scan (DICOM)

Miller, James V (Research) millerjv@crd.ge.com
Fri, 13 Sep 2002 14:22:08 -0400


I guess I just don't understand.  Isn't the slice number / (table) location
information in the DICOM header.

Shouldn't a user just be able to point the DICOM reader at a file, the DICOM
reader peeks into the header for the SeriesUID, then finds all the files 
in that directory that have that SeriesUID in the header, for each file, find
the slice number or table location, and put together a nice little volume
of data?

Now admittedly, it usually gets tricky with patient orientation, etc. but that
should be doable.

Now MR data will be trickier, but all the scan protocal should be in the header
and hence could be handled by the DICOM reader.



> -----Original Message-----
> From: Stephen R. Aylward [mailto:aylward@unc.edu]
> Sent: Friday, September 13, 2002 12:50 PM
> To: Alberto Bert
> Cc: insight-users@public.kitware.com
> Subject: Re: [Insight-users] load a CT scan (DICOM)
> 
> 
> 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
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
>