Create new filters with external Libraries - petteriTeikari/twoPhotonVessels GitHub Wiki
#ITK
##About ITK (Insight Toolkit) is an open-source, cross platform system allowing users several functions in image analysis. It is primarily used in the analysis of medical images such as CT and ultrasound. ITK is implemented C++. ITK functions primarily in image registration and segmentation.
##ITK Integration in Two-Photon Analysis ITK is used in the following program as a method of creating a mesh of the two-photon images. The Filtering/SurfaceExtraction algorithm was employed in the generation of the mesh.
##ITK Installation Installation guide: http://www.itk.org/Wiki/ITK_Configuring_and_Building_for_Ubuntu_Linux
##Building an ITK Program
-
Create a project folder with source code and build as empty subfolders.
-
In the source code folder, write the .cxx program
-
In the source code folder, write a CMakeLists.txt file with the following parameters:
cmake_minimum_required( VERSION 2.8.6 )project( programname )find_package( ITK REQUIRED )include( ${ITK_USE_FILE} )add_executable( programfilename programname.cxx )target_link_libraries( programfilename ${ITK_LIBRARIES} ) -
Open the Cmake-gui and specify the build and source code folders
-
Generate the project and import the project onto eclipse
##Common Errors Common errors that can arise when working with an ITK project are usually associated with the improper construction of the project. When importing the project onto Eclipse, it is important to import both the source code and the build folders. Otherwise, the program will not be able to recognize the project.
#CGAL
##About CGAL (Computational Geometry Algorithms Library) is a C++ library used in computational geometry.
##CGAL Integration in Two-Photon Analysis It is used in the Two-Photon Analysis program through retriving the Diameter values of the vessels. These values are then matched with each facet of the vessel mesh to allow users to segment the mesh in accordance to the diameter.
##CGAL Installation Installation manual: http://doc.cgal.org/latest/Manual/installation.html
##Building a CGAL Project
-
Create a project folder with source code and build as empty subfolders.
-
In the source code folder, write the .cpp program
-
In the source code folder, write a CMakeLists.txt file through the command window:
- First specify path of the .cpp program
Example:
cd Desktop/CGALprogram/src - type:
cgal_create_CmakeLists “name of .cpp:”
- First specify path of the .cpp program
Example:
-
Open the Cmake-gui and specify the build and source code folders
-
Generate the project and import the project onto eclipse
##Common Errors Common errors faced in CGAL programs are also usually the result of improper project construction. It is important that all steps in the building of the project are thoroughly followed. In the case of an error in the code, a few common error messages will be given:
`make: ***[all] Error 2`
`makemake[1]: ***[src] Error 2 `
`makemake[2]: ***[src] Error 1 `
While these errors may suggest the problem lies in the compiler, it is simply an error that lies in the code, and can only be fixed within the scope of the code.