I am trying to load the image:<br><br>InsightToolkit-3.12.0\Examples\Data\BrainProtonDensitySliceBorder20.png<br><br>into a fixedReader object:<br><br><br>...<br>...<br><br>  FixedReaderType::Pointer fixedReader = FixedReaderType::New();<br>
<br>    fixedReader-&gt;SetFileName(in_fixed);<br><br>    try<br>    {<br>      fixedReader-&gt;Update();<br>    }<br>    catch( itk::ExceptionObject &amp; excp )<br>    {<br>      std::cerr &lt;&lt; &quot;Exception thrown &quot; &lt;&lt; std::endl;<br>
      std::cerr &lt;&lt; excp &lt;&lt; std::endl;<br>      return EXIT_FAILURE;<br>    }<br><br><br>But the call:<br>      fixedReader-&gt;Update();<br><br>throws the exception:<br><br>Exception thrown<br><br>itk::ExceptionObject (00CAE438)<br>
Location: &quot;void __thiscall itk::PNGImageIO::WriteSlice(const class std::basic_string&lt;char,struct std::char_traits&lt;c<br>har&gt;,class std::allocator&lt;char&gt; &gt; &amp;,const void *)&quot;<br>File: ..\..\..\Code\IO\itkPNGImageIO.cxx<br>
Line: 473<br>Description: PNG supports unsigned char and unsigned short<br><br><br>I have tried removing the update() call but then I get an error further down the code. It seems that the error is related to the PNG format of the file, any ideas?<br>
<br>