[Insight-users] Problems with fixedReader->Update();

Bill Lorensen bill.lorensen at gmail.com
Tue Jul 21 19:21:10 EDT 2009


The thrown exception is very clear...
Exception thrown

itk::ExceptionObject (00CAE438)
Location: "void __thiscall itk::PNGImageIO::WriteSlice(const class
std::basic_string<char,struct std::char_traits<c
har>,class std::allocator<char> > &,const void *)"
File: ..\..\..\Code\IO\itkPNGImageIO.cxx
Line: 473
Description: PNG supports unsigned char and unsigned short

You must choose an output file type that supports the type you are
trying to write. I would suggest .mhd. If you can think of a better
exception message, please let us know.

Bill


2009/7/21 Ramón Casero Cañas <ramon.casero at comlab.ox.ac.uk>:
> motes motes wrote:
>>
>> I tried adding:
>>
>> std::cout << "COMPONENT: " << this->GetComponentType() << std::endl;
>>
>> before the switch as you recommended but nothing gets printed. Should I
>> rebuild ITK after adding that line?
>
> Yes, please. It'd be a good idea to add a similar debug line somewhere in
> your code, to see what type it thinks it has, and whether it's the same type
> that the ITK function sees internally.
>
> Cheers,
>
> R.
>
> --
> Ramón Casero Cañas, DPhil
>
> Computational Biology, Computing Laboratory
> University of Oxford
> Wolfson Building, Parks Rd
> Oxford OX1 3QD
>
> tlf     +44 (0) 1865 610807
> web     http://web.comlab.ox.ac.uk/people/Ramon.CaseroCanas
> photos  http://www.flickr.com/photos/rcasero/
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>


More information about the Insight-users mailing list