[Insight-users] Header files not found for surface extraction example

Luis Ibanez luis.ibanez at kitware.com
Sat Apr 7 20:08:08 EDT 2007



Hi Catherine,


You dont' need the


        INCLUDE_REGULAR_EXPRESSION("^.*$")


In your CMakeLists.txt file.

You just need to have in this file the following lines:


    PROJECT(SurfaceExtraction)

    FIND_PACKAGE(ITK REQUIRED)
    IF(ITK_FOUND)
      INCLUDE(${ITK_USE_FILE})
    ENDIF(ITK_FOUND)

    ADD_EXECUTABLE(SurfaceExtraction SurfaceExtraction.cxx )

    TARGET_LINK_LIBRARIES(SurfaceExtraction ITKCommon ITKIO)



And only need to have in your directory the following two file:


          CMakeLists.txt
          SurfaceExtraction.cxx



Make sure that when you configure this directory with
CMake you provide to ITK_DIR the directory where you
build or where you installed ITK.



    Regards,


       Luis


------------------------------
Catherine Peloquin wrote:
> I am trying to build and run the example surface extraction example 
> originally located in Examples/Filtering/SurfaceExtra
> ction.cxx.   I made a copy of the entire Filtering folder outside of the 
> Insight directory, successfully ran ccmake, and tried to build the 
> examples in that folder using gmake. 
> 
> I got a lot of error messages, but believe that they all originate from 
> the following errors:
> /ITK/InsightToolkit-3.2.0/Examples/Filtering/AntiAliasBinaryImageFilter.cxx:38:32: 
> itkImageFileReader.h : No such file or directory
> /ITK/InsightToolkit-3.2.0/Examples/Filtering/AntiAliasBinaryImageFilter.cxx:39:32: 
> itkImageFileWriter.h: No such file or directory
> /ITK/InsightToolkit-3.2.0/Examples/Filtering/AntiAliasBinaryImageFilter.cxx:40:32: 
> itkCastImageFilter.h: No such file or directory
> /ITK/InsightToolkit-3.2.0/Examples/Filtering/AntiAliasBinaryImageFilter.cxx:41:44: 
> itkRescaleIntensityImageFilter.h: No such file or directory
> /ITK/InsightToolkit-3.2.0 
> /Examples/Filtering/AntiAliasBinaryImageFilter.cxx:54:43: 
> itkAntiAliasBinaryImageFilter.h: No such file or directory
> 
> I am only using the pre-made examples files, although I did add the code:
> #
> # FIND ITK, TAKEN FROM 
> http://www.itk.org/pipermail/insight-users/2003-July/004278.html 
> <http://www.itk.org/pipermail/insight-users/2003-July/004278.html> ON 
> 3-30-07
> #
> FIND_PACKAGE(ITK)
> IF (USE_ITK_FILE)
>   INCLUDE (${USE_ITK_FILE})
> ELSE (USE_ITK_FILE)
>   MESSAGE( FATAL_ERROR "This application requires ITK. One of these
> components is missing. Please verify configuration")
> ENDIF (USE_ITK_FILE)
> 
> after INCLUDE_REGULAR_EXPRESSION("^.*$") in the file CMakeLists.txt.
> 
> 
> What am I doing wrong to get these errors?  I was able to successfully 
> build and run other examples, including the examples in 
> DataRepresentation/Image.
> 
> Thank you,
> Catherine
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list