[Insight-users] GettingStarted-II compilation problem
mahshid farzinfar
mahshid.lightmoon at gmail.com
Thu May 7 04:11:19 EDT 2009
Hi all,
I am new at itk, I would apreciate your help. I try to compile the
example in GettingStarted itk II which is
#include
"itkImage.h"
#include
"itkImageFileReader.h"
#include
"itkImageToVTKImageFilter.h"
#include
"vtkImageViewer.h"
#include
"vtkRenderWindowInteractor.h"
int
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();
}
I could make the project but encounter some errors during building
1>.\myProject2.cxx(11) : error C2065: 'Imagetype' : undeclared identifier
1>.\myProject2.cxx(12) : error C2653: 'readerType' : is not a class or
namespace name
1>.\myProject2.cxx(12) : error C3861: 'New': identifier not found
1>.\myProject2.cxx(13) : error C2955: 'itk::ImageToVTKImageFilter' :
use of class template requires template argument list
1> c:\users\mahshid\project\prof.teoh\slicer.org\itk\insighttoolkit-3.12.0_4\insighttoolkit-3.12.0\test_mahshi\itkImageToVTKImageFilter.h(40)
: see declaration of 'itk::ImageToVTKImageFilter'
1>.\myProject2.cxx(13) : error C2955: 'itk::ImageToVTKImageFilter' :
use of class template requires template argument list
1> c:\users\mahshid\project\prof.teoh\slicer.org\itk\insighttoolkit-3.12.0_4\insighttoolkit-3.12.0\test_mahshi\itkImageToVTKImageFilter.h(40)
: see declaration of 'itk::ImageToVTKImageFilter'
1>.\myProject2.cxx(13) : error C2514:
'itk::SmartPointer<itk::ImageToVTKImageFilter<TInputImage>>' : class
has no constructors
1>.\myProject2.cxx(14) : error C2039: 'SetFilename' : is not a member
of 'itk::ImageFileReader<TOutputImage>'
1> with
1> [
1> TOutputImage=ImageType
1> ]
May someone give me a hand?
Thanks,
Mahshid
More information about the Insight-users
mailing list