[Insight-users] DICOM IMAGE READ WRITE

Luis Ibanez luis.ibanez at kitware.com
Tue Sep 23 11:11:30 EDT 2008


Hi Raghu,

DICOM files do not have a required extension.

The use of ".dcm" is an informal standard that some people have adopted.
but don't need .dcm extensions in your DICOM files in order to read them
with ITK.


What you should pay attention to is:

a) Are you reading a 3D image that is stored as a series of 2D slices
    in independent DICOM files ?

    or

b) Are you reading a 2D image stored in a single DICOM file ?

    or

c) Are you reading a 3D image stored in a single DICOM file ?


If you are doing (b) or (c) you should use the itk::ImageFileReader
and simply pass the file name as argument to SetFileName(). (no .dcm
extension needed).


If you are doing (a), then you should use the itk::ImageSeriesReader
and combine it with the itkGDCMSeriesFileNames for generating the
filenames of the DICOM series.


As Rupert indicated, examples of both methods are presented in
the ITK Software Guide:

    http://www.itk.org/ItkSoftwareGuide.pdf



   Regards,


      Luis



------------------
RAGHU PRASAD wrote:
> Respected Sir,
>  
>                                I am new to ITK environment .I have a 
> problem in DICOM file read /write operation.I want to open a dicom image 
> (no extension) and apply fastmarching filter to it,the DICOM file has no 
> extension (for example .dcm extension is not there ).I used DICOM image 
> read/write code snippet but I was not successful in getting the job 
> done.What path I should give inside the set filename brace,should 
> I specify the filename with  .dcm or just the file name is sufficient 
> .Please reply .Awaiting your response
> 
> -- 
> Warm Regards
> 
> Raghu Prasad


More information about the Insight-users mailing list