Hi Syrine,<br><br><br> Welcome to ITK !<br><br><br>Please follow first the ITK tutorials:<br><br><a href="http://www.itk.org/ITK/help/tutorials.html">http://www.itk.org/ITK/help/tutorials.html</a><br><br>In particular:<br>
<br>"Getting Started I"<br><a href="http://www.itk.org/CourseWare/Training/GettingStartedI-WebPage/index.htm">http://www.itk.org/CourseWare/Training/GettingStartedI-WebPage/index.htm</a><br><br>It will save you a lot of time.<br>
<br>The tutorial guide step-by-step on how to install<br>and use ITK.<br><br>You should also read the ITK Software Guide<br><br> <a href="http://www.itk.org/ItkSoftwareGuide.pdf">http://www.itk.org/ItkSoftwareGuide.pdf</a><br>
<br><br>Regarding your code:<br><br>A) You are passing a PNG image as input to a reader.<br> You are currently not passing a DICOM image.<br> <br> for instructions on how to read a DICOM image,<br> please look at the Chapter "Reading and Writing Images"<br>
in the ITK Software Guide.<br><br>B) You CMakeLists.txt file was copies from the Examples<br> directory. You may find easier to write your own, by<br> following the instructions in the Tutorial.<br><br>You should only need something like<br>
<br>CMAKE_MINIMUM_REQUIRED(VERSION 2.4)<br>IF(COMMAND CMAKE_POLICY)<br> 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>
<br><div>ADD_EXECUTABLE(Image2 Image2.cxx )<br>TARGET_LINK_LIBRARIES(Image2 ITKIO)<br><br><br></div>and then run the code from the command line.<br><br><br>C) Whenever you are in doubt about whether<br> your messages make it to the mailing list,<br>
you can check the Archives:<br><a href="http://www.itk.org/pipermail/insight-users/">http://www.itk.org/pipermail/insight-users/</a><br><br> see for example:<br><a href="http://www.itk.org/pipermail/insight-users/2009-June/date.html">http://www.itk.org/pipermail/insight-users/2009-June/date.html</a><br>
<br><br><br> Regards,<br><br><br> Luis<br><br><br>------------------------------------------------------------------<br><div class="gmail_quote">On Wed, Jun 17, 2009 at 3:11 AM, Syrine Sahmim <span dir="ltr"><<a href="mailto:syrine.sahmim@yahoo.fr">syrine.sahmim@yahoo.fr</a>></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; color: rgb(0, 0, 0);">
<div>Hello,<br>I'm a new user of ITK.<br>I succeed to install it and run it on c++.<br>I won't to read dicom image and display it on screen at the begining.i tried the examples included on itk/example but i have many errors when i debogue the program.the build is successful.I have tried for many days but i can't debogue it . i have send many times to the forum but i don't reseived any answer. <br>
can somebody help me<br>Thanks<br><br><div>the c make file is as follow:<br>CMAKE_MINIMUM_REQUIRED(VERSION 2.4)<br>IF(COMMAND CMAKE_POLICY)<br> 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> ADD_TEST(Image2Test ${IMAGE_EXAMPLES}<br> Image2Test ${ITK_SOURCE_DIR}/Examples/Data/BrainMidSagittalSlice.png<br> )<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 PixelType;<br> const unsigned int Dimension = 3;<br><br> typedef itk::Image< PixelType, Dimension > ImageType;<br>typedef itk::ImageFileReader< ImageType > ReaderType;<br>
ReaderType::Pointer reader = ReaderType::New();<br>const char * filename = argv[1];<br> reader->SetFileName( filename );<br>reader->Update();<br>ImageType::Pointer image = reader->GetOutput();<br> return 0;}<br>
<br></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></blockquote></div><br>