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

orientation f fuzengliang435 at gmail.com
Tue Nov 4 22:02:35 EST 2008


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!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20081105/92691838/attachment.htm>


More information about the Insight-users mailing list