<DIV>Thank you very much,Todd Jensen.&nbsp;I overwrite gdcmFileHelper.cxx as followed:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;std::string sop = "1.2.86.755.4.2.4.24.1.3.201";</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CopyMandatoryEntry(0x0002,0x0003,sop);</DIV>
<DIV>and then rebuilt ITK(InsightToolkit-3.8.0),but&nbsp; the <SPAN lang="EN-US" style="FONT-SIZE: 10.5pt; COLOR: red; FONT-FAMILY: 'Calibri','sans-serif'; mso-bidi-font-size: 11.0pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: 宋体; mso-fareast-theme-font: minor-fareast; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">SOP Instance UID <FONT color="#000000">become wrong:</FONT></SPAN></DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp; (0002|0003) Media Storage SOP Instance UID = 1.2.826.0.1.3680043.2.1125.1.78291920758156013450636231478551699</DIV>
<DIV>I don't know what's wrong with it?</DIV>
<DIV>&nbsp;</DIV>
<DIV>regards,</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mexiao<BR><BR><BR></DIV>
<DIV></DIV><BR>在2009-05-08 20:56:07,"Todd Jensen" &lt;todd.jensen@ieee.org&gt; 写道:<BR>
<BLOCKQUOTE id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial,helvetica,sans-serif">&gt;
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial,helvetica,sans-serif">
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial,helvetica,sans-serif">&gt; I used the example DicomImageReadChangeHeaderWrite.cxx to change the dicom file,when I wrote it as followed:<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; std::string entryId( "0002|0003" );<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; std::string value( "1.2.86.755.4.2.2.24.1.3.201");<BR>&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; itk::EncapsulateMetaData&lt;std::string&gt;( dictionary, entryId, value );<BR>&gt;and the result is "(0002|0003) Media Storage SOP Instance UID = 1.2.826.0.1.3680043.2.1143.68351427<BR>&gt;608.2009050811121070158". Why? How can I change it ?Could anyone help me ?thanks.<BR><BR>The underlying GDCM library bundled with ITK overwrites this element with a UID it generates. You have to walk the code and you will find in Utilities/gdcm/gdcmFileHelper.cxx-&gt;CheckMandatoryElements():<BR><BR>&nbsp; :<BR>std::string sop =&nbsp; Util::CreateUniqueUID();<BR>&nbsp; :<BR>CopyMandatoryEntry(0x0002,0x0003,sop);<BR>CheckMandatoryEntry(0x0008,0x0018,sop);<BR>&nbsp; :<BR><BR>This overwrites your value.<BR><BR>If it was made CheckMandatoryEntry(0x0002,0x0003,sop), that would solve your issue.<BR><BR>Also, the code as is allows the two SOP Instance UIDs to be different when they should be the same.<BR><BR>Todd Jensen<BR></DIV></DIV></DIV></BLOCKQUOTE><br><!-- footer --><br><span title="neteasefooter"/><hr/>
<a href="http://512.mail.163.com/mailstamp/stamp/dz/activity.do?from=footer">穿越地震带 纪念汶川地震一周年</a>
</span>