[Insight-users] Compilation error when including itkTIFFImageIO.h

Bradley Lowekamp blowekamp at mail.nih.gov
Wed Feb 20 08:46:21 EST 2013


It looks like you have already done this. If you are not going to use CMake, it's important to make sure you install ITK into a directory. This will flatten the libraries and include directories to a manage able size.

CMake also provides additional automatic registration if ITK's IOFactories, you will need to manually do this. From a trivial ITK build with CMake you would need to find a directory ITKIOFactoryRegistration which contains two header files which define the the classes  ImageIOFactoryRegisterManager and TransformIOFactoryRegisterManager. You will need to copy these files into your project and create static variables of them, or manually register each factory. I hope this is enough to get you started.

I don't think we have any "official" wiki instructions on how to use ITKv4 without CMake, as it's a little tricky.

Brad



On Feb 20, 2013, at 8:05 AM, Bill Lorensen <bill.lorensen at gmail.com> wrote:

> To determine which libraries and includes you need, I suggest
> configuring a small program that uses  itk with cmake and seeing what
> is required. Then add those to your app.
> 
> You can download a tarball containing an example from the itk wiki
> with its associated cmake file. For example:
> http://www.itk.org/Wiki/ITK/Examples/IO/ImageFileWriter
> 
> This will also show if your install is OK.
> 
> 
> On Wed, Feb 20, 2013 at 3:36 AM, Françoise LEFEBVRE
> <lefebvre at imnc.in2p3.fr> wrote:
>> 
>> 
>> Hi,
>> 
>> Thank for the reply.
>> 
>> The main reason is that I develop  other applications with qt /msvc and
>> qmake is a very good tool for such applications. Adding itk libraries
>> into a .pro file was not an issue with older versions of qt and itk.
>> 
>> F. Lefebvre
>> 
>> Le 19/02/2013 18:49, Bill Lorensen a écrit :
>>> 
>>> Is there some reason you are not using CMake?
>>> 
>>> On Tue, Feb 19, 2013 at 11:28 AM, Françoise LEFEBVRE
>>> <lefebvre at imnc.in2p3.fr> wrote:
>>>> 
>>>> Hello,
>>>> 
>>>> I sent a message some days ago but I've got no answer. The following
>>>> problem
>>>> is really blocking for my soft :
>>>> 
>>>> I am working with MSVC2010, ITK4.3 and QT5.0.1 and the makefile is
>>>> generated
>>>> from a .pro file using qmake.
>>>> 
>>>> When including  :
>>>> 
>>>> #include <itkTIFFImageIO.h>
>>>> 
>>>> the project does not compile because of the following error :
>>>> 
>>>> c:\appli\itk\include\itk-4.3\itktiff\tiff.h(31): fatal error C1083:
>>>> unable
>>>> to open include : 'tif_config.h' : No such file or directory
>>>> 
>>>> Indeed the file tif_config.h is not in the
>>>> "(CMAKE_INSTALL_PREFIX)\include\itk-4.3\itktif"  directory whereas the
>>>> installation seemed to be OK. I don't have any problem with png or jpeg
>>>> files.
>>>> 
>>>> Thank you for your help
>>>> 
>>>> F. Lefebvre
>>>> 
>>>> _____________________________________
>>>> Powered by www.kitware.com
>>>> 
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.html
>>>> 
>>>> Kitware offers ITK Training Courses, for more information visit:
>>>> http://www.kitware.com/products/protraining.php
>>>> 
>>>> 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
>>> 
>>> 
>>> 
>> 
>> --
>> Françoise LEFEBVRE
>> IMNC (Imagerie et Modélisation en Neurobiologie et Cancérologie)
>> Campus d'Orsay - Bât 440
>> 91405 ORSAY Cedex
>> 01 69 15 51 87
>> 
>> 
>> 
> 
> 
> 
> -- 
> Unpaid intern in BillsBasement at noware dot com
> _____________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
> 
> 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