If I recall, tags that are related to orientation and spacing cannot be changed. You must change the orientation of the data before you write the dicom file. The writer will output the proper tag that goes with the data.<br>
<br><div class="gmail_quote">On Sat, Oct 6, 2012 at 5:21 AM, suicheng gu <span dir="ltr"><<a href="mailto:gusuch@yahoo.com" target="_blank">gusuch@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div style="font-size:12pt;font-family:times new roman,new york,times,serif"><div>Hi,</div><div> </div><div>I was trying to chage the image orientation tag using</div><div>itk::EncapsulateMetaData<std::string>(dict1,"0020|0037", "1\\0\\0\\0\\0\\1"); </div>
<div>But the image orientation was still 1\0\0\0\1\0</div><div> </div><div> </div><div> </div><div>I also tested the provided exmaple: </div><div>InsightToolkit-4.1.0\Examples\IO\DicomImageReadChangeHeaderWrite.cxx</div>
<div>
</div><div>It works for some tags, such as the instance number: DicomImageReadChangeHeaderWrite $infile$ $outfile$ 0020|0013 10</div><div> </div><div>But it failed on the image orientation: DicomImageReadChangeHeaderWrite $infile$ $outfile$ 0020|0037 1\0\0\0\0\1 </div>
<div> </div><div> </div><div> </div><div>Anyone can help?</div><div>Thanks in
advance.</div><span><font color="#888888"><div>Suicheng</div><div> </div></font></span></div></div><br>_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Unpaid intern in BillsBasement at noware dot com<br><br>