[Insight-users] marching cube vtk!

Iván Macía imacia at vicomtech . es
Tue, 23 Sep 2003 21:32:25 +0200


> -----Mensaje original-----
> De: insight-users-admin at itk . org 
> [mailto:insight-users-admin at itk . org] En nombre de salah
> Enviado el: martes, 23 de septiembre de 2003 18:13
> Para: ITK Users (E-Mail)
> CC: vtkusers at vtk . org
> Asunto: [Insight-users] marching cube vtk!
> 
> 
> this piece of code produces the follwing link error 
> 
>    VolumeReaderType::Pointer  in_Reader = VolumeReaderType::New();
>    in_Reader->SetFileName( "D:/data/03_d/d3_edited.mha" );
>    in_Reader->Update();
>    ImageType::Pointer m_Image = in_Reader->GetOutput();
> 
>    // convert image from itk to vtk
>    typedef itk::ImageToVTKImageFilter<ImageType> Itk2VtkType;
>    Itk2VtkType::Pointer  m_Itk2Vtk = Itk2VtkType::New();
> 
>    m_Itk2Vtk->SetInput(m_Image);  // m_Reader reads a binary image
>    m_Itk2Vtk->Update();
> 
>    vtkImageMarchingCubes *marcher = vtkImageMarchingCubes::New();
>     marcher->SetInput(m_Itk2Vtk->GetOutput());
>     marcher->SetValue(0, 1);
> 
> 
> Error message:
> 
> --------------------Configuration: NPR1 - Win32 
> Debug-------------------- Linking...
>    Creating library Debug/MastoNPR1.lib and object 
> Debug/MastoNPR1.exp Tester.obj : error LNK2001: unresolved 
> external symbol "public: void __thiscall 
> vtkImageMarchingCubes::SetInput(class vtkImageData *)" 
> (?SetInput at vtkImageMarchingCubes@@QAEXPAVvtkImageData@@@Z)
> Tester.obj : error LNK2001: unresolved external symbol 
> "public: static class vtkImageMarchingCubes * __cdecl 
> vtkImageMarchingCubes::New(void)" 
> (?New at vtkImageMarchingCubes@@SAPAV1 at XZ)
> Debug/MastoNPR1.exe : fatal error LNK1120: 2 unresolved 
> externals Error executing link.exe.
> 
> MastoNPR1.exe - 3 error(s), 0 warning(s)
> 
> Could somebody please help!
> 
> Zein
> 
> 

Hi Salah,

Seems like you are missing library file "vtkPatented.lib" Check if you
have it in your project.

Regards

Iván Macía