[Insight-users] Help needed to rebuild an ITK application outside of the InsightA pplications directory

Shen, Weicheng WEICHENG.SHEN at saic.com
Fri May 13 15:30:31 EDT 2005


Hi:
 
I attempted to rebuild an ITK application, "FastMarchingLevelSet", outside
of the root directory for InsightApplications. Before I started this task, I
have verified that my installation of ITK, VTK, FLTK, and
InsightApplications are correct. I was able to run the "rebuild all" option
under the MS Visual Studio .Net 2003 for InsightApplications, which rebuilt
all projects in InsightApplications. Now I want to make a copy of the
"FastMarchingLevelSet" project to another directory and rebuilt it there by
doing the following.
 
1.	Make a new folder called ITKSamples, and two subfolders (under
ITKSamples). One is called FastMarchingLevelSetSrc and another is called
FastMarchingLevelSetBin.
2.	Copy all 6 files within the FastMarchingLevelSet project (source)
into FastMarchingLevelSetSrc, which are CMakeLists.txt;
FastMarchingLevelSet.cxx; FastMarchingLevelSet.h;
FastMarchingLevelSetBase.cxx; FastMarchingLevelSetBase.h; and
FastMarchingLevelSetGUI.fl.
3.	Then I modified the contents of CMakeLists.txt into the following
============================================================================
PROJECT(FastMarchingLevelSet)
 
IF( BUILD_OUTSIDE_INSIGHT_APPLICATIONS )
 
  FIND_PACKAGE(ITK)
  IF(ITK_FOUND)
    INCLUDE(${ITK_USE_FILE})
  ELSE(ITK_FOUND)
    MESSAGE(FATAL_ERROR
            "Cannot build InsightApplications without ITK.  Please set
ITK_DIR.")
  ENDIF(ITK_FOUND)
 
 
  FIND_PACKAGE(FLTK)
  IF(FLTK_FOUND)
    INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR})
  ENDIF(FLTK_FOUND)
 
ENDIF( BUILD_OUTSIDE_INSIGHT_APPLICATIONS )
 
 
INCLUDE_DIRECTORIES(
  ${InsightApplications_SOURCE_DIR}/Auxiliary/FltkImageViewer
  ${InsightApplications_SOURCE_DIR}/Auxiliary/VtkFltk
  ${InsightApplications_SOURCE_DIR}/Auxiliary/vtk
  ${InsightApplications_BINARY_DIR}/Auxiliary/FltkImageViewer
  ${InsightApplications_BINARY_DIR}/Auxiliary/VtkFltk
  C:/shen/ITKSamples/FastMarchingLevelSetSrc
  C:/shen/ITKSamples/FastMarchingLevelSetBin
)
 
SET(FastMarchingLevelSet_SRCS 
  FastMarchingLevelSetBase.cxx
  FastMarchingLevelSet.cxx
  )
 
ADD_EXECUTABLE(FastMarchingLevelSet "${FastMarchingLevelSet_SRCS}")
 
FLTK_WRAP_UI(FastMarchingLevelSet FastMarchingLevelSetGUI.fl)
 
TARGET_LINK_LIBRARIES(FastMarchingLevelSet ITKIO ITKVtkFltk
                      ITKBasicFilters ITKNumerics ITKFltkImageViewer)
 
============================================================================
 
Note that I have change ADD_GUI_EXECUTABLE to ADD_EXECUTABLE to avoid the
CMake configuration error (ADD_GUI_EXECUTABLE not defined...).
 
However, when I run the CMake on the above CMakeLists.txt, it still reports
the error as shown below: 
CMake Error: Can not find
C:/shen/ITKSamples/FastMarchingLevelSetSrc/FastMarchingLevelSetBase.cxx;
FastMarchingLevelSet.cxx
 
Any ideas what happened?
 
Weicheng Shen, Ph.D.
Senior Scientist
Science Applications International Corporation
1710 SAIC Drive
MailStop 2-3-1
McLean, VA 22102
(703) 676-4189
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20050513/b623dbea/attachment.htm


More information about the Insight-users mailing list