<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div><div>the c make file is as follow:<br>CMAKE_MINIMUM_REQUIRED(VERSION 2.4)<br>IF(COMMAND CMAKE_POLICY)<br>&nbsp; CMAKE_POLICY(SET CMP0003 NEW)<br>ENDIF(COMMAND CMAKE_POLICY)<br><br>PROJECT(ImageExamples)<br>FIND_PACKAGE(ITK REQUIRED)<br>INCLUDE(${ITK_USE_FILE})<br>INCLUDE_REGULAR_EXPRESSION("^.*$")<br><br>SET(TEMP ${ITK_BINARY_DIR}/Testing/Temporary)<br><br>ADD_EXECUTABLE(Image2 Image2.cxx )<br>TARGET_LINK_LIBRARIES(Image2 ITKIO)<br><br>SET(IMAGE_EXAMPLES2 ${CXX_TEST_PATH}/ImageExamples2)<br>IF( NOT ITK_DISABLE_CXX_TESTING )<br><br>IF(BUILD_TESTING)<br><br>IF(NOT BORLAND)<br>&nbsp; ADD_TEST(Image2Test ${IMAGE_EXAMPLES}<br>&nbsp;&nbsp;&nbsp; Image2Test ${ITK_SOURCE_DIR}/Examples/Data/BrainMidSagittalSlice.png<br>&nbsp; )<br>ENDIF(NOT BORLAND)<br>ENDIF(BUILD_TESTING)<br>ENDIF( NOT
 ITK_DISABLE_CXX_TESTING )<br><br>and the image2.cxx file is :<br>#if defined(_MSC_VER)<br>#pragma warning ( disable : 4786 )<br>#endif<br>#include "itkImage.h"<br></div>#include "itkImageFileReader.h"<br>int main( int , char * argv[])<br>{typedef unsigned char&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PixelType;<br>&nbsp; const unsigned int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dimension = 3;<br><br>&nbsp; typedef itk::Image&lt; PixelType, Dimension &gt;&nbsp;&nbsp; ImageType;<br>typedef itk::ImageFileReader&lt; ImageType &gt;&nbsp; ReaderType;<br>ReaderType::Pointer reader = ReaderType::New();<br>const char * filename = argv[1];<br>&nbsp; reader-&gt;SetFileName( filename );<br>reader-&gt;Update();<br>ImageType::Pointer image = reader-&gt;GetOutput();<br>&nbsp;return 0;}</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"><hr size="1"><b><span style="font-weight: bold;">De :</span></b> Patrik Brynolfsson &lt;patrik.brynolfsson@gmail.com&gt;<br><b><span style="font-weight: bold;">À :</span></b> Syrine Sahmim &lt;syrine.sahmim@yahoo.fr&gt;<br><b><span style="font-weight: bold;">Envoyé le :</span></b> Mercredi, 17 Juin 2009, 8h39mn 01s<br><b><span style="font-weight: bold;">Objet&nbsp;:</span></b> Re: Re : others pbm on reading image from file<br></font><br>What errors do you get? Is it with the CMake or when compiling the code? I have had problems posting to the forum also, especially when sending from my e-mail. If I post on the Nabble page,&nbsp;<a rel="nofollow" target="_blank" href="http://n2.nabble.com/ITK-Insight-Users-f2283740.html">http://n2.nabble.com/ITK-Insight-Users-f2283740.html</a>&nbsp;I see that the post goes out to all users, so you can try that.<div>
