For those interested in mixing ITK (www.itk.org) with VXL (http://vxl.sourceforge.net/), I have built executables
that uses both ITK and VXL algorithms.  Since both systems use CMake, this is fairly straightforward. CMake
does not come with a FindVXL.cmake module so my executable's source tree has its own.  This project builds
outside of the ITK and VXL source trees, i.e. it treats ITK and VXL as third party libraries.
 
The trick to mixing the toolkits is that both ITK and VXL use VCL and VNL.  Of course, both are included in
their respective source trees.  Furthermore, ITK uses an old drop of VCL and VNL. However, if the VXL include
and library paths are set BEFORE the ITK include and library paths then the project will compile.  Set them
up the other way around and hundreds of compile errors result.
 
To mix these toolkits properly, we should set up ITK's CMakeLists.txt files so that they can use VXL's version
of VCL and VNL in place of its own copy.  This would make sure that all of ITK is built with the proper version
of VCL and VNL as opposed to just my executable. I would expect the way I am doing this currently, I could
have hit upon a problem with duplicate and incompatible symbols.
 
But the set of classes that I was mixing for my executable, the following seems to work.
 
 
 
# ./foo/CMakeLists.txt
PROJECT(foo)
CMAKE_MINIMUM_REQUIRED(VERSION 1.4)
 

# Get VXL settings
#
INCLUDE( ${foo_SOURCE_DIR}/Modules/FindVXL.cmake )
IF (VXL_BINARY_PATH)
  INCLUDE( ${VXL_BINARY_PATH}/UseVXL.cmake )
ENDIF (VXL_BINARY_PATH)
 
# Put VXL includes before ITK settings to ensure the VXL's versions
# of VCL and VNL are used
INCLUDE_DIRECTORIES( ${VXLCORE_INCLUDE_DIR} )
INCLUDE_DIRECTORIES( ${MUL_INCLUDE_DIR} )
INCLUDE_DIRECTORIES( ${RPL_INCLUDE_DIR} )
INCLUDE_DIRECTORIES( ${GEL_INCLUDE_DIR} )
 

# Get ITK settings
#
INCLUDE( ${CMAKE_ROOT}/Modules/FindITK.cmake )
IF (USE_ITK_FILE)
  INCLUDE( ${USE_ITK_FILE} )
ENDIF (USE_ITK_FILE)

 

Jim Miller
_____________________________________
Visualization & Computer Vision
GE Research
Bldg. KW, Room C218B
P.O. Box 8, Schenectady NY 12301

millerjv@research.ge.com

james.miller@research.ge.com
(518) 387-4005, Dial Comm: 8*833-4005,
Cell: (518) 505-7065, Fax: (518) 387-6981