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

Bill Lorensen bill.lorensen at gmail.com
Tue Jul 21 23:23:05 EDT 2009


The source code he posted shows that he is trying to write the type:
typedef itk::Image<VectorType, ImageDimension>
                 DeformationFieldType;
where VectorType is float.

2009/7/21 Ramón Casero Cañas <ramon.casero at comlab.ox.ac.uk>:
> Bill Lorensen wrote:
>>
>> 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.
>
>
> Hi Bill,
>
> Thaks for your reply. I don't think we have expressed any issues about the
> exception itself, but motes said that he's defining the PixelType as
> unsigned char/short, yet writing the data fails.
>
> Oh! Is this a problem with any of the intermediate steps changing the pixel
> type?
>
> On a related note: Where is the method GetComponentType() called by
> PNGImageIO::WriteSlice declared? I'm sure it's very obvious where it is, but
> I have been searching for it in the ITK code (grep and [1]), and I couldn't
> find it.
>
> [1] http://www.itk.org/Doxygen/html/functions.html
>
> 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/
>


More information about the Insight-users mailing list