[Insight-users] failed to connect ITK with VTK

Luis Ibanez luis.ibanez@kitware.com
Mon, 14 Apr 2003 11:04:03 -0400


Hi Helder,

You seem to be using VTK 3.2
This VTK version will *not* work
with ITK applications.


    Please use VTK 4.2


Regards,


   Luis

--------------------------------------
Helder Carvalho wrote:
> Hi Luis,
> 
> As i said on my previous mail, i downloaded the the VTK with CVS by 
> checking the module VTK. When it finished, i did seach for the cmakelist 
> on the folder, but there where none.I then openned the vtk/README.html, 
> and i found the following installation instructions:
> 
> " The PC build process requires running a program to build dependencies 
> and makefiles. Then you use the compiler make utility to compile as 
> follows.
> 
>    1. Install vtk3.2 distribution by unzipping into the appropriate 
> directory.
> 
>    2. Execute vtk\pcmaker\pcmaker.exe. This will pop-up a little
>       GUI that allows you to tailor the build. It then starts
>       building makefiles and dependencies. It will run for a couple
>       minutes depending on your system. You'll have to tell pcamaker
>       where you've placed your VTK source code, and where to build
>       the object code and dll's (we'll call it "vtkbin").
> 
>    3. When pcmaker completes, start up a MS-DOS shell window
>       and change directories to vtkbin\vtkdll. Then run
>       "nmake" (Microsoft compiler). This will compile for
>       a LONG time. When it's done, you'll have a vtkdll.dll
>       file in vtkbin\vtkdll\obj. You can then move this
>       file into the appropriate system directory
>       (on Win95: Windows\System; on NT: WinNT\system).
> 
>    4. If you want to use Tcl/Tk on your PC, repeat step 3 above
>       except work in directory vtkbin\vtktcl to create
>       vtkbin\vtktcl\vtktcl.dll. Remember to move this file into your
>       system area. (You'll also have to have Tcl (e.g., Wish)
>       installed.)
> 
>    5. You can then link against vtkdll.dll (C++); or run Tcl
>       (wish). If you're running Tcl, make sure you start by
>       dynamically loading the vtktcl libraries with the command
>       "load vtktcl".
> 
>    6. Enjoy.
> 
> We recommend a 300MByte minimum swap size or you'll have trouble during 
> the link phase."
> 
> I made this ,tested the VTK and it runned fine. But as i said i couldnt 
> use it because it was not built with CMake. After i sent you the mail, i
> went to the VTK web page and downloaded the VTK 4.2 , that was supposed 
> to be for linux users this version used CMAke and i used it, after 
> intalling it, to build InsightApplications. But as bad luck seems to 
> follow me around in every step i take, i got this error while building 
> the insightApplications.dsw:
> 
> --------------------Configuration: itkCurvatureFlowToVTK - Win32 
> Debug--------------------
> Compiling...
> itkCurvatureFlowToVTK.cxx
> Linking...
> --------------------Configuration: itkPNGVTKtoITKtoVTK - Win32 
> Debug--------------------
> Compiling...
> itkPNGVTKtoITKtoVTK.cxx
> Linking...
> --------------------Configuration: itkVTKtoITKtoVTK - Win32 
> Debug--------------------
> Compiling...
> itkVTKtoITKtoVTK.cxx
> Linking...
> --------------------Configuration: vtk2itk - Win32 
> Debug--------------------
> Compiling...
> vtk2itk.cxx
> Linking...
> --------------------Configuration: vtk2itkDouble - Win32 
> Debug--------------------
> Compiling...
> vtk2itkDouble.cxx
> Linking...
> --------------------Configuration: itk2DAnisotropicDiffusionImageFilter 
> - Win32 Debug--------------------
> Compiling...
> itk2DAnisotropicDiffusionImageFilter.cxx
> C:\Program 
> Files\Die_Heart\InsightApplications\AnisotropicDiffusionImageFilter\itk2DAnisotropicDiffusionImageFilter.cxx(58) 
> : error C2039: 'SetNumberOfIterations' : is not a member of 
> 'GradientAnisotropicDiffusionImageFilter<class itk::Image<float,2
> 
>> ,class itk::Image<float,2> >'
> 
> Error executing cl.exe.
> 
> ALL_BUILD - 1 error(s), 0 warning(s)
> 
> 
> 
> And now i've got another problem, when  i tried to build the project.dsw 
> i got, from making the cmake of the examples folder on ITK i get the 
> following linking errors, i got no errors when i built the ITK project 
> but i got this while triyngo to built the individual examples folder:
> 
> 
> 
> 
> "--------------------Configuration: Image2 - Win32 
> Debug--------------------
> Linking...
>   Creating library Debug/Image2.lib and object Debug/Image2.exp
> ITKIO.lib(itkAnalyzeImageIO.obj) : error LNK2001: unresolved external 
> symbol _gzclose
> ITKIO.lib(itkAnalyzeImageIO.obj) : error LNK2001: unresolved external 
> symbol _gzread
> ITKIO.lib(itkAnalyzeImageIO.obj) : error LNK2001: unresolved external 
> symbol _gzopen
> ITKIO.lib(itkAnalyzeImageIO.obj) : error LNK2001: unresolved external 
> symbol _gzwrite
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external 
> symbol "public: virtual __thiscall MetaImage::~MetaImage(void)" 
> (??1MetaImage@@UAE@XZ)
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external 
> symbol "bool __cdecl MET_SystemByteOrderMSB(void)" 
> (?MET_SystemByteOrderMSB@@YA_NXZ)
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external 
> symbol "public: __thiscall MetaImage::MetaImage(void)" 
> (??0MetaImage@@QAE@XZ)
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external 
> symbol "public: void __thiscall MetaImage::ElementDataFileName(char 
> const *)" (?ElementDataFileName@MetaImage@@QAEXPBD@Z)
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external 
> symbol "public: float __thiscall MetaObject::Position(int)const " 
> (?Position@MetaObject@@QBEMH@Z)
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external 
> symbol "public: float __thiscall MetaObject::ElementSpacing(int)const " 
> (?ElementSpacing@MetaObject@@QBEMH@Z)
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external 
> symbol "public: int __thiscall MetaImage::DimSize(int)const " 
> (?DimSize@MetaImage@@QBEHH@Z)
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external 
> symbol "public: int __thiscall MetaObject::NDims(void)const " 
> (?NDims@MetaObject@@QBEHXZ)
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external 
> symbol "public: enum MET_ValueEnumType  __thiscall 
> MetaImage::ElementType(void)const " 
> (?ElementType@MetaImage@@QBE?AW4MET_ValueEnumType@@XZ)
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external 
> symbol "public: int __thiscall 
> MetaImage::ElementNumberOfChannels(void)const " 
> (?ElementNumberOfChannels@MetaImage@@QBEHXZ)
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external 
> symbol "public: bool __thiscall MetaObject::BinaryData(void)const " 
> (?BinaryData@MetaObject@@QBE_NXZ)
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external 
> symbol "public: bool __thiscall MetaImage::ElementByteOrderFix(void)" 
> (?ElementByteOrderFix@MetaImage@@QAE_NXZ)
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external 
> symbol "public: char const * __thiscall 
> MetaImage::ElementDataFileName(void)const " 
> (?ElementDataFileName@MetaImage@@QBEPBDXZ)
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external 
> symbol "public: void __thiscall MetaObject::BinaryData(bool)" 
> (?BinaryData@MetaObject@@QAEX_N@Z)
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external 
> symbol "public: void __thiscall MetaObject::Position(float const *)" 
> (?Position@MetaObject@@QAEXPBM@Z)
> ITKIO.lib(itkMetaImageIO.obj) : error LNK2001: unresolved external 
> symbol "public: bool __thiscall MetaImage::InitializeEssential(int,int 
> const *,float const *,enum MET_ValueEnumType,int,void *,bool)" 
> (?InitializeEssential@MetaImage@@QAE_NHPBHPBMW4M
> ET_ValueEnumType@@HPAX_N@Z)
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol 
> _png_destroy_read_struct
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol 
> _png_create_info_struct
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol 
> _png_create_read_struct
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol 
> _png_sig_cmp
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol 
> _png_read_end
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol 
> _png_read_image
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol 
> _png_get_rowbytes
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol 
> _png_read_update_info
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol 
> _png_set_swap
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol 
> _png_set_tRNS_to_alpha
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol 
> _png_get_valid
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol 
> _png_set_gray_1_2_4_to_8
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol 
> _png_set_palette_to_rgb
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol 
> _png_get_IHDR
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol 
> _png_read_info
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol 
> _png_set_sig_bytes
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol 
> _png_init_io
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol 
> _png_get_sCAL
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol 
> _png_get_channels
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol 
> _png_write_end
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol 
> _png_write_image
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol 
> _png_write_info
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol 
> _png_set_sCAL
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol 
> _png_set_compression_level
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol 
> _png_set_IHDR
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol 
> _png_destroy_write_struct
> ITKIO.lib(itkPNGImageIO.obj) : error LNK2001: unresolved external symbol 
> _png_create_write_struct
> Debug/Image2.exe : fatal error LNK1120: 47 unresolved externals
> Error executing link.exe.
> 
> ALL_BUILD - 48 error(s), 0 warning(s)
> 
> Can you please help me with this.
> Sorry to bother you so much,
> Best regards,
> 
> Helder
> 
> 
> 
> 
> 
> 
>> From: Luis Ibanez <luis.ibanez@kitware.com>
>> To: Helder Carvalho <hel_carvalho@hotmail.com>,   
>> Insight-users@public.kitware.com
>> Subject: Re: [Insight-users] failed to connect ITK with VTK
>> Date: Sat, 12 Apr 2003 02:36:32 -0400
>>
>>
>> Hi Helder,
>>
>> VTK 4.2 and the CVS version *do* use CMake for configuration.
>>
>> You may not be following the build instructions correctly.
>>
>> Note that in the VTK source tree that you obtain from CVS
>> there is a CMakeLists.txt file on each directory. The the
>> footprint of CMake  :-)
>>
>> Please configure VTK with CMake (you will need CMake 1.6.5)
>>
>>
>> Regards,
>>
>>
>>    Luis
>>
>>
>> -----------------------------------------
>> Helder Carvalho wrote:
>>
>>> hi Luis,
>>>
>>> I tried to change the CMake flag to put the VTK_USE_ANSI_STDLIB ON, 
>>> but there were no option available to do so. So the next step i 
>>> took,was to download VTK 4.2 by CVS. This new VTK does not need CMake 
>>> it compiles with nmake so there are no files related to Cmake, the 
>>> good news were that there was a option to build VTK with the 
>>> ANSI_STDLIB.
>>> After that I tried the InsightApplications CMake but it asks for the 
>>> VTKconfig.cmake file if someone needs to interact with VTK, this file 
>>> does not exists because vtk does not need CMAke,so itīs not possible 
>>> to build the applications interacting with VTK. What can i do now??
>>>
>>> regards,
>>> Helder
>>>
>>>
>>>
>>
> 
> 
> _________________________________________________________________
> Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
> http://join.msn.com/?page=features/featuredemail
> 
>