[Insight-users] Problem in copying DICOM image: Study instance UID value is changed

Mathieu Malaterre mathieu.malaterre at gmail.com
Tue Jul 1 12:16:12 EDT 2008


On Tue, Jul 1, 2008 at 5:49 PM, Subrahmanyam Gorthi
<subrahmanyam.gorthi at gmail.com> wrote:
> Hi all,
>
> I am trying to read a DICOM file and write the same to another DICOM file
> using ITK.
>
> For that, I am using the example code given in ITK's
> Examples\IO\ImageReadWrite.cxx
>
> It seems the values of a few tags are altered in the process of writing.
> Particularly, i need to retain the value of "Study Instance UID" attribute
> with Tag Number: (0020,000d).
>
> I would like to know whether this is a normal behavior?

Yes & No. There is no way to be sure you are allowed to keep the same
Instance UID. I'll assume you know what you are doing. Anyway the
default is to always regenerate them which is safe in 100% cases.

> If so, how to retain the same value for the "Study Instance UID" attribute?

See  itk::GDCMImageIO::KeepOriginalUIDOn  	(   	  	 )   	
http://public.kitware.com/Insight/Doxygen/html/classitk_1_1GDCMImageIO.html#itk_1_1GDCMImageIOz1844_2

But again you should really think twice before doing this.

HTH

-- 
Mathieu


More information about the Insight-users mailing list