<br></div><div>If you're trying to read a DICOM image you might want to look i the ITKSoftwareGuide in chapter 7.12, there you have examples of reading DICOM images.&nbsp;</div><div><br></div><div>I don't know if these lines will help, but it is a start:&nbsp;</div>
<div><br></div><div><div>&nbsp;&nbsp;typedef itk::GDCMImageIO &nbsp; &nbsp; &nbsp; ImageIOType;</div><div>&nbsp;&nbsp;ImageIOType::Pointer dicomIO = ImageIOType::New();</div><div>&nbsp;&nbsp;reader-&gt;SetImageIO( dicomIO );</div><div><br></div><div>You have to add these prior to reading the image from file. Maybe you have to add more code. Anyway, look up chapter 7.12!</div>
<div><br></div><div>Regards</div><div>Patrik</div><div><br><div class="gmail_quote">2009/6/17 Syrine Sahmim <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:syrine.sahmim@yahoo.fr" target="_blank" href="mailto:syrine.sahmim@yahoo.fr">syrine.sahmim@yahoo.fr</a>&gt;</span><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>Good morning ,<br>I tried with the community but i don't receive any answer. May be i don't send correctly the msg or may be the adress mail i had used was faulty.Would send me the adress of the community or transmit my problem to the community:<br>
i try to read an image with itk but i have errors.<br><div>the c make file is as follow:<br>CMAKE_MINIMUM_REQUIRED(VERSION 2.4)<br>IF(COMMAND CMAKE_POLICY)<br>&nbsp; CMAKE_POLICY(SET CMP0003 NEW)<br>ENDIF(COMMAND CMAKE_POLICY)<br>
<br>PROJECT(ImageExamples)<br>FIND_PACKAGE(ITK REQUIRED)<br>INCLUDE(${ITK_USE_FILE})<br>INCLUDE_REGULAR_EXPRESSION("^.*$")<br><br>SET(TEMP ${ITK_BINARY_DIR}/Testing/Temporary)<br><br>ADD_EXECUTABLE(Image2 Image2.cxx )<br>
TARGET_LINK_LIBRARIES(Image2 ITKIO)<br><br>SET(IMAGE_EXAMPLES2 ${CXX_TEST_PATH}/ImageExamples2)<br>IF(
 NOT ITK_DISABLE_CXX_TESTING )<br><br>IF(BUILD_TESTING)<br><br>IF(NOT BORLAND)<br>&nbsp; ADD_TEST(Image2Test ${IMAGE_EXAMPLES}<br>&nbsp;&nbsp;&nbsp; Image2Test ${ITK_SOURCE_DIR}/Examples/Data/BrainMidSagittalSlice.png<br>&nbsp; )<br>ENDIF(NOT BORLAND)<br>
ENDIF(BUILD_TESTING)<br>ENDIF( NOT
 ITK_DISABLE_CXX_TESTING )<br><br>and the image2.cxx file is :<br>#if defined(_MSC_VER)<br>#pragma warning ( disable : 4786 )<br>#endif<br>#include "itkImage.h"<br></div>#include "itkImageFileReader.h"<br>
int main( int , char * argv[])<br>{typedef unsigned char&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PixelType;<br>&nbsp; const unsigned int&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dimension = 3;<br><br>&nbsp; typedef itk::Image&lt; PixelType, Dimension &gt;&nbsp;&nbsp; ImageType;<br>typedef itk::ImageFileReader&lt; ImageType &gt;&nbsp; ReaderType;<br>
ReaderType::Pointer reader = ReaderType::New();<br>const char * filename = argv[1];<br>&nbsp; reader-&gt;SetFileName( filename );<br>reader-&gt;Update();<br>ImageType::Pointer image = reader-&gt;GetOutput();<br>&nbsp;return 0;}<br>
</div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Regards,<br>Syrine<br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font size="2" face="Tahoma"><div class="im">
<hr size="1"><b><span style="font-weight: bold;">De :</span></b> Patrik Brynolfsson &lt;<a rel="nofollow" ymailto="mailto:patrik.brynolfsson@gmail.com" target="_blank" href="mailto:patrik.brynolfsson@gmail.com">patrik.brynolfsson@gmail.com</a>&gt;<br><b><span style="font-weight: bold;">À :</span></b> Syrine Sahmim &lt;<a rel="nofollow" ymailto="mailto:syrine.sahmim@yahoo.fr" target="_blank" href="mailto:syrine.sahmim@yahoo.fr">syrine.sahmim@yahoo.fr</a>&gt;<br>
</div><b><span style="font-weight: bold;">Envoyé le :</span></b> Vendredi, 12 Juin 2009, 8h41mn 54s<br><b><span style="font-weight: bold;">Objet&nbsp;:</span></b> Re: others pbm on reading image from file<br></font><div><div></div>
<div class="h5"><br>Hello,<div><br></div><div>I'm sorry but I'm really new to ITK and can't answer your question. Perhaps you didn't install ITK correctly, or missed something in the CMake-file, but I simply don't know. Check with the community, they might help you!</div>

