[Insight-users] ITKIO changes in ITK 2.6.0
Brian Eastwood
beastwoo at email.unc.edu
Fri Mar 17 18:44:01 EST 2006
Mathieu Malaterre wrote:
> Brian Eastwood wrote:
>
>> Hi All,
>>
>> I use a set of third party libraries (ImageMagick) to handle image IO
>> because ITK doesn't seem to open certain tiffs, notably 16-bit tiffs
>> from some microscope cameras in my lab. I usually have to configure
>> ITK to use ImageMagick's external tiff library (to avoid linking
>> errors), but I still read images through ImageMagick APIs. In the
>> recent ITK 2.6.0 release, I get the following linking error:
>>
>> CORE_RL_jp2_.lib(jp2_dec.obj) : error LNK2005: _jp2_decode already
>> defined in itkopenjpeg.lib(jp2.obj)
>> CORE_RL_jp2_.lib(jp2_dec.obj) : warning LNK4006: _jp2_decode already
>> defined in itkopenjpeg.lib(jp2.obj); second definition ignored
>>
>> To me, this indicates ITK and ImageMagick have used the same symbols
>> within their jpeg libraries. Is there a similar way to point ITK to
>> external jpeg libraries to avoid these errors?
>
>
> Ohhhhh that's nasty :)
>
> ImageMagick is using Jasper for there -buggy- implementation of
> JPEG2000, whereas ITK is using OpenJPEG ... and of course those two
> project decided to use the same name for declaring there main function :)
>
> Could you please add a bug report to the itk bug report at:
>
> http://www.itk.org/Bug
>
> Add something like: "Need name mangling for openjpeg.", and assign it
> to me.
>
> Also as a side note, ITK uses the latest Tiff library. Could you
> please detail the exact problem you are having with your tiff file.
> Eventually opening a bug report (with your data) and code to reproduce.
>
> Thanks
> Mathieu
Hi Mathieu,
Looks like the tiffs I had problems with are now loading through ITK.
My group has historically used ImageMagick because it could open most
anything we threw at it. With eariler versions of ITK (maybe 1.8 or
2.0), my app would crash when reading some tiffs. With the previous
version (2.4.1), ITK would no longer crash, but images were not read as
16 bit (I would get weird wrap-around images). Now it looks like
everything works! Incidently, I do get a warning on reading my tiff
images, but I'm guessing these unknown fields are ignored, and they
don't seem to effect the image data:
TIFFReadDirectory: Warning, D:/Nano/data/Fibrin/mani402.tif: unknown
field with tag 317 (0x13d) encountered.
TIFFReadDirectory: Warning, D:/Nano/data/Fibrin/mani402.tif: unknown
field with tag 33628 (0x835c) encountered.
I have posted this image at:
http://www.cs.unc.edu/~beastwoo/images/mani402.tif
I'll still open a bug for the name mangling with the jpeg libraries, in
case someone has a better reason for wanting to use a third party IO
library. I'll discuss with my group to see if I can use only the ITK IO
api now.
Thanks,
Brian
More information about the Insight-users
mailing list