<p dir="ltr">Are using CMake to configure your program?</p>
<div class="gmail_quote">On Mar 27, 2014 11:23 AM, "Tim Allman" <<a href="mailto:dr.tim.allman@gmail.com">dr.tim.allman@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Perhaps I misunderstand the documentation but I have written the following code with the idea that I could read arbitrary image file types and let the ImageFileReader instance figure out which ImageIO was needed. The files are Nrrd which seems to be supported but the last line fails with the error below.<br>

<br>
Any suggestions?<br>
<br>
     std::string name = /Users/tim/devel/<u></u>ConvertToDicom/Case005/out_<u></u>000.nrrd<br>
<br>
    typedef unsigned short PixelType;<br>
    typedef itk::Image<PixelType, 2u> Image2DType;<br>
    typedef itk::ImageFileReader<<u></u>Image2DType> ReaderType;<br>
<br>
    ReaderType::Pointer reader = ReaderType::New();<br>
    reader->SetFileName(name);<br>
    reader->Update();<br>
<br>
itk::ImageFileReaderException: /Users/tim/usr/local/ITK/<u></u>Universal/Debug/include/ITK-4.<u></u>5/itkImageFileReader.hxx:143:<br>
 Could not create IO object for file /Users/tim/devel/<u></u>ConvertToDicom/Case005/out_<u></u>000.nrrd<br>
  Tried to create one of the following:<br>
  You probably failed to set a file suffix, or<br>
    set the suffix to an unsupported type.<br>
<br>
Thanks,<br>
Tim<br>
<br>
-- <br>
Tim Allman, Ph.D.<br>
35 Margaret Street,<br>
Guelph Ontario N1E 5R6<br>
Canada<br>
<br>
<br>_____________________________________<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.php" target="_blank">http://www.kitware.com/products/protraining.php</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></blockquote></div>