[Insight-users] compile GaussianFilter outside InsightApplications-1.4
george he
george_he7 at yahoo . com
Fri, 5 Dec 2003 16:14:14 -0800 (PST)
Luis,
do you mean I have to keep the FltkImageViewer
together with GaussianFilter? I was thinking to
compile FltkImageViewer separately and then link it to
GaussianFilter.
I moved the FltkImageViewer and the GaussianFilter
directories out of the InsightApplications directory,
compiled the FltkImageViewer successfully (generated
libITKFltkImageViewer.a), then I went to the
GaussianFilter, updated the CMakeLists.txt file,
but I still got the same error message as before.
What else needs to be done if I want to "real" isolate
GaussianFilter? i.e., to link to
libITKFltkImageViewer.a like other fltk libs?
have a good weekend,
George
--- Luis Ibanez <luis . ibanez at kitware . com> wrote:
> Hi George,
>
> In order to extract the GaussianFilter example from
> InsightApplications
> you must move out the following directories:
>
> InsightApplications/Auxiliary/FltkImageViewer
> InsithtApplications/GaussianFilter
>
> The first directory contains a library of GUI
> Widgets that
> are used by the GaussianFilter application.
>
> You can build the FltkImageViewer library
> independently
> by simply adding to its CMakeLists.txt file the
> following
> lines:
>
> IF(USE_FLTK)
> FIND_PACKAGE(FLTK)
> IF(FLTK_FOUND)
> INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR})
> ENDIF(FLTK_FOUND)
> ENDIF(USE_FLTK)
>
>
> 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(VTK)
> IF(VTK_FOUND)
> INCLUDE(${VTK_USE_FILE})
> ELSE(VTK_FOUND)
> MESSAGE(FATAL_ERROR
> "Cannot build InsightApplications without
> VTK. Please set
> VTK_DIR.")
> ENDIF(VTK_FOUND)
>
>
>
> The same lines must be added to the CMakeLists.txt
> file
> of the GaussianFilter directory.
>
>
> Finally, in the CMakeLists.txt file of the
> GaussianFilter replace the
> top lines
>
> INCLUDE_DIRECTORIES(
>
>
${InsightApplications_SOURCE_DIR}/Auxiliary/FltkImageViewer
>
>
${InsightApplications_BINARY_DIR}/Auxiliary/FltkImageViewer
> ${InsightApplications_SOURCE_DIR}/GaussianFilter
> ${InsightApplications_BINARY_DIR}/GaussianFilter
> )
>
> with
>
> PROJECT( GaussianFilter )
> INCLUDE_DIRECTORIES(
> ${FltkImageViewer_SOURCE_DIR}
> ${FltkImageViewer_BINARY_DIR}
> ${GaussianFilter_SOURCE_DIR}
> ${GaussianFilter_BINARY_DIR}
> )
>
> That should allow you to build the project
> independently of
> InsightApplications.
>
> You may want to look at the ITK tutorials in
>
> http://www . itk . org/HTML/Tutorials . htm
>
> In particular, number II, and V describe the
> integration of ITK, VTK and FLTK.
>
>
>
> Please let us know if you have any problems,
>
>
> Thanks
>
>
> Luis
>
>
> ----------------------------------
> george he wrote:
>
> >Luis,
> >
> >Yes, I was trying to isolate the GaussianFilter so
> >that I can build my own application based on it.
> Could
> >you please let me know what else in the
> CMakeLists.txt
> >I need to change? or do you suggest me to create a
> new
> >sub-directory in the InsightApplications directory?
> >
> >Thanks,
> >George
> >
> >
> >--- Luis Ibanez <luis . ibanez at kitware . com> wrote:
> >
> >
> >>Hi George,
> >>
> >>You are not allowed to move the Binary nor the
> >>Source
> >>directories after your built is done.
> >>
> >>If you decided to change the location of the
> source
> >>or the binary directories you must reconfigure
> with
> >>CMake and rebuild the project.
> >>
> >>If what you want is to isolate one of the
> >>applications
> >>from the InsightApplications tree you must make a
> >>number
> >>of small modifications in the CMakeLists.txt file.
> >>
> >>
> >>Please let us know if you have further questions.
> >>
> >>
> >>Thanks
> >>
> >>
> >>
> >> Luis
> >>
> >>
> >>
> >>-----------------
> >>george he wrote:
> >>
> >>
> >>
> >>>Hi,
> >>>
> >>>I was able to install ITK and FLTK successfully,
> >>>and compile the InsightApplications-1.4
> downloaded
> >>>
> >>>
> >>>from the web. But after I moved the directory
> >>>InsightApplications-1.4/GaussianFilter to another
> >>>location. I wasn't able to compile it anymore.
> >>>Anybody knows what was wrong?
> >>>
> >>>I did try to combine the info from the
> >>>
> >>>
> >>CMakeLists.txt
> >>
> >>
> >>>files in the directories InsightApplications-1.4
> >>>and InsightApplications-1.4/GaussianFilter
> >>>
> >>>
> >>together.
> >>
> >>
> >>>Most error messages are like:
> >>>
> >>>In function `fltkImageViewerGUI::CreateGUI()':
> >>>: undefined reference to
> >>>`Fl_Value_Slider::Fl_Value_Slider[in-charge](int,
> >>>
> >>>
> >>int,
> >>
> >>
> >>>int, int, char const*)'
> >>>
> >>>In function `fltkImageViewerGUI::CreateGUI()':
> >>>: undefined reference to
> >>>
> >>>
> >>`fl_define_FL_DIAMOND_BOX()'
> >>
> >>
> >>>In function
>
=== message truncated ===
__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion . yahoo . com/