[Insight-users] no exe file after compiling with VC++
Erik Türke
erik_tuerke at hotmail.com
Sat Aug 2 13:15:27 EDT 2008
Hello!
Well, i wanted to work through the "GettingStarted-II.pdf" from the itk.org website, to check out the VTK, but i have the following problem.
Visual Studio C++ 9 is compiling my project without any error. But i cant find any executable file in the bin directory.
CMakeLists.txt contains:
PROJECT(myProject)
FIND_PACKAGE ( ITK)
IF ( ITK_FOUND)
INCLUDE( ${USE_ITK_FILE} )
ENDIF( ITK_FOUND)
FIND_PACKAGE ( VTK)
IF ( VTK_FOUND)
INCLUDE( ${USE_VTK_FILE} )
ENDIF( VTK_FOUND)
INCLUDE_DIRECTORIES(
${myProject_SOURCE_DIR}
)
ADD_EXECUTABLE( myProject myProject.cxx)
TARGET_LINK_LIBRARIES ( myProject
ITKBasicFiltersITKCommonITKIO
vtkRenderingvtkGraphicsvtkHybrid
vtkImagingvtkIOvtkFilteringvtkCommon
)
and myProject.cxx contains:
#include "itkImage.h"
#include "itkImageFileReader.h"
#include "itkImageToVTKImageFilter.h"
#include "vtkImageViewer.h"
#include "vtkRenderWindowInteractor.h"
intmain( intargc, char **argv) {
typedef itk::Image<unsigned short,2> ImageType;
typedef itk::ImageFileReader<ImageType> ReaderType;
typedef itk::ImageToVTKImageFilter<ImageType> ConnectorType;
ReaderType::Pointerreader= ReaderType::New();
ConnectorType::Pointerconnector= 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;
}
Creating an only ITK project works without any problem.
Someone has an idea??
Thanks for your help.
_________________________________________________________________
Trete mit Deinem inneren Athleten in Verbindung. Beantworte die Fragen!
http://messenger.live.de/mein/mein-messenger-animoticons.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20080802/b37e9ab6/attachment.htm>
More information about the Insight-users
mailing list