[Insight-users] building errors when using itk::WatershedImageFilter

Dan Mueller dan.muel at gmail.com
Tue Nov 4 23:13:47 EST 2008


Hi orientation f,

Can you please post the CMake file you are using? (Are you using CMake?)

It seems you have not included ITKAlgorithms in the TARGET_LINK_LIBRARIES.

eg. TARGET_LINK_LIBRARIES( ITKIO ITKAlgorithms )

Regards, Dan

2008/11/5 orientation f <fuzengliang435 at gmail.com>:
> Hi,
> I want to use itk::WatershedImageFilter for 3D image segmentation in MSVC
> framework. The code is as follow:
> typedef
> itk::GradientAnisotropicDiffusionImageFilter<ImageType3D,ImageType3D>
> diffusionFilterType;
>  diffusionFilterType::Pointer diffusion=diffusionFilterType::New();
>
>  typedef itk::GradientMagnitudeImageFilter<ImageType3D,ImageType3D>
> gradientMagnitudeFilterType;
> gradientMagnitudeFilterType::Pointer
> gradientMagnitude=gradientMagnitudeFilterType::New();
>   typedef itk::WatershedImageFilter<ImageType3D> watershedFilterType;
>  watershedFilterType::Pointer watershed=watershedFilterType::New();
>
> When the last row is added, there are following errors:
> vtkProgramDoc.obj : error LNK2001: unresolved external symbol "public:
> virtual void __thiscall
> itk::WatershedMiniPipelineProgressCommand::Execute(class itk::Object *,class
> itk::EventObject const &)"
> (?Execute at WatershedMiniPipelineProgressCommand@itk
> @@UAEXPAVObject at 2@ABVEventObject at 2@@Z)
> vtkProgramDoc.obj : error LNK2001: unresolved external symbol "public:
> virtual void __thiscall
> itk::WatershedMiniPipelineProgressCommand::Execute(class itk::Object const
> *,class itk::EventObject const &)"
> (?Execute at WatershedMiniPipelineProgressComma
> nd at itk@@UAEXPBVObject at 2@ABVEventObject at 2@@Z)
> Debug/vtkProgram.exe : fatal error LNK1120: 2 unresolved externals
> All the librarys are included and image type are declared. Please tell me
> why!
> thanks!
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
>


More information about the Insight-users mailing list