<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 > Linker <br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; ">> General > 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 <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" 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><g.bogle@auckland.ac.nz></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 <g.bogle@auckland.ac.nz><br>Betreff: Re: Can't see result imae from ImageReadWrite<br>An: "Ella Maria Kadas" <ella_kadas@yahoo.com><br>CC: "John Drescher" <drescherjm@gmail.com>, 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. The code works for me,
anyway.<br><br>Have you tried building it as I did? 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>> 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:<br>> 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<br>> 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>><br>><br></div></blockquote></b></div></td></tr></table><br>