[Insight-users] Getting Started - II

Luis Ibanez luis.ibanez@kitware.com
Mon, 04 Nov 2002 13:22:27 -0500


Hi Dean,

This filter is on purpouse not included in
any ITK library because is an interface to
an external library.

You have basically two separate options:

1) copy the itkImageToVTKImageFilter
    .h and .txx files into your project.
    and they will be found by the compiler
    along with your classes.

2) copy the itkImageToVTKImageFilter
    .h and .txx files into a directory
    relative to your project and add in the
    CMakeLists.txt file, the relative path
    to the files.

    Let's say that your project is called
    "Foo" and you have directories

    /src/projects/Foo    and
    /src/projects/Aux  (where the ImageToVTKImage
                        filter is copied)


    Then you add to your CMakeLists.txt file

     INCLUDE_DIRECTORIES(${Foo_SOURCE_DIR}/../Aux)

    Note that you always have a "Foo_SOURCE_DIR"
    symbol defined by CMake. It points to the
    source directory of your project.

    This is what's done in the GettingStarted-II.ppt
    guide.



Please let us know if you encounter any problems,


    Thanks

       Luis

=================================

Dean Inglis wrote:
> Hi,
> 
> I am trying to build the example in 
> InsightDocuments/CourseWare/Training/GettingStarted-II.ppt
> but keep getting stumped on the
> itkImageToVTKImageFilter object.  Since this
> filter is not "built into" any static libs, how
> can the compiler know about it?  I keep getting
> 'ImageToVTKImageFilter' is not a member of 'itk'
> in function main(int, char * *)
> 
> adding 
> INCLUDE_DIRECTORIES(${ITK_SOURCE_DIR}/Code/Auxiliary)
> or 
> INCLUDE_DIRECTORIES(${ITK_SOURCE_DIR}/Code/Auxiliary/vtk) 
> to the CMakeLists.txt in my project's root dir does not help.
> 
> Dean
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
> 
>