<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;color:#000000;"><div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt; color: rgb(0, 0, 0);"><div>hi all,<br>i try to read a dicom image<br>i write this code<br>#if defined(_MSC_VER)<br>#pragma warning ( disable : 4786 )<br>#endif<br><br>#ifdef __BORLANDC__<br>#define ITK_LEAN_AND_MEAN<br>#endif<br><br>#include "itkImageFileReader.h"<br>//#include "itkImageFileWriter.h"<br>#include "itkRescaleIntensityImageFilter.h"<br>#include "itkGDCMImageIO.h"<br>#include &lt;list&gt;<br>#include &lt;fstream&gt;<br><br><br>int main( int argc, char* argv[] )<br>{if( argc &lt; 5 )<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; std::cerr &lt;&lt; "Usage: " &lt;&lt; std::endl;<br>&nbsp;&nbsp;&nbsp; std::cerr &lt;&lt; argv[0] &lt;&lt; " DicomImage OutputDicomImage ";<br>&nbsp;&nbsp;&nbsp;
 &nbsp;&nbsp;&nbsp; std::cerr &lt;&lt; " OutputImage RescaleDicomImage\n";<br>&nbsp;&nbsp;&nbsp; return
 EXIT_FAILURE;<br>&nbsp;&nbsp;&nbsp; }<br>typedef signed short InputPixelType;<br>&nbsp; const unsigned int&nbsp;&nbsp; InputDimension = 2;<br><br>&nbsp; typedef itk::Image&lt; InputPixelType, InputDimension &gt; InputImageType;<br>&nbsp; typedef itk::ImageFileReader&lt; InputImageType &gt; ReaderType;<br><br>&nbsp; ReaderType::Pointer reader = ReaderType::New();<br>&nbsp; reader-&gt;SetFileName( "C:\Documents and Settings\Sirouna\Mes documents\Master\imgdicom" );<br>&nbsp; typedef itk::GDCMImageIO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ImageIOType;<br><br>&nbsp; ImageIOType::Pointer gdcmImageIO = ImageIOType::New();<br>&nbsp; <br>&nbsp; reader-&gt;SetImageIO( gdcmImageIO );<br>&nbsp; try<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; reader-&gt;Update();<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp; catch (itk::ExceptionObject &amp; e)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; std::cerr &lt;&lt; "exception in file reader " &lt;&lt;
 std::endl;<br>&nbsp;&nbsp;&nbsp; std::cerr &lt;&lt; e &lt;&lt; std::endl;<br>&nbsp;&nbsp;&nbsp; return EXIT_FAILURE;<br>&nbsp;&nbsp;&nbsp; }<br>}<br>i want to know where i must add the image path? is it correct my code?<br>when i build the project i have those warnings:<br>------ Build started: Project: DicomImageReadWrite, Configuration: Debug Win32 ------<br>Compiling...<br>DicomImageReadWrite.cxx<br>..\pj02dicom\DicomImageReadWrite.cxx(32) : warning C4129: 'D' : unrecognized character escape sequence<br>..\pj02dicom\DicomImageReadWrite.cxx(32) : warning C4129: 'S' : unrecognized character escape sequence<br>..\pj02dicom\DicomImageReadWrite.cxx(32) : warning C4129: 'M' : unrecognized character escape sequence<br>..\pj02dicom\DicomImageReadWrite.cxx(32) : warning C4129: 'M' : unrecognized character escape sequence<br>..\pj02dicom\DicomImageReadWrite.cxx(32) : warning C4129: 'i' : unrecognized character escape sequence<br>Linking...<br>&nbsp;&nbsp;

Creating library C:\Documents and
Settings\Sirouna\Bureau\prjitk\pj02dicom_b\Debug\DicomImageReadWrite.lib
and object C:\Documents and
Settings\Sirouna\Bureau\prjitk\pj02dicom_b\Debug\DicomImageReadWrite.exp<br>Embedding manifest...<br>Build
log was saved at "file://c:\Documents and
Settings\Sirouna\Bureau\prjitk\pj02dicom_b\DicomImageReadWrite.dir\Debug\BuildLog.htm"<br>DicomImageReadWrite - 0 error(s), 5 warning(s)<br>------ Skipped Build: Project: ALL_BUILD, Configuration: Debug Win32 ------<br>Project not selected to build for this solution configuration <br>========== Build: 1 succeeded, 0 failed, 1 up-to-date, 1 skipped ==========<br>and when i debogue the program i have those errors:<br>'DicomImageReadWrite.exe':
Loaded 'C:\Documents and
Settings\Sirouna\Bureau\prjitk\pj02dicom_b\debug\DicomImageReadWrite.exe',
Symbols loaded.<br>'DicomImageReadWrite.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded.<br>'DicomImageReadWrite.exe':
 Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded.<br>'DicomImageReadWrite.exe': Loaded 'C:\WINDOWS\system32\snmpapi.dll', No symbols loaded.<br>'DicomImageReadWrite.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded.<br>'DicomImageReadWrite.exe': Loaded 'C:\WINDOWS\system32\ws2_32.dll', No symbols loaded.<br>'DicomImageReadWrite.exe': Loaded 'C:\WINDOWS\system32\ws2help.dll', No symbols loaded.<br>'DicomImageReadWrite.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', No symbols loaded.<br>'DicomImageReadWrite.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', No symbols loaded.<br>'DicomImageReadWrite.exe':
Loaded
'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcp80d.dll',
Symbols loaded.<br>'DicomImageReadWrite.exe': Loaded
'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcr80d.dll',
Symbols loaded.<br>'DicomImageReadWrite.exe': Loaded
 'C:\WINDOWS\system32\user32.dll', No symbols loaded.<br>'DicomImageReadWrite.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', No symbols loaded.<br>The program '[3472] DicomImageReadWrite.exe: Native' has exited with code 1 (0x1).<br>have you an idea to how can&nbsp; i do to read the dicom image<br></div></div><br>



      <!-- kill --><br></div></div><br>



      </body></html>