[vtkusers] Problem combining ITK with VTK
John Smith
af3113 at yahoo.com
Mon Oct 27 03:32:22 EDT 2008
Dear all,
I try to implement a simple example to use ITK with VTK, but I got an error that I'm unable to deal with. The error is: 1>itkgdcm.lib(gdcmUtil.obj) : error LNK2019: unresolved external symbol _SnmpUtilVarBindFree at 4 referenced in function "int __cdecl gdcm::GetMacAddrSys(unsigned char *)" (?GetMacAddrSys at gdcm@@YAHPAE at Z)
1>itkgdcm.lib(gdcmUtil.obj) : error LNK2019: unresolved external symbol _SnmpUtilOidNCmp at 12 referenced in function "int __cdecl gdcm::GetMacAddrSys(unsigned char *)" (?GetMacAddrSys at gdcm@@YAHPAE at Z)
1>itkgdcm.lib(gdcmUtil.obj) : error LNK2019: unresolved external symbol _SnmpUtilOidCpy at 8 referenced in function "int __cdecl gdcm::GetMacAddrSys(unsigned char *)" (?GetMacAddrSys at gdcm@@YAHPAE at Z)
I'm using ITK3, VTK5 and VS 2008. Can you please help in that?
Thanks,
J.
-------------------------------
#include "itkImage.h"
#include "itkImageFileReader.h"
#include "itkImageToVTKImageFilter.h"
#include "vtkImageViewer.h"
#include "vtkRenderWindowInteractor.h"
int main(int argc, char **argv) {
typedef itk::Image<unsigned short,2> ImageType;
typedef itk::ImageFileReader<ImageType> ReaderType;
typedef itk::ImageToVTKImageFilter<ImageType> ConnectorType;
ReaderType::Pointer reader= ReaderType::New();
ConnectorType::Pointer connector= ConnectorType::New();
reader->SetFileName(argv[1]);
connector->SetInput( reader->GetOutput() );
vtkImageViewer* viewer= vtkImageViewer::New();
vtkRenderWindowInteractor* renderWindowInteractor= vtkRenderWindowInteractor::New();
viewer->SetupInteractor( renderWindowInteractor);
viewer->SetInput( connector->GetOutput() );
viewer->Render();
viewer->SetColorWindow( 255);
viewer->SetColorLevel( 128);
renderWindowInteractor->Start();
return 0;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081027/1dafd827/attachment.htm>
More information about the vtkusers
mailing list