[Insight-users] Some questions on DICOM writing

Mathieu Malaterre mathieu.malaterre at kitware.com
Thu Sep 1 12:37:06 EDT 2005


Markus,

	Have a look at:

ITK/Examples/IO/DicomSeriesReadSeriesWrite.cxx

In particular pay attention to the line:

   seriesWriter->SetMetaDataDictionaryArray(
                         reader->GetMetaDataDictionaryArray() );

You'll have to instanciate your own ImageIO (in this case a GDCMImageIO) 
and then set:
KeepOriginalUID to true if you want to preserve the original DICOM UID 
(note that this break DICOM specification). Also I believe gdcm 1.0 (the 
one in ITK 2.2 and CVS) does not change the date nor the time for you 
(which is a mistake).

HTH
Mathieu
Ps: gdcm is part of ITK and is build transparently when building ITK.

Markus Weigert wrote:
> Hello @all,
>  
> I have some questions concerning DICOM, especially writing DICOM series.
>  
> I'm currently reading a serie of DICOM files and store them to a itkImage.
>  
> In the next step, I apply some filters to the image.
> Finally, I want to write the result out to DICOM serie too.
>  
> My question is now:
> What happens to the meta information when I write
> out the itkImage?
>  
> Is the information (patient name, study date e.g.) also in the
> serie which is written to disk, that means, is this information part of 
> the itkImage
> and will the features of the filtered image (resolution, spacing, etc) 
> be written properly?
>  
> It's extremely important to me, that the original meta information 
> <which does not
> change (patient name, date, study, etc.)> is preserved, while image 
> information
> is changed due to resampling or transforming the image.
>  
> Could somebody please give me some advice how to solve this.
> Do I need external libraries like GDCM???
>  
> Best regards,
> Markus
>  
>  
>  
>  
>  
>  
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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