<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi Gib,<div><br></div><div><br></div><div>I would have expected some errors if the image format was not accepted.</div><div><br></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 14px; line-height: 16px; ">First i Dont have anything in Project Properties</span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 14px; line-height: 16px; ">Configuration Properties &gt; Linker&nbsp;<br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; ">&gt; General &gt; Additional Library Directories shows:<br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; ">"C:\Program Files\VTK\lib\vtk-5.4\$(OutDir)","C:\Program&nbsp;<br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial;
 ">Files\VTK\lib\vtk-5.4",D:\ITK\bin\$(OutDir),D:\ITK\bin<br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; "><br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; "><br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; ">In my environment variables, I have set:<br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; ">ITK_DIR=D:\Toolbox\ITK3.20 Btu i don't know what path do u mean by"&nbsp;ITK appears is in the path, where I have<br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; ">C:\Program files\ITK\bin"</span></div><div><br></div><div><br></div><div>This is really driving me crazy. Even more because building ITK or VTK takes 6,7 hours on PC. At work i am programing on a mac, so it is a different story, and i am trying to
 do all this because i can't manage to use GeodesicActiveContour filter, nor ChanVese properly on some MRT images for a plugin in Osirix, so i would like to see if it is something related to Osirix or not.</div><div>Hope i will manage to make it work soon,</div><div>Thanks ,</div><div>Ella</div><div><br>--- Gib Bogle <i>&lt;g.bogle@auckland.ac.nz&gt;</i> schrieb am <b>Fr, 25.2.2011:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>Von: Gib Bogle &lt;g.bogle@auckland.ac.nz&gt;<br>Betreff: Re: Can't see result imae from ImageReadWrite<br>An: "Ella Maria Kadas" &lt;ella_kadas@yahoo.com&gt;<br>CC: "John Drescher" &lt;drescherjm@gmail.com&gt;, insight-users@itk.org<br>Datum: Freitag, 25. Februar, 2011 10:51 Uhr<br><br><div class="plainMail">Hi Ella,<br><br>I wonder if that could be an issue of file formats supported by ITK, although <br>I'd expect to see an ITK error message.&nbsp; The code works for me,
 anyway.<br><br>Have you tried building it as I did?&nbsp; Mind you, I'm using Visual Studio 8 2005.<br><br>Gib<br><br>On 25/02/2011 8:20 p.m., Ella Maria Kadas wrote:<br>&gt; Hi Gib,<br>&gt;<br>&gt; I managed to build ITK, VTK, and run the ImageReadWrite.cxx.<br>&gt; It seems that the folder structure suggested by John Drescher worked for me.<br>&gt; I still get a First-chance exception at 0x7c812afb in ImageReadWrite.exe:<br>&gt; Microsoft C++ exception: itk::ExceptionObject at memory location 0x0137f6b8..<br>&gt; The program '[3412] ImageReadWrite.exe: Native' has exited with code 1 (0x1).<br>&gt; I googled it and it seems to be a a notification to the debugger so it can stop<br>&gt; the program.<br>&gt; But i still can't see the result image. My image is a gray scale jpeg 164x120<br>&gt; Here is my code:<br>&gt; #if defined(_MSC_VER)<br>&gt; #pragma warning ( disable : 4786 )<br>&gt; #endif<br>&gt;<br>&gt; #ifdef __BORLANDC__<br>&gt; #define
 ITK_LEAN_AND_MEAN<br>&gt; #endif<br>&gt;<br>&gt; #include "itkImageFileReader.h"<br>&gt; #include "itkImageFileWriter.h"<br>&gt; #include "itkImage.h"<br>&gt;<br>&gt;<br>&gt; int main( int argc, char ** argv )<br>&gt; {<br>&gt;<br>&gt;<br>&gt; typedef short PixelType;<br>&gt; const unsigned int Dimension = 2;<br>&gt; typedef itk::Image&lt; PixelType, Dimension &gt; ImageType;<br>&gt; typedef itk::ImageFileReader&lt; ImageType &gt; ReaderType;<br>&gt; typedef itk::ImageFileWriter&lt; ImageType &gt; WriterType;<br>&gt;<br>&gt; ReaderType::Pointer reader = ReaderType::New();<br>&gt; WriterType::Pointer writer = WriterType::New();<br>&gt;<br>&gt; const char * inputFilename = "bla.jpg";<br>&gt; const char * outputFilename = "bla2.jpg";<br>&gt;<br>&gt; reader-&gt;SetFileName( inputFilename );<br>&gt; writer-&gt;SetFileName( outputFilename );<br>&gt;<br>&gt; try<br>&gt; {<br>&gt; writer-&gt;Update();<br>&gt; }<br>&gt; catch( itk::ExceptionObject &amp; err
 )<br>&gt; {<br>&gt; std::cerr &lt;&lt; "ExceptionObject caught !" &lt;&lt; std::endl;<br>&gt; std::cerr &lt;&lt; err &lt;&lt; std::endl;<br>&gt; return EXIT_FAILURE;<br>&gt; }<br>&gt;<br>&gt; return EXIT_SUCCESS;<br>&gt; }<br>&gt; Cheers,<br>&gt; Ella<br>&gt;<br>&gt;<br></div></blockquote></b></div></td></tr></table><br>