Ok in the followup its recommended to change the type of PixelType to:<br><br>typedef unsigned char PixelType;<br>
<br>or<br>
<br>
typedef unsigned short PixelType;<br><br><br>But I already declared it as :<br><br>typedef unsigned char PixelType;<br><br>and I have also tried:<br><br>typedef unsigned short PixelType;<br><br>but I still get the same error, any ideas?<br>
<br><br><br><br><div class="gmail_quote">2009/7/21 Ramón Casero Cañas <span dir="ltr"><<a href="mailto:ramon.casero@comlab.ox.ac.uk">ramon.casero@comlab.ox.ac.uk</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">motes motes wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
But the call:<br>
fixedReader->Update();<br>
<br>
throws the exception:<br>
<br>
Exception thrown<br>
<br>
itk::ExceptionObject (00CAE438)<br>
Location: "void __thiscall itk::PNGImageIO::WriteSlice(const class<br>
std::basic_string<char,struct std::char_traits<c<br>
har>,class std::allocator<char> > &,const void *)"<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<br>
the code. It seems that the error is related to the PNG format of the file,<br>
any ideas?<br>
</blockquote>
<br></div><div class="im">
Hi motes,<br>
<br>
A quick search in google of the error, i.e. search for<br>
<br></div><div class="im">
"Description: PNG supports unsigned char and unsigned short"<br>
<br></div><div><div></div><div class="h5">
shows that this problem has been addressed in a previous thread of this list<br>
<br>
<a href="http://www.itk.org/pipermail/insight-users/2006-September/019320.html" target="_blank">http://www.itk.org/pipermail/insight-users/2006-September/019320.html</a><br>
<br>
Cheers,<br>
<br>
Ramon.<br>
<br>
-- <br>
Ramón Casero Cañas, DPhil<br>
<br>
Computational Biology, Computing Laboratory<br>
University of Oxford<br>
Wolfson Building, Parks Rd<br>
Oxford OX1 3QD<br>
<br>
tlf +44 (0) 1865 610807<br>
web <a href="http://web.comlab.ox.ac.uk/people/Ramon.CaseroCanas" target="_blank">http://web.comlab.ox.ac.uk/people/Ramon.CaseroCanas</a><br>
photos <a href="http://www.flickr.com/photos/rcasero/" target="_blank">http://www.flickr.com/photos/rcasero/</a><br>
<br>
</div></div></blockquote></div><br>