Hi!<div><br></div><div>I guess the only way is to modify the code of MHD writer. You can either change code in itk\code\io directly, or copy it to your arbitrarily named io library, register it with ITK for writing .mhd files and then use normal workflow.</div>
<div><br></div><div>Regards,</div><div>Dženan<br><br><div class="gmail_quote">On Tue, May 18, 2010 at 06:04, Yang, Jinzhong <span dir="ltr"><<a href="mailto:jinzhong76@gmail.com">jinzhong76@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Garamond","serif";color:#1F497D">Hi Xiaodong,</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Garamond","serif";color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Garamond","serif";color:#1F497D">Thank you very much for your message. I know that the data orientation
information will be discarded – but I intentionally to do so. I have some
available data without direction information. I simply like to be consistent
with the available data since I need to run a third party software to compare
the available data with the data I generate. Do you know any ways to control
the fields that are written out in the Meta Header file?</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Garamond","serif";color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Garamond","serif";color:#1F497D">Thank you!</span></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Garamond","serif";color:#1F497D">-Jinzhong</span></p>
</div>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Garamond","serif";color:#1F497D"> </span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt">From:</span></b><span style="font-size:10.0pt"> Xiaodong Tao
[mailto:<a href="mailto:taox@ge.com" target="_blank">taox@ge.com</a>] <br>
<b>Sent:</b> Monday, May 17, 2010 6:52 PM<br>
<b>To:</b> Yang, Jinzhong</span></p><div class="im"><br>
<b>Cc:</b> <a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a><br>
</div><b>Subject:</b> Re: [Insight-users] Help on using itk::MetaImageIO to write a
*.mhd file<p></p>
</div>
</div><div><div></div><div class="h5">
<p class="MsoNormal"> </p>
<p class="MsoNormal">Hello Jinzhong,</p>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">If you do not write out the image information in its
entirety, you may not load them back (process them and visualize them)
correctly unless you remember all the information you discard. </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">Xiaodong</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
<div>
<div>
<p class="MsoNormal">On May 17, 2010, at 7:16 PM, Yang, Jinzhong wrote:</p>
</div>
<p class="MsoNormal"><br>
<br>
</p>
<div>
<p><span>Hi All,</span></p>
<p><span>I would like to write out
an itk::image to meta image format with header</span> <span>information</span> <span>stored
in a</span> <span>*.mhd file. The
default writer</span> <span>(I use</span>
<span>the</span> <span>itk::ImageFileWriter to choose the
itk::MetaImageIO</span> <span>automatically</span>
<span>according to the output file
extension)</span> <span>will write
all information, such as</span> <span>TransformMatrix,</span>
<span>CenterOfRotation,</span> <span>AnatomicalOrientation, etc. I just
wonder if there is a way to choose the elements that I would like to output and
get rid of those elements I don’t like. For some reason, I</span> <span>don’t want the data
orientation listed in the output header file.</span></p>
<p><span>Thanks,</span></p>
<p><span>Jinzhong</span></p>
</div>
<p class="MsoNormal">_____________________________________<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.html" target="_blank">http://www.kitware.com/products/protraining.html</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></p>
</div>
<p class="MsoNormal"> </p>
</div>
</div></div></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.html" target="_blank">http://www.kitware.com/products/protraining.html</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></div>