[Insight-users] DICOM I/O Questions
Luis Ibanez
luis . ibanez at kitware . com
Thu, 22 May 2003 21:01:54 -0400
Hi Brad,
Probably the simplest solution is for you to create
a MetaImageHeader, just as the MetaImageImporter does.
As long as your DICOM files are not using compression,
this will not require to duplicate the files on disk.
The MetaImageHeader will simply point to your DICOM
files.
The tricky aspect here is to figure out the correct
ordering for the DICOM slices. Probably in most cases
a simple 'ls' will pull all the files in the same
order as their contained slices... but there is no
guarranty. That's why to be in the safe side you
need a program like "MRIConvert" which does a more
throughtly analysis of the DICOM files to make sure
they are ordered correctly.
A typical MetaImageHeader grouping DICOM files will
look like:
NDims = 3
DimSize = 512 512 189
ElementSpacing = 0.703125 0.703125 1.2
Position = -0.125 -0.125 -0.125
ElementByteOrderMSB = False
ElementType = MET_SHORT
HeaderSize = -1
ElementDataFile = LIST
im0001.dcm
im0002.dcm
im0003.dcm
im0004.dcm
im0005.dcm
im0006.dcm
im0007.dcm
im0008.dcm
im0009.dcm
im0010.dcm
im0011.dcm
im0012.dcm
im0013.dcm
im0014.dcm
im0015.dcm
im0016.dcm
...
...
As yo can see, you don't really need to convert
your data to another format. The ImageFileReader
will be able to read the DICOM slices if you
pass the filename of the MetaImageHeader to it.
Regards,
Luis
======================================================
Brad Davis wrote:
> Hi Luis,
>
> Thanks for the reply. I looked at the postings. With the application
> I'm building, I can't count on the users having access to a conversion
> program (or being able to use a conversion program). They would have
> access to a directory of dicom files like the one intended for
> MetaImageImporter. I'm sure other people have had this problem. Is
> there an intended way to do this without conversion to another format,
> ie just using itk image io.
>
> thanks
> -brad
>
> Luis Ibanez wrote:
>
>> Hi peter,
>>
>> Please look at the recent postings:
>>
>> http://www . itk . org/pipermail/insight-users/2003-May/003716 . html
>> http://www . itk . org/pipermail/insight-users/2003-May/003718 . html
>>
>>
>> Regards,
>>
>>
>> Luis
>>
>>
>> --------------------
>> Peter Lorenzen wrote:
>>
>>> Hi All,
>>>
>>> I am posting this question for a colleague who, for some reason,
>>> appears to have been dropped from the ITK mailing list.
>>>
>>> Question: what is the best way to read a directory full of 2d dicom
>>> images into a 3d image volume?
>>>
>>> Thanks,
>>>
>>> - Peter
>>>
>>> --
>>> Peter J. Lorenzen
>>> Ph.D. Student
>>> Department of Computer Science
>>> University of North Carolina at Chapel Hill
>>> Sitterson Hall 268, Campus Box 3175
>>> Chapel Hill, NC 27599-3175
>>>
>>> TEL (919) 962-1879
>>> FAX (919) 962-1699
>>> E-MAIL lorenzen at cs . unc . edu
>>> WEB PAGE http://www . cs . unc . edu/~lorenzen
>>>
>>> _______________________________________________
>>> Insight-users mailing list
>>> Insight-users at public . kitware . com
>>> http://public . kitware . com/mailman/listinfo/insight-users
>>>
>>
>>
>>
>
>
>