You can use itkOrientImageFilter to change the direction of the volume. Then when you write the IDCOM with itk, the direction cosines will be correct.<br><br><div class="gmail_quote">On Sat, Oct 6, 2012 at 11:24 AM, suicheng gu <span dir="ltr">&lt;<a href="mailto:gusuch@yahoo.com" target="_blank">gusuch@yahoo.com</a>&gt;</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><span>Thanks very much.</span></div>
<div style="font-style:normal;font-size:16px;background-color:transparent;font-family:&#39;times new roman&#39;,&#39;new york&#39;,times,serif"><span style="background-color:transparent">what I want to do is to reconstruct the coronal and saggittal views and save them as dcm files.</span></div>
<div style="font-style:normal;font-size:16px;background-color:transparent;font-family:&#39;times new roman&#39;,&#39;new york&#39;,times,serif"><span>I can manually change the direction of the volume data</span></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:&#39;times new roman&#39;,&#39;new york&#39;,times,serif">
If I can&#39;t change these tags, can I just create one dictionary? such as the example:
 ImageReadDicomSeriesWrite.cxx</div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:&#39;times new roman&#39;,&#39;new york&#39;,times,serif"><br></div><div class="hm HOEnZb">  </div>
<div style="font-family:&#39;times new roman&#39;,&#39;new york&#39;,times,serif;font-size:12pt"><div class="hm HOEnZb"> </div><div style="font-family:&#39;times new roman&#39;,&#39;new york&#39;,times,serif;font-size:12pt">
<div class="hm HOEnZb"> <div dir="ltr"> <font face="Arial"> <hr size="1">  <b><span style="font-weight:bold">From:</span></b> Bill Lorensen &lt;<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>&gt;<br>
 <b><span style="font-weight:bold">To:</span></b> suicheng gu &lt;<a href="mailto:gusuch@yahoo.com" target="_blank">gusuch@yahoo.com</a>&gt; <br><b><span style="font-weight:bold">Cc:</span></b> &quot;<a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a>&quot; &lt;<a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a>&gt; <br>
 <b><span style="font-weight:bold">Sent:</span></b> Saturday, October 6, 2012 11:07 PM<br> <b><span style="font-weight:bold">Subject:</span></b> Re: [Insight-users] Unable to write dicom tag using GDCMImageIO<br>
 </font> </div></div><div><div class="h5"> <br>
<div>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>On Sat, Oct 6, 2012 at 5:21 AM, suicheng gu <span dir="ltr">&lt;<a rel="nofollow" href="mailto:gusuch@yahoo.com" target="_blank">gusuch@yahoo.com</a>&gt;</span> wrote:<br><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div style="font-size:12pt;font-family:&#39;times new roman&#39;,&#39;new york&#39;,times,serif"><div>Hi,</div><div> </div><div>I was trying to chage the image orientation tag using</div><div>itk::EncapsulateMetaData&lt;std::string&gt;(dict1,&quot;0020|0037&quot;, &quot;1\\0\\0\\0\\0\\1&quot;); </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 rel="nofollow" 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>
</div><br><br> </div></div></div> </div>  </div></div></blockquote></div><br><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br><br>