<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi Gib,<br><br> I managed to build ITK, VTK, and run the ImageReadWrite.cxx.<br>It seems that the folder structure suggested by John Drescher worked for me.<br>I still get a First-chance exception at 0x7c812afb in ImageReadWrite.exe: Microsoft C++ exception: itk::ExceptionObject at memory location 0x0137f6b8..<br>The program '[3412] ImageReadWrite.exe: Native' has exited with code 1 (0x1).<br> I googled it and it seems to be a a notification to the debugger so it can stop the program.<br> But i still can't see the result image. My image is a gray scale jpeg 164x120<br>Here is my 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
"itkImage.h"<br><br><br>int main( int argc, char ** argv )<br>{<br> <br><br> typedef short PixelType;<br> const unsigned int Dimension = 2;<br> typedef itk::Image< PixelType, Dimension > ImageType;<br> typedef itk::ImageFileReader< ImageType > ReaderType;<br> typedef itk::ImageFileWriter< ImageType > WriterType;<br><br> ReaderType::Pointer reader = ReaderType::New();<br> WriterType::Pointer writer = WriterType::New();<br><br> const char * inputFilename = "bla.jpg"; <br> const char * outputFilename = "bla2.jpg";<br><br> reader->SetFileName( inputFilename );<br> writer->SetFileName( outputFilename );<br> <br> try <br> { <br> writer->Update(); <br> } <br> catch(
itk::ExceptionObject & err ) <br> { <br> std::cerr << "ExceptionObject caught !" << std::endl; <br> std::cerr << err << std::endl; <br> return EXIT_FAILURE;<br> } <br><br> return EXIT_SUCCESS;<br>}<br>Cheers,<br>Ella<br></td></tr></table><br>