ITK与VTK混合编程 初步

ITK与VTK混合编程

基本步骤

a. Create a clean new directory
b. Write a CmakeLists.txt file
c. Write a simple .cxx file
d. Configure with CMake
e. Build
f. Run

//CMakeLists.txt样例

CMakeLists.txt
 cmake_minimum_required( VERSION 2.6 )
 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
  )

 

 

你可能感兴趣的:(编程,File,include)