<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">Dear&nbsp;<div>&nbsp; &nbsp; &nbsp; &nbsp;I just want to read a dcm file and write to dcm file , but when I run my code , something confuse me happened .</div><div>&nbsp;<img src="cid:1f770c71$1$14010fba148$Coremail$15891495523$126.com"></div><div>and My code is :</div><div><div>#include "itkImageFileReader.h"</div><div>#include "itkImageFileWriter.h"</div><div>#include "itkRescaleIntensityImageFilter.h"</div><div>#include "itkGDCMImageIO.h"</div><div><br></div><div>#include &lt;list&gt;</div><div>#include &lt;fstream&gt;</div><div><br></div><div>int main()</div><div>{</div><div>&nbsp; typedef signed short InputPixelType;</div><div>&nbsp; const unsigned int &nbsp; InputDimension = 3;</div><div><br></div><div>&nbsp; typedef itk::Image&lt; InputPixelType, InputDimension &gt; InputImageType;</div><div><br></div><div>&nbsp; typedef itk::ImageFileReader&lt; InputImageType &gt; ReaderType;</div><div><br></div><div>&nbsp; ReaderType::Pointer reader = ReaderType::New();</div><div>&nbsp; reader-&gt;SetFileName( "C:\\Users\\zhq\\Desktop\\data\\pdVISTA\\E403434298\\E403434298S1601I1.dcm" );</div><div><br></div><div>&nbsp; typedef itk::GDCMImageIO &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ImageIOType;</div><div><br></div><div>&nbsp; ImageIOType::Pointer gdcmImageIO = ImageIOType::New();</div><div><br></div><div>&nbsp; reader-&gt;SetImageIO( gdcmImageIO );</div><div><br></div><div>&nbsp; reader-&gt;Update();</div><div><br></div><div>&nbsp; typedef itk::ImageFileWriter&lt; InputImageType &gt; &nbsp;Writer1Type;</div><div><br></div><div>&nbsp; Writer1Type::Pointer writer1 = Writer1Type::New();</div><div><br></div><div>&nbsp; writer1-&gt;SetFileName( "C:\\Users\\zhq\\Desktop\\2.dcm" );</div><div>&nbsp; writer1-&gt;SetInput( reader-&gt;GetOutput() );</div><div><br></div><div>&nbsp; writer1-&gt;SetImageIO( gdcmImageIO );</div><div><br></div><div>&nbsp; writer1-&gt;Update();</div><div><br></div><div>}</div></div></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"><div id="netease_mail_footer"><div style="border-top:#CCCCCC 1px solid;padding:10px 5px;font-size:12px;color:#666;line-height:22px">来自网易手机号码邮箱<a id="mobile_set" sys="1" log=1 logid="free_sms_20120504" href="http://shouji.163.com" target="_blank" style="color:#0000FF">了解更多</a></div></div>
</span></span>