<div dir="ltr"><div>Dear Dan,</div><div><br></div><div>the error is not clear something like that:</div><div> </div><variable optimized away by compiler><br><br><div>Best regards </div><div><br></div><div><br><div class="gmail_quote">
On Tue, Dec 28, 2010 at 2:17 PM, Dan Mueller <span dir="ltr"><<a href="mailto:dan.muel@gmail.com">dan.muel@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Ali,<br>
<br>
Can you please include the exception details? e.g. what is written to<br>
std::cerr? These messages are usually pretty informative...<br>
<br>
Cheers, Dan<br>
<div><div></div><div class="h5"><br>
On 28 December 2010 12:50, Ali Habib <<a href="mailto:ali.mahmoud.habib@gmail.com">ali.mahmoud.habib@gmail.com</a>> wrote:<br>
> Dear All,<br>
> I used the following code to read DICOM file , but it always enter the catch<br>
> , am I forget something<br>
><br>
> typedef signed short InputPixelType;<br>
> const unsigned int InputDimension = 2;<br>
> typedef itk::Image< InputPixelType, InputDimension > InputImageType;<br>
> typedef itk::ImageFileReader< InputImageType > ReaderType;<br>
> typedef InputImageType::SizeType SizeType;<br>
> ReaderType::Pointer reader = ReaderType::New();<br>
> reader->SetFileName( "IM35" );<br>
> typedef itk::GDCMImageIO ImageIOType;<br>
> ImageIOType::Pointer gdcmImageIO = ImageIOType::New();<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>
> any suggestion please<br>
</div></div>> _____________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
><br>
><br>
</blockquote></div><br></div></div>