<div dir="ltr">Hi Yiming,<div><br></div><div>In image1.cxx file the codes only illustrates how to set an image but not further than that... </div><div><br></div><div>The following examples illustrates other steps..you may consider that each example adds a step to pipeline of reading/writing an image , so in Image5.cxx you will see  the code for writing an output image, (where you will have output)</div>
<div><br></div><div><div>const bool importImageFilterWillOwnTheBuffer = true;</div><div>  importFilter-&gt;getSetImportPointer( localBuffer, numberOfPixels, </div><div>                                  importImageFilterWillOwnTheBuffer );</div>
<div>  // Software Guide : EndCodeSnippet</div><div><br></div><div><br></div><div>  //  Software Guide : BeginLatex</div><div>  //</div><div>  //  Finally, we can connect the output of this filter to a pipeline. </div><div>
  //  For simplicity we just use a writer here, but it could be any other filter.</div><div>  //</div><div>  //  Software Guide : EndLatex </div><div><br></div><div>  typedef itk::ImageFileWriter&lt; ImageType &gt; WriterType;</div>
<div>  WriterType::Pointer writer = WriterType::New();</div><div><br></div><div>  writer-&gt;SetFileName( argv[1] );</div><div><br></div><div>  // Software Guide : BeginCodeSnippet</div><div>  writer-&gt;SetInput(  importFilter-&gt;GetOutput()  );</div>
<div>  // Software Guide : EndCodeSnippet</div><div><br></div><div><br></div><div>  try</div><div>    {</div><div>    writer-&gt;Update();</div><div>    }</div><div>  catch( itk::ExceptionObject &amp; exp ) </div><div>    {</div>
<div>    std::cerr &lt;&lt; &quot;Exception caught !&quot; &lt;&lt; std::endl;</div><div>    std::cerr &lt;&lt; exp &lt;&lt; std::endl;</div><div>    }</div><div><br></div><div><br></div><div>You will find everything is illustrated in details, in chapter 4, sections 4.1 and 4.2 in ItkSoftwareGuide.pdf</div>
<div><br></div><div><br></div><div><br></div></div><div>Regards,<br>Aya R. ElGebeely<br><br>
<br><br><div class="gmail_quote">On 30 March 2010 21:16, Yiming Jing <span dir="ltr">&lt;<a href="mailto:yjing@andrew.cmu.edu">yjing@andrew.cmu.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi, all<br><br>I am new to ITK.<br>And I have followed the instruction of example image1 and run image.exe. But why is there nothing to output? <br clear="all"><br>Yiming<br>-- <br><font color="#888888">Yiming Jing<br><br>

</font><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></div>