Hi Syrine,<br><br>The code looks ok.<br>and the attached CMakeLists.txt file, could be simplified<br>but it doesn&#39;t seem to have anything that will generate<br>compilation errors.<br><br>What errors exactly do you get ?<br>
<br>Please post some of the error messages to the mailing list.<br><br><br>      Thanks<br><br><br>           Luis<br><br><br>---------------------------------------<br><div class="gmail_quote">On Wed, Jun 17, 2009 at 4:43 AM, Syrine Sahmim <span dir="ltr">&lt;<a href="mailto:syrine.sahmim@yahoo.fr">syrine.sahmim@yahoo.fr</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div><br>
</div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font size="2" face="Tahoma">----- Message transféré ----<br>
<b><span style="font-weight: bold;">De :</span></b> Syrine Sahmim &lt;<a href="mailto:syrine.sahmim@yahoo.fr" target="_blank">syrine.sahmim@yahoo.fr</a>&gt;<br><b><span style="font-weight: bold;">À :</span></b> <a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a><br>
<b><span style="font-weight: bold;">Envoyé le :</span></b> Mercredi, 17 Juin 2009, 9h42mn 10s<br><b><span style="font-weight: bold;">Objet :</span></b> [Insight-users] (no subject)<br></font><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div>hello <br>this program also gives errors in compilation phase<br>i joined the
 cmakelists file <br>Can help me to find error<br>thanks<br><br><br>void main()<br>{<br>// Definition of stuctures<br>typedef unsigned char PixelType;<br>const unsigned int Dimension = 2;<br>typedef itk::Image&lt; PixelType, Dimension &gt; ImageType;<br>
<br>typedef itk::ImageFileReader&lt; ImageType &gt; ReaderType;<br>typedef itk::ImageFileWriter&lt; ImageType &gt; WriterType;<br><br>// Create a object of reader and read the image<br>ReaderType::Pointer reader = ReaderType::New();<br>
WriterType::Pointer writer = WriterType::New();<br><br>const char pInputfileName[] = &quot;003F87DA.jpg&quot;;<br>const char pOutputfileName[] = &quot;003F87DA.jpg&quot;;<br><br>reader-&gt;SetFileName( pInputfileName
 );<br>reader-&gt;Update();<br><br>ImageType::Pointer image = reader-&gt;GetOutput();<br><br><br>writer-&gt;SetFileName( pOutputfileName );<br><br>writer-&gt;SetInput( reader-&gt;GetOutput() );<br><br>try<br>{<br>writer-&gt;Update();<br>
}<br><br>catch( itk::ExceptionObject &amp; err )<br>{<br>std::cout &lt;&lt; &quot;ExceptionObject caught !&quot; &lt;&lt; std::endl;<br>std::cout &lt;&lt; err &lt;&lt; std::endl;<br>exit(-1);<br>}<br></div></div><br>



      </div></div></div><br>



      </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>
Please keep messages on-topic and check the ITK FAQ at: <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>_____________________________________<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>
Please keep messages on-topic and check the ITK FAQ at: <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>