[Insight-users] Reading DICOM using GDCM reader

Mathieu Malaterre mathieu.malaterre at kitware.com
Mon Apr 11 16:18:11 EDT 2005


Smriti,

	You should also read the code from itkGDCMImageIO.cxx. You'll see that 
we include gdcm header this way:

   #include "gdcm/src/gdcmFile.h"

	And finally gdcmHeader.h was used in gdcm 0.6 (=ITK 2.x) but not in 
gdcm 1.0 anymore (=ITK CVS).

HTH
Mathieu

Karthik Krishnan wrote:
> The USE_GDCM option was removed by Mathieu some time in Feb this year. 
> You may want to update your CVS repository.
> 
> Thanks
> karthik
> 
> 
> 
> SMRITI RAGHUNATHAN wrote:
> 
>> Hi,
>> I actually have two questions:
>>
>> 1) If I try to read DICOM files using DicomSeriesReadImageWrite2.cxx 
>> which uses the GDCM reader, then if I let the commands in the 
>> CMakeLists file be
>>
>> IF(USE_GDCM)
>> INCLUDE_DIRECTORIES(${GDCM_INCLUDE_DIR})
>> ADD_EXECUTABLE(DicomSeriesReadImageWrite2 DicomSeriesReadImageWrite2.cxx)
>> TARGET_LINK_LIBRARIES(DicomSeriesReadImageWrite2 ITKCommon ITKIO)
>> ENDIF(USE_GDCM)
>>
>> then after configuring my file it doesn't create a .dsw or .dsp file 
>> for DicomSeriesReadImageWrite2
>> However, if I remove the statements IF(USE_GDCM) and ENDIF(USE_GDCM), 
>> then the .dsw file is created but now it doesn't compile because it 
>> can't find the gdcmHeader.h file
>>
>> Any ideas as to how I can solve this problem or what i might be doing 
>> wrong. I know the IF command in the CMakeLists is necessary but then I 
>> get to nowhere
>>
>>
>>
>> 2)If i use the DICOMImageIO2.h, then I can read the stack of images 
>> but I can't seem to write them to a file. It gives me the error
>>
>> ImageFileWriter<012E6420>: No ImageIO set, or none could be created
>>
>> I think this may be because I am not giving the correct extension for 
>> the output file. But i am not sure what extension to give, I have 
>> tried .raw,.png
>>
>> Thanks
>>
>> Smriti
>>
>>
>>
>>
>> _______________________________________________
>> Insight-users mailing list
>> Insight-users at itk.org
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>>  
>>
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 



More information about the Insight-users mailing list