# Cannot find \`itkImageToVTKImageFilter.h\` header via vcpkg-built itk

**URL:** <https://discourse.itk.org/t/cannot-find-itkimagetovtkimagefilter-h-header-via-vcpkg-built-itk/4702>\
**Category:** Engineering\
**Tags:** vcpkg, cmake\
**Created:** [December 28, 2021, 3:22am UTC](https://discourse.itk.org/t/cannot-find-itkimagetovtkimagefilter-h-header-via-vcpkg-built-itk/4702 "2021-12-28T03:22:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![LesleyLai](https://discourse.itk.org/user_avatar/discourse.itk.org/lesleylai/32/2465_2.png) [@LesleyLai](https://discourse.itk.org/u/LesleyLai)\
**Post date:** [December 28, 2021, 3:22am UTC](https://discourse.itk.org/t/cannot-find-itkimagetovtkimagefilter-h-header-via-vcpkg-built-itk/4702/1 "2021-12-28T03:22:29Z")

</div>

Hi, I am trying to introduce ITK to my project via vcpkg, and I met the following error when I try to replicate [this example](https://itk.org/ITKExamples/src/Bridge/VtkGlue/ConvertAnitkImageTovtkImageData/Documentation.html)

```auto
fatal error: itkImageToVTKImageFilter.h: No such file or directory

```

I don’t seem to have problems using other parts of ITK. I can read DICOM files via `itkImageSeriesReader`, for example.

relevant part of my CMakeLists.txt looks like the following

```auto
find_package(VTK REQUIRED)
include("${VTK_USE_FILE}")
find_package(ITK CONFIG REQUIRED)

target_link_libraries(my_target PRIVATE
        ${VTK_LIBRARIES}
        ITKVTK
        ITKIOGDCM
        # other libraries
        )

```

---

<div class="post-metadata">

**Author:** ![LesleyLai](https://discourse.itk.org/user_avatar/discourse.itk.org/lesleylai/32/2465_2.png) [@LesleyLai](https://discourse.itk.org/u/LesleyLai)\
**Post date:** [December 28, 2021, 4:26am UTC](https://discourse.itk.org/t/cannot-find-itkimagetovtkimagefilter-h-header-via-vcpkg-built-itk/4702/2 "2021-12-28T04:26:03Z")

</div>

I solved the problem. In the `"dependencies"` of the vcpkg manifest file, I need to add a “vtk” feature under “itk”:

```json
  "dependencies": [
    "vtk",
    {
      "name": "itk",
      "features": [
        "vtk"
      ]
    },
    ...
  ]

```

Now in CMake `find_package(ITK)` can find an `ITKVtkGlue` target, and I just need to link it via `target_link_libraries`
