<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2873" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I am getting just started using ITK (I just used it
shortly a couple of years ago) and I am having some problems in my first intent
to get an application with a GUI generated outside the ITK applications
project.</FONT></DIV>
<DIV><FONT face=Arial size=2>I am trying to do all this with Visual C++
6.0.</FONT></DIV>
<DIV><FONT face=Arial size=2>I have installed FLTK and VTK following the
instructions.</FONT></DIV>
<DIV><FONT face=Arial size=2>I have taken from the applications some directories
to try to build ImageRegistration2D. I copied also FltkImageViewer and vtk from
InsightApplications-2.6.0\Auxiliary, and changed their respective CMakeLists.txt
according to the instructions Luis gave to George on december 5th 2003 regarding
the compilation of GaussianFilter outside InsightApplications.</FONT></DIV>
<DIV><FONT face=Arial size=2>Everything seems to work OK with both
FltkImageViewer and vtk (at least I can compile them using their respective .dsw
without errors or warnings) but when I try to compile ImageRegistration2D some
*.h are not located by Visual C++:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>C:\INTA\pleyades\InsightToolkit\MisProyectos\vtk\itkImageToVTKImageFilter.h(21)
: fatal error C1083: Cannot open include file: 'vtkImageImport.h': No such file
or directory<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>I have seen that this is a *.h within the generated
VTK directory. I supposed that the CMakeLists.txt command:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> FIND_PACKAGE(VTK)<BR>
IF(VTK_FOUND)<BR>
INCLUDE_DIRECTORIES(${VTK_INCLUDE_DIR})<BR>
ENDIF(VTK_FOUND)<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>would take care of this, but it seems I am totally
wrong. In fact, it is the first time I try to understand how CMake
works.</DIV></FONT>
<DIV><FONT face=Arial size=2> </DIV></FONT>
<DIV><FONT face=Arial size=2>I get one more warning from Visual
C++:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Build : warning : failed to (or don't know how to)
build
'C:\INTA\pleyades\InsightToolkit\MisProyectos\ImageRegistration2D\bin\fluid'<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>but I do not understand at all where it comes
from.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I would very much appreciate if somebody can point
me to any resources I can study in order to understand what happens at
all.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I paste here the CMakeLists.txt of
ImageRegistration2D I modified. As you see, I had to define explicitly the paths
of the source and binary directories for FltkImageViewer and vtk, but this is
because I did not know other perhaps more correct and elegant
solution.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>PROJECT(ImageRegistration2D)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>SET (USE_FLTK ON)<BR>SET (USE_VTK ON)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>IF( NOT BUILD_OUTSIDE_INSIGHT_APPLICATIONS
)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> FIND_PACKAGE(ITK)<BR>
IF(ITK_FOUND)<BR> INCLUDE(${ITK_USE_FILE})<BR>
ELSE(ITK_FOUND)<BR>
MESSAGE(FATAL_ERROR<BR>
"Cannot build InsightApplications without ITK. Please set
ITK_DIR.")<BR> ENDIF(ITK_FOUND)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> FIND_PACKAGE(FLTK)<BR>
IF(FLTK_FOUND)<BR>
INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR})<BR>
ENDIF(FLTK_FOUND)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> FIND_PACKAGE(VTK)<BR>
IF(VTK_FOUND)<BR>
INCLUDE_DIRECTORIES(${VTK_INCLUDE_DIR})<BR> ENDIF(VTK_FOUND)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> #FIND_PACKAGE(FltkImageViewer)<BR>
#IF(FltkImageViewer_FOUND)<BR> # MESSAGE("FltkImageViewer_USE_FILE =
${FltkImageViewer_USE_FILE}")<BR> #
INCLUDE(${FltkImageViewer_USE_FILE})<BR>
#ELSE(FltkImageViewer_FOUND)<BR>
#INCLUDE($ENV{HOME}/src/InsightApplications-1.4/FindFltkImageViewer.cmake)<BR>
# MESSAGE(FATAL_ERROR "Cannot build ImageRegistration2D without
FltkImageViewer. Please set FltkImageViewer_DIR.")<BR>
#ENDIF(FltkImageViewer_FOUND)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><BR>ENDIF( NOT BUILD_OUTSIDE_INSIGHT_APPLICATIONS
)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>INCLUDE_REGULAR_EXPRESSION(".*")</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>SET (FltkImageViewer_SOURCE_DIR
"C:/INTA/pleyades/InsightToolkit/MisProyectos/FltkImageViewer")<BR>SET
(FltkImageViewer_BINARY_DIR
"C:/INTA/pleyades/InsightToolkit/MisProyectos/FltkImageViewer/bin")<BR>SET
(vtk_SOURCE_DIR "C:/INTA/pleyades/InsightToolkit/MisProyectos/vtk")<BR>SET
(vtk_BINARY_DIR
"C:/INTA/pleyades/InsightToolkit/MisProyectos/vtk/bin")</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>INCLUDE_DIRECTORIES(<BR>
${FltkImageViewer_SOURCE_DIR}<BR> ${FltkImageViewer_BINARY_DIR}<BR>
${vtk_SOURCE_DIR}<BR> ${vtk_BINARY_DIR}<BR>
${ImageRegistration2D_SOURCE_DIR}<BR>
${ImageRegistration2D_BINARY_DIR}<BR>)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>MESSAGE("el directorio FltkImageViewer es aqui
${FltkImageViewer_SOURCE_DIR}")<BR>MESSAGE("el directorio vtk es aqui
${vtk_SOURCE_DIR}")<BR>MESSAGE("el directorio ImageRegistration2D es aqui
${ImageRegistration2D_SOURCE_DIR}")</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>MACRO(ADD_GUI_EXECUTABLE name sources)<BR>
ADD_EXECUTABLE(${name} ${sources})<BR>ENDMACRO(ADD_GUI_EXECUTABLE)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>MACRO(ITK_DISABLE_FLTK_GENERATED_WARNINGS
files)<BR> IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER
1.6)<BR>
IF(CMAKE_COMPILER_IS_GNUCXX)<BR> FOREACH(f
${files})<BR> STRING(REGEX REPLACE "<A
href="file://\\.fl$">\\.fl$</A>" ".cxx" SRC
"${f}")<BR> STRING(REGEX REPLACE
".*/([^/]*)$" "<A href="file://\\1">\\1</A>" SRC
"${SRC}")<BR>
SET_SOURCE_FILES_PROPERTIES(${SRC} PROPERTIES COMPILE_FLAGS
-w)<BR> ENDFOREACH(f)<BR>
ENDIF(CMAKE_COMPILER_IS_GNUCXX)<BR>ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}
GREATER 1.6)<BR>ENDMACRO(ITK_DISABLE_FLTK_GENERATED_WARNINGS)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>FLTK_WRAP_UI(ImageRegistration2D
ImageRegistrationConsoleGUI.fl)<BR>ITK_DISABLE_FLTK_GENERATED_WARNINGS(ImageRegistrationConsoleGUI.fl)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>SET(ImageRegistration2D_SRCS<BR>
ImageRegistrationConsole.cxx<BR>
ImageRegistrationConsoleBase.cxx<BR> ImageRegistration2D.cxx<BR>
${ImageRegistration2D_FLTK_UI_SRCS}<BR> )</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>ADD_GUI_EXECUTABLE(ImageRegistration2D
"${ImageRegistration2D_SRCS}")</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>TARGET_LINK_LIBRARIES(ImageRegistration2D
ITKFltkImageViewer
ITKIO<BR>
ITKNumerics ITKBasicFilters
ITKStatistics<BR>
vtkRendering vtkGraphics
vtkHybrid<BR>
vtkImaging vtkIO vtkFiltering vtkCommon<BR>)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thank you very much in advance for any help or
advice.</FONT></DIV>
<DIV><FONT face=Arial size=2>Best regards</DIV></FONT>
<DIV><FONT face=Arial size=2>Severino Fernandez<BR>INTA<BR>Departamento de
Teledeteccion<BR>Ctra. de Ajalvir Km 4<BR>28850 Torrejon de
Ardoz<BR>Spain<BR>email: <A
href="mailto:fdezas@inta.es,severinofer@recol.es">fdezas@inta.es,severinofer@recol.es</A><BR>Tel
+34916487800, +34915206362</FONT></DIV></BODY></HTML>