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

Luis Ibanez luis.ibanez at kitware.com
Wed Apr 11 13:40:17 EDT 2007


Hi Catherine,

Please add first a try/catch block around the Update() call.

It is likely that an exception is being thrown.

You will find many examples on how to catch exceptions in the

ITK Software Guide:


     http://www.itk.org/ItkSoftwareGuide.pdf




    Regards,


       Luis


------------------------
Catherine Peloquin wrote:
> Thank you for you assistance.  I was able to get my makefile to build, 
> but now I am getting a segmentation fault at the line 
> meshSource->Update().  I tried using .ima files, and .dcm files located 
> in the same directory as my .cxx and CMakeLists files.  I am running the 
> executable with the command "SurfaceExtraction CT0001.dcm 400".  What am 
> I doing wrong?
> 
> Thanks,
> Catherine
> 
> 
> On 4/7/07, *Luis Ibanez* < luis.ibanez at kitware.com 
> <mailto:luis.ibanez at kitware.com>> wrote:
> 
> 
> 
>     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 <mailto:Insight-users at itk.org>
>      > http://www.itk.org/mailman/listinfo/insight-users
> 
> 


More information about the Insight-users mailing list