Hi I have this code:<br><br><span style="font-family: courier new,monospace;"> const unsigned int InputDimension = 3;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> typedef float InternalPixelType;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> typedef itk::Image< InternalPixelType, InputDimension > InternalImageType;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> typedef itk::ImageFileReader< InternalImageType > ReaderType;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> ReaderType::Pointer reader = ReaderType::New();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> try</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> reader->SetFileName(this->filepath.c_str());</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> }</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> catch(...)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> return;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> }</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> reader->Update();</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> const unsigned int OutputDimension = 3;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> typedef itk::RGBPixel<unsigned char> RGBPixelType;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> typedef itk::Image< RGBPixelType, OutputDimension > RGBImageType;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> typedef itk::ImageFileWriter< RGBImageType > WriterType;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> WriterType::Pointer writer = WriterType::New();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> writer->SetFileName( "outputimage.mhd" );</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> typedef itk::GradientMagnitudeRecursiveGaussianImageFilter<</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> InternalImageType,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> InternalImageType</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> > GradientMagnitudeFilterType;</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> GradientMagnitudeFilterType::Pointer gradienMagnitudeFilter = GradientMagnitudeFilterType::New();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> gradienMagnitudeFilter->SetInput( reader->GetOutput() );</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> gradienMagnitudeFilter->SetSigma( 1.0 );</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> typedef itk::WatershedImageFilter< InternalImageType > WatershedFilterType;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> WatershedFilterType::Pointer watershedFilter = WatershedFilterType::New();</span> // <b>from this code i gave error</b><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> watershedFilter->SetInput( gradienMagnitudeFilter->GetOutput() );</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> watershedFilter->SetThreshold( this->params->Get_watershed_threshold() );</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> watershedFilter->SetLevel( this->params->Get_watershed_flood_value() );</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> typedef itk::Functor::ScalarToRGBPixelFunctor< unsigned long > ColorMapFunctorType;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> typedef WatershedFilterType::OutputImageType LabeledImageType;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> typedef itk::UnaryFunctorImageFilter<</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> LabeledImageType,</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> RGBImageType,</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> ColorMapFunctorType</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> > ColorMapFilterType;</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> ColorMapFilterType::Pointer colorMapFilter = ColorMapFilterType::New();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> colorMapFilter->SetInput( watershedFilter->GetOutput() );</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> writer->SetInput( colorMapFilter->GetOutput() );</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> try</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> writer->Update();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> }</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> catch( itk::ExceptionObject & excep )</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> cerr << "Exception !" << endl;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> cerr << excep.GetDescription() << endl;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> return;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> }</span><br><br><br>I thing, that it is not wrong, but I get this errors from VS2008 <br>
<br><span style="font-family: courier new,monospace;">Error 1 error LNK2001: unresolved external symbol "protected: virtual void __thiscall itk::WatershedMiniPipelineProgressCommand::PrintSelf(class std::basic_ostream<char,struct std::char_traits<char> > &,class itk::Indent)const " (?PrintSelf@WatershedMiniPipelineProgressCommand@itk@@MBEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@VIndent@2@@Z) WatershedCompute.obj WatershedSegmentation</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Error 2 error LNK2001: unresolved external symbol "public: virtual void __thiscall itk::WatershedMiniPipelineProgressCommand::Execute(class itk::Object const *,class itk::EventObject const &)" (?Execute@WatershedMiniPipelineProgressCommand@itk@@UAEXPBVObject@2@ABVEventObject@2@@Z) WatershedCompute.obj WatershedSegmentation</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Error 3 error LNK2001: unresolved external symbol "public: virtual void __thiscall itk::WatershedMiniPipelineProgressCommand::Execute(class itk::Object *,class itk::EventObject const &)" (?Execute@WatershedMiniPipelineProgressCommand@itk@@UAEXPAVObject@2@ABVEventObject@2@@Z) WatershedCompute.obj WatershedSegmentation</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Error 4 fatal error LNK1120: 3 unresolved externals C:\InsightApplications-3.20.0\src\muj_test6\Release\WatershedSegmentation.exe WatershedSegmentation</span><br>
<br>I dont know, where is the problem :( In my other project it works fine...<br>I will be very happyif you help me<br>Thank you everybody<br><br>