<div><br></div><div>Regards,</div><div><br></div><div>Patrik<br><br><div class="gmail_quote">2009/6/11 Syrine Sahmim <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:syrine.sahmim@yahoo.fr" target="_blank" href="mailto:syrine.sahmim@yahoo.fr">syrine.sahmim@yahoo.fr</a>&gt;</span><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>Hi,<br>thanks for your help but i succeed the execution <br>and then&nbsp; i tried to excute another examples "InsightToolkit-3.12.0\Examples\DataRepresentation\Image\image2.cxx" but i have many debug like<br>

&nbsp;Exception non gérée à 0x7c81eb33 dans Image2.exe&nbsp;: Exception Microsoft C++&nbsp;: itk::ImageFileReaderException à l'emplacement mémoire 0x0136fb68..<br>Exception non gérée à 0x0040fe28 dans Image2.exe&nbsp;: 0xC0000005: Violation d'accès lors de la lecture de l'emplacement 0x00000000.<br>

...etc <br>how can i eliminate those exception. there's any others recommandations that i must do them to succeed this test.<br>thanks<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"><hr size="1"><b><span style="font-weight: bold;">De :</span></b> Patrik Brynolfsson &lt;<a rel="nofollow" ymailto="mailto:patrik.brynolfsson@gmail.com" target="_blank" href="mailto:patrik.brynolfsson@gmail.com">patrik.brynolfsson@gmail.com</a>&gt;<br>

<b><span style="font-weight: bold;">À :</span></b> Syrine Sahmim &lt;<a rel="nofollow" ymailto="mailto:syrine.sahmim@yahoo.fr" target="_blank" href="mailto:syrine.sahmim@yahoo.fr">syrine.sahmim@yahoo.fr</a>&gt;<br><b><span style="font-weight: bold;">Envoyé le :</span></b> Jeudi, 11 Juin 2009, 8h36mn 49s<br>

<b><span style="font-weight: bold;">Objet&nbsp;:</span></b> Re: Re : [Insight-users] pbms of running<br></font><br>Type "cmd" in the "Run..." option in the start menu in windows. change catalog to where your program is located (e.g. cd c:\program\my programs\debug\) run the program from there by typing the name of the program (e.g. helloworld)<div>


<br><br><div class="gmail_quote">2009/6/10 Syrine Sahmim <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:syrine.sahmim@yahoo.fr" target="_blank" href="mailto:syrine.sahmim@yahoo.fr">syrine.sahmim@yahoo.fr</a>&gt;</span><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>how to run it from the command line plz?<br></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;"><div><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">De :</span></b> Patrik Brynolfsson &lt;<a rel="nofollow" ymailto="mailto:patrik.brynolfsson@gmail.com" target="_blank" href="mailto:patrik.brynolfsson@gmail.com">patrik.brynolfsson@gmail.com</a>&gt;<br>


<b><span style="font-weight: bold;">À :</span></b> Syrine Sahmim &lt;<a rel="nofollow" ymailto="mailto:syrine.sahmim@yahoo.fr" target="_blank" href="mailto:syrine.sahmim@yahoo.fr">syrine.sahmim@yahoo.fr</a>&gt;<br><b><span style="font-weight: bold;">Envoyé le :</span></b> Mercredi, 10 Juin 2009, 15h17mn 03s<br>


<b><span style="font-weight: bold;">Objet&nbsp;:</span></b> Re: [Insight-users] pbms of running<br></font></div><div><div></div><div><br>Are you running Windows? In that case, are you running your program from the command line? If you're not, the command window
 just pops up momentarliy. Try running it from the command line and see if it works better.<br>
<br><div class="gmail_quote">2009/6/10 Syrine Sahmim <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:syrine.sahmim@yahoo.fr" target="_blank" href="mailto:syrine.sahmim@yahoo.fr">syrine.sahmim@yahoo.fr</a>&gt;</span><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; color: rgb(0, 0, 0);"><div>Hi,<br>i tried to run the example code of "helloworld.cxx". i have build itt successfully but the problem that i doesn't produce the msg " itk hello world"..i do'n t know what'is the error enev it never mentionned<br>



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



      </div><br>_____________________________________<br>
Powered by <a rel="nofollow" target="_blank" href="http://www.kitware.com">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a rel="nofollow" target="_blank" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at: <a rel="nofollow" target="_blank" href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a rel="nofollow" target="_blank" href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br>
</div></div></div></div></div><br>



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



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



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



      </body></html>