ITK

Installation:

1) Download the ITK package:

https://itk.org/ITK/resources/software.html

2) unzip or untar the downloaded file.

tar -xzf filename.tar.gz

3) go to the ITK directory.

4) mkdir build (it is best if one folder contains the source file, and another folder contain the built files)

5) cd build

6) ccmake ../. > c > c > g. (the "../." can be replaced with suitable location)

If there is no error, then we are ready to make and install.

7) make

8) make install (or sudo make install)

To install other project that uses ITK

1) Need to create a .cxx file, and the corresponding header files (.h)

2) Write an CMakeLists.txt file

Template:

cmake_minimum_required (VERSION 2.6) project (Tutorial) # The version number. set (Tutorial_VERSION_MAJOR 1) set (Tutorial_VERSION_MINOR 0) # configure a header file to pass some of the CMake settings # to the source code configure_file ( "${PROJECT_SOURCE_DIR}/TutorialConfig.h.in" "${PROJECT_BINARY_DIR}/TutorialConfig.h" )

Find_package(ITK REQUIRED)

include(${ITK_USE_FILE})

# add the binary tree to the search path for include files

# so that we will find TutorialConfig.h include_directories("${PROJECT_BINARY_DIR}") # add the executable add_executable(Tutorial tutorial.cxx)

Reference:

https://cmake.org/cmake-tutorial/

http://itkdebug.blogspot.com/2013/02/install-itk-on-mac-os.html