I think I already know, what you meant - you tought to add to "Additional Dependencies" under "Project Properties" directly the library "ITKBasicFilters.lib", but I can't locate this lib in library folder "\lib\Debug" under the ITKv4 build.<br>
<br>I tried to add this lib file from build of ITK 3.20, where is this file present (in bin\Debug) and now it works!<br><br>But now I have to use build of ITKv4 (which I use normally) and also the build of ITKv3.20 (from which I use only the ITKBasicFilters.lib). <br>
<br>Is there some way to get ITKBasicFilters.lib from build of ITKv4?<br><br>Thanks.<br><br>Michal<br><br><div class="gmail_quote">2011/4/11 Bc. Michal Srna <span dir="ltr"><<a href="mailto:michal@srna.info">michal@srna.info</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">Thanks for reply Luis,<br><br>I have located the file "itkVTKImageExportBase.cxx" in <br><br>
InsightToolkit_SOURCE_DIR\<div>Modules\Bridge\VTK\src<br><br>because I use ITKv4 from git.<br><br>I don't know If I understood you right - I added that folder (InsightToolkit_SOURCE_DIR\Modules\Bridge\VTK\src),
which contains file "itkVTKImageExportBase.cxx" into Additional Library
Directories under my project properties in MVSC++, but nothing
happened.<br>
<br>Am I doing something wrong?<br><br>Thanks for help in advance!</div><br><br></div><div class="gmail_quote"><div class="im">2011/4/11 Luis Ibanez <span dir="ltr"><<a href="mailto:luis.ibanez@kitware.com" target="_blank">luis.ibanez@kitware.com</a>></span><br>
</div><div><div></div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Michal,<br>
<br>
<br>
You are missing to link to the library<br>
<br>
ITKBasicFilters<br>
<br>
<br>
In general, whenever you get a link error about missing<br>
symbols, you could try greping for that symbol in the<br>
source tree of the toolkit (that's the beauty of open source).<br>
<br>
In this case, if you grep for the symbol with the command:<br>
<br>
grep -lr GetCallbackUserData *<br>
<br>
you will get:<br>
<br>
Code/BasicFilters/itkVTKImageExportBase.h<br>
Code/BasicFilters/itkVTKImageExportBase.cxx<br>
Wrapping/WrapITK/ExternalProjects/ItkVtkGlue/src/itkVTKImageToImageFilter.txx<br>
Wrapping/WrapITK/ExternalProjects/ItkVtkGlue/src/itkImageToVTKImageFilter.txx<br>
<br>
<br>
you can discard the hits in the Wrapping directory<br>
(unless you are doing wrapping, of course).<br>
<br>
<br>
So you are left with a .cxx file in the directory<br>
<br>
Code/BasicFilters<br>
<br>
If you then open the CMakeLists.txt file and search<br>
for "itkVTKImageExportBase.cxx" you will find it in<br>
the line:<br>
<br>
ADD_LIBRARY(ITKBasicFilters itkVTKImageExportBase.cxx)<br>
<br>
Which states the the itkVTKImageExportBase.cxx will be<br>
used to create the library "ITKBasicFilters".<br>
<br>
<br>
Therefore,...<br>
you can resolve the missing symbol by adding<br>
<br>
ITKBasicFilters<br>
<br>
to your list of libraries to link against.<br>
<br>
<br>
---------------------------------------------------------------------<br>
<br>
<br>
"Glimpsing at the Source<br>
leavers no doubt"<br>
<br>
Ming Dao<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
<br>
Luis<br>
<br>
<br>
------------------------------------------------<br>
<div>On Sun, Apr 10, 2011 at 1:08 PM, Bc. Michal Srna <<a href="mailto:michal@srna.info" target="_blank">michal@srna.info</a>> wrote:<br>
</div><div><div></div><div>> Hello VTK users,<br>
><br>
> in my project I use ITKv4 and now I would like to use some features of VTK.<br>
> I downloaded the latest version vtk-5.6.1, used CMAKE, without errors build<br>
> VTK with MVSC++ 2008 and added path to all VTK libraries to project<br>
> properties. I also added all VTK *.lib files to Additional Dependencies<br>
> under project properties.<br>
><br>
> Now I want only to connect output of ITK pipeline to VTK, the code is:<br>
><br>
> typedef itk::ImageToVTKImageFilter<TransformedImageType> ConnectorType;<br>
> ConnectorType::Pointer connector= ConnectorType::New();<br>
><br>
> connector->SetInput( TransformedImportFilter->GetOutput() );<br>
><br>
> where TransformedImportFilter is ITK output of ImportImageFilter.<br>
><br>
> I also included this headers:<br>
><br>
> #include "itkImageToVTKImageFilter.h"<br>
><br>
> When I want to compile my project, I get these errors:<br>
><br>
> 1>visualization_routines.obj : error LNK2019: unresolved external symbol<br>
> "public: void * __thiscall<br>
> itk::VTKImageExportBase::GetCallbackUserData(void)"<br>
> (?GetCallbackUserData@VTKImageExportBase@itk@@QAEPAXXZ) referenced in<br>
> function "protected: __thiscall itk::ImageToVTKImageFilter<class<br>
> itk::Image<short,3> >::ImageToVTKImageFilter<class itk::Image<short,3><br>
>>(void)" (??0?$ImageToVTKImageFilter@V?$Image@F$02@itk@@@itk@@IAE@XZ)<br>
> 1>visualization_routines.obj : error LNK2019: unresolved external symbol<br>
> "public: void * (__cdecl*__thiscall<br>
> itk::VTKImageExportBase::GetBufferPointerCallback(void)const )(void *)"<br>
> (?GetBufferPointerCallback@VTKImageExportBase@itk@@QBEP6APAXPAX@ZXZ)<br>
> referenced in function "protected: __thiscall<br>
> itk::ImageToVTKImageFilter<class itk::Image<short,3><br>
>>::ImageToVTKImageFilter<class itk::Image<short,3> >(void)"<br>
> (??0?$ImageToVTKImageFilter@V?$Image@F$02@itk@@@itk@@IAE@XZ)<br>
> 1>visualization_routines.obj : error LNK2019: unresolved external symbol<br>
> "public: int * (__cdecl*__thiscall<br>
> itk::VTKImageExportBase::GetDataExtentCallback(void)const )(void *)"<br>
> (?GetDataExtentCallback@VTKImageExportBase@itk@@QBEP6APAHPAX@ZXZ) referenced<br>
> in function "protected: __thiscall itk::ImageToVTKImageFilter<class<br>
> itk::Image<short,3> >::ImageToVTKImageFilter<class itk::Image<short,3><br>
>>(void)" (??0?$ImageToVTKImageFilter@V?$Image@F$02@itk@@@itk@@IAE@XZ)<br>
> 1>visualization_routines.obj : error LNK2019: unresolved external symbol<br>
> "public: void (__cdecl*__thiscall<br>
> itk::VTKImageExportBase::GetUpdateDataCallback(void)const )(void *)"<br>
> (?GetUpdateDataCallback@VTKImageExportBase@itk@@QBEP6AXPAX@ZXZ) referenced<br>
> in function "protected: __thiscall itk::ImageToVTKImageFilter<class<br>
> itk::Image<short,3> >::ImageToVTKImageFilter<class itk::Image<short,3><br>
>>(void)" (??0?$ImageToVTKImageFilter@V?$Image@F$02@itk@@@itk@@IAE@XZ)<br>
> 1>visualization_routines.obj : error LNK2019: unresolved external symbol<br>
> "public: void (__cdecl*__thiscall<br>
> itk::VTKImageExportBase::GetPropagateUpdateExtentCallback(void)const )(void<br>
> *,int *)"<br>
> (?GetPropagateUpdateExtentCallback@VTKImageExportBase@itk@@QBEP6AXPAXPAH@ZXZ)<br>
> referenced in function "protected: __thiscall<br>
> itk::ImageToVTKImageFilter<class itk::Image<short,3><br>
>>::ImageToVTKImageFilter<class itk::Image<short,3> >(void)"<br>
> (??0?$ImageToVTKImageFilter@V?$Image@F$02@itk@@@itk@@IAE@XZ)<br>
> 1>visualization_routines.obj : error LNK2019: unresolved external symbol<br>
> "public: int (__cdecl*__thiscall<br>
> itk::VTKImageExportBase::GetNumberOfComponentsCallback(void)const )(void *)"<br>
> (?GetNumberOfComponentsCallback@VTKImageExportBase@itk@@QBEP6AHPAX@ZXZ)<br>
> referenced in function "protected: __thiscall<br>
> itk::ImageToVTKImageFilter<class itk::Image<short,3><br>
>>::ImageToVTKImageFilter<class itk::Image<short,3> >(void)"<br>
> (??0?$ImageToVTKImageFilter@V?$Image@F$02@itk@@@itk@@IAE@XZ)<br>
> 1>visualization_routines.obj : error LNK2019: unresolved external symbol<br>
> "public: char const * (__cdecl*__thiscall<br>
> itk::VTKImageExportBase::GetScalarTypeCallback(void)const )(void *)"<br>
> (?GetScalarTypeCallback@VTKImageExportBase@itk@@QBEP6APBDPAX@ZXZ) referenced<br>
> in function "protected: __thiscall itk::ImageToVTKImageFilter<class<br>
> itk::Image<short,3> >::ImageToVTKImageFilter<class itk::Image<short,3><br>
>>(void)" (??0?$ImageToVTKImageFilter@V?$Image@F$02@itk@@@itk@@IAE@XZ)<br>
> 1>visualization_routines.obj : error LNK2019: unresolved external symbol<br>
> "public: class itk::VTKImageExportBase::CallbackTypeProxy __thiscall<br>
> itk::VTKImageExportBase::GetOriginCallback(void)const "<br>
> (?GetOriginCallback@VTKImageExportBase@itk@@QBE?AVCallbackTypeProxy@12@XZ)<br>
> referenced in function "protected: __thiscall<br>
> itk::ImageToVTKImageFilter<class itk::Image<short,3><br>
>>::ImageToVTKImageFilter<class itk::Image<short,3> >(void)"<br>
> (??0?$ImageToVTKImageFilter@V?$Image@F$02@itk@@@itk@@IAE@XZ)<br>
> 1>visualization_routines.obj : error LNK2019: unresolved external symbol<br>
> "public: class itk::VTKImageExportBase::CallbackTypeProxy __thiscall<br>
> itk::VTKImageExportBase::GetSpacingCallback(void)const "<br>
> (?GetSpacingCallback@VTKImageExportBase@itk@@QBE?AVCallbackTypeProxy@12@XZ)<br>
> referenced in function "protected: __thiscall<br>
> itk::ImageToVTKImageFilter<class itk::Image<short,3><br>
>>::ImageToVTKImageFilter<class itk::Image<short,3> >(void)"<br>
> (??0?$ImageToVTKImageFilter@V?$Image@F$02@itk@@@itk@@IAE@XZ)<br>
> 1>visualization_routines.obj : error LNK2019: unresolved external symbol<br>
> "public: int * (__cdecl*__thiscall<br>
> itk::VTKImageExportBase::GetWholeExtentCallback(void)const )(void *)"<br>
> (?GetWholeExtentCallback@VTKImageExportBase@itk@@QBEP6APAHPAX@ZXZ)<br>
> referenced in function "protected: __thiscall<br>
> itk::ImageToVTKImageFilter<class itk::Image<short,3><br>
>>::ImageToVTKImageFilter<class itk::Image<short,3> >(void)"<br>
> (??0?$ImageToVTKImageFilter@V?$Image@F$02@itk@@@itk@@IAE@XZ)<br>
> 1>visualization_routines.obj : error LNK2019: unresolved external symbol<br>
> "public: int (__cdecl*__thiscall<br>
> itk::VTKImageExportBase::GetPipelineModifiedCallback(void)const )(void *)"<br>
> (?GetPipelineModifiedCallback@VTKImageExportBase@itk@@QBEP6AHPAX@ZXZ)<br>
> referenced in function "protected: __thiscall<br>
> itk::ImageToVTKImageFilter<class itk::Image<short,3><br>
>>::ImageToVTKImageFilter<class itk::Image<short,3> >(void)"<br>
> (??0?$ImageToVTKImageFilter@V?$Image@F$02@itk@@@itk@@IAE@XZ)<br>
> 1>visualization_routines.obj : error LNK2019: unresolved external symbol<br>
> "public: void (__cdecl*__thiscall<br>
> itk::VTKImageExportBase::GetUpdateInformationCallback(void)const )(void *)"<br>
> (?GetUpdateInformationCallback@VTKImageExportBase@itk@@QBEP6AXPAX@ZXZ)<br>
> referenced in function "protected: __thiscall<br>
> itk::ImageToVTKImageFilter<class itk::Image<short,3><br>
>>::ImageToVTKImageFilter<class itk::Image<short,3> >(void)"<br>
> (??0?$ImageToVTKImageFilter@V?$Image@F$02@itk@@@itk@@IAE@XZ)<br>
> 1>visualization_routines.obj : error LNK2019: unresolved external symbol<br>
> "protected: __thiscall itk::VTKImageExportBase::VTKImageExportBase(void)"<br>
> (??0VTKImageExportBase@itk@@IAE@XZ) referenced in function "protected:<br>
> __thiscall itk::VTKImageExport<class itk::Image<short,3><br>
>>::VTKImageExport<class itk::Image<short,3> >(void)"<br>
> (??0?$VTKImageExport@V?$Image@F$02@itk@@@itk@@IAE@XZ)<br>
> 1>visualization_routines.obj : error LNK2001: unresolved external symbol<br>
> "protected: virtual void __thiscall<br>
> itk::VTKImageExportBase::UpdateInformationCallback(void)"<br>
> (?UpdateInformationCallback@VTKImageExportBase@itk@@MAEXXZ)<br>
> 1>visualization_routines.obj : error LNK2001: unresolved external symbol<br>
> "protected: virtual int __thiscall<br>
> itk::VTKImageExportBase::PipelineModifiedCallback(void)"<br>
> (?PipelineModifiedCallback@VTKImageExportBase@itk@@MAEHXZ)<br>
> 1>visualization_routines.obj : error LNK2001: unresolved external symbol<br>
> "protected: virtual void __thiscall<br>
> itk::VTKImageExportBase::UpdateDataCallback(void)"<br>
> (?UpdateDataCallback@VTKImageExportBase@itk@@MAEXXZ)<br>
> 1>visualization_routines.obj : error LNK2001: unresolved external symbol<br>
> "protected: virtual void __thiscall itk::VTKImageExportBase::PrintSelf(class<br>
> std::basic_ostream<char,struct std::char_traits<char> > &,class<br>
> itk::Indent)const "<br>
> (?PrintSelf@VTKImageExportBase@itk@@MBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@VIndent@2@@Z)<br>
><br>
> Don't know, what am I doing wrong?<br>
><br>
><br>
><br>
> Best regards,<br>
><br>
> Michal<br>
><br>
> Faculty of Biomedical Engineering CTU<br>
><br>
</div></div><div><div></div><div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the VTK FAQ at:<br>
> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br>
><br>
</div></div></blockquote></div></div></div><br><br clear="all"><div><div></div><div class="h5"><br>-- <br>S pozdravem Bc. Michal Srna<br><br>Fotografické portfolio:<br><a href="http://michalsrna.cz" target="_blank">http://michalsrna.cz</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>S pozdravem Bc. Michal Srna<br><br>Fotografické portfolio:<br><a href="http://michalsrna.cz">http://michalsrna.cz</a><br>