[Insight-users] no exe file after compiling with VC++

Niha niha.beig at gmail.com
Sat Feb 19 03:17:16 EST 2011


Erik Türke <erik_tuerke at ...> writes:

> 
> 
> 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 ( 
myProjectITKBasicFiltersITKCommonITKIOvtkRenderingvtkGraphicsvtkHybridvtkImaging
vtkIOvtkFilteringvtkCommon)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!
> 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at ...
> http://www.itk.org/mailman/listinfo/insight-users
> 

I'm facing the same problem now. Did you figure out how its done?
Regards,
Niha




More information about the Insight-users mailing list