<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>Hi mates,<br>as you advice me last days , i uninstall itk and cmake and visual studio.<br>i reinstall then cmake 2.6 and itk 3.12 and visual studio 8 (2005).<br>after that i try to execute again my program to read and write a dicom image but when i debogue the program i obtain thoses error and i don't understand them,can you help me:<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 '[1404] DicomImageReadWrite.exe:
Native' has exited with code 1 (0x1).<br><br>also how can i display the image read on screen?<br>the program is below<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 <list><br>#include <fstream><br><br>int main( int argc, char* argv[] )<br>{if( argc < 5 )<br> {<br> std::cerr << "Usage: " << std::endl;<br> std::cerr << argv[0] << " DicomImage OutputDicomImage ";<br> std::cerr << " OutputImage RescaleDicomImage\n";<br> return EXIT_FAILURE;<br> }<br>typedef signed short InputPixelType;<br> const unsigned int InputDimension =
2;<br><br> typedef itk::Image< InputPixelType, InputDimension > InputImageType;<br> typedef itk::ImageFileReader< InputImageType > ReaderType;<br><br> ReaderType::Pointer reader = ReaderType::New();<br> reader->SetFileName( argv[1] );<br> typedef itk::GDCMImageIO ImageIOType;<br><br> ImageIOType::Pointer gdcmImageIO = ImageIOType::New();<br> <br> reader->SetImageIO( gdcmImageIO );<br> try<br> {<br> reader->Update();<br> }<br> catch (itk::ExceptionObject & e)<br> {<br> std::cerr << "exception in file reader " << std::endl;<br> std::cerr << e << std::endl;<br> return EXIT_FAILURE;<br> }<br> typedef itk::ImageFileWriter< InputImageType
> Writer1Type;<br><br> Writer1Type::Pointer writer1 = Writer1Type::New();<br><br> writer1->SetFileName( argv[2] );<br> writer1->SetInput( reader->GetOutput() );<br> writer1->SetImageIO( gdcmImageIO );<br> try<br> {<br> writer1->Update();<br> }<br> catch (itk::ExceptionObject & e)<br> {<br> std::cerr << "exception in file writer " << std::endl;<br> std::cerr << e << std::endl;<br> return EXIT_FAILURE;<br> }<br> typedef unsigned char WritePixelType;<br> <br> typedef itk::Image< WritePixelType, 2 > WriteImageType;<br> <br> typedef itk::RescaleIntensityImageFilter< <br> InputImageType, WriteImageType >
RescaleFilterType;<br><br> RescaleFilterType::Pointer rescaler = RescaleFilterType::New();<br><br> rescaler->SetOutputMinimum( 0 );<br> rescaler->SetOutputMaximum( 255 );<br> typedef itk::ImageFileWriter< WriteImageType > Writer2Type;<br><br> Writer2Type::Pointer writer2 = Writer2Type::New();<br><br> writer2->SetFileName( argv[3] );<br> <br> rescaler->SetInput( reader->GetOutput() );<br> writer2->SetInput( rescaler->GetOutput() );<br> try<br> {<br> writer2->Update();<br> }<br> catch (itk::ExceptionObject & e)<br> {<br> std::cerr << "exception in file writer " << std::endl;<br> std::cerr << e << std::endl;<br> return EXIT_FAILURE;<br> }<br> typedef
itk::ImageFileWriter< WriteImageType > Writer3Type;<br> <br> Writer3Type::Pointer writer3 = Writer3Type::New();<br><br> writer3->SetFileName( argv[4] );<br> writer3->SetInput( rescaler->GetOutput() );<br> writer3->UseInputMetaDataDictionaryOff ();<br> writer3->SetImageIO( gdcmImageIO );<br> try<br> {<br> writer3->Update();<br> }<br> catch (itk::ExceptionObject & e)<br> {<br> std::cerr << "Exception in file writer " << std::endl;<br> std::cerr << e << std::endl;<br> return EXIT_FAILURE;<br> return EXIT_SUCCESS;<br> }<br>system("pause");<br>}<br></div></div><br>
</body></html>