# VTK 9.0.1 with GDCM3.0, CMAKE

**URL:** https://discourse.vtk.org/t/vtk-9-0-1-with-gdcm3-0-cmake/5768
**Category:** Support
**Created:** [May 13, 2021, 12:07am UTC](https://discourse.vtk.org/t/vtk-9-0-1-with-gdcm3-0-cmake/5768 "2021-05-13T00:07:49Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Frank\_Gao](https://discourse.vtk.org/user_avatar/discourse.vtk.org/frank_gao/32/2538_2.png) [@Frank\_Gao](https://discourse.vtk.org/u/Frank_Gao)
#### Post date: [May 13, 2021, 12:07am UTC](https://discourse.vtk.org/t/vtk-9-0-1-with-gdcm3-0-cmake/5768/1 "2021-05-13T00:07:49Z")

</div>

Hello VTK experts,

I am having some trouble with VTK 9.0 and GDCM 3.0.8. Using CMAKE 3.14 to configure both, turn on USING VTK on GDCM and using GDCM on VTK. It seems that cmake can never generate the correct VS 2019 project file for GDCM’s vtkgdcm. Just none VTK include paths is shown in GDCM. I cannot even edit the project properties by adding include paths.

Really appreciate any help.

Best regards,  
Frank

---

<div class="post-metadata">

### Author: ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)
#### Post date: [May 13, 2021, 3:43am UTC](https://discourse.vtk.org/t/vtk-9-0-1-with-gdcm3-0-cmake/5768/2 "2021-05-13T03:43:43Z")

</div>

Hi Frank, unless you specifically need the vtkGDCMImageReader, I recommend using the newer vtkDICOMReader instead. You can enable it in VTK as follows:

1. First, build GDCM **without** enabling VTK within GDCM
2. Configure VTK with `VTK_MODULE_ENABLE_VTK_vtkDICOM=WANT` and `USE_GDCM=ON`

If GDCM gives you any warnings about `GDCM_VTK_DIR`, just ignore them. The GDCM cmake files are less than perfect.

I haven’t specifically tried this with GDCM 3.0.8, but there’s no reason to believe that it shouldn’t work.

---

<div class="post-metadata">

### Author: ![Frank\_Gao](https://discourse.vtk.org/user_avatar/discourse.vtk.org/frank_gao/32/2538_2.png) [@Frank\_Gao](https://discourse.vtk.org/u/Frank_Gao)
#### Post date: [May 13, 2021, 5:34am UTC](https://discourse.vtk.org/t/vtk-9-0-1-with-gdcm3-0-cmake/5768/3 "2021-05-13T05:34:12Z")

</div>

Hi David, thanks a lot for your quick response. Just wanted to find out, after your step 1 and 2, do we need to Re-configure GDCM with CMAKE to enable USE\_VTK?

---

<div class="post-metadata">

### Author: ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)
#### Post date: [May 13, 2021, 1:08pm UTC](https://discourse.vtk.org/t/vtk-9-0-1-with-gdcm3-0-cmake/5768/4 "2021-05-13T13:08:55Z")

</div>

No, not for vtkDICOMReader, since it only uses the base GDCM libraries (libgdcmCommon, libgdcmMSFF, etc). You can try it if you really need GDCM’s own VTK classes, but I can’t help you much there because I haven’t used GDCM’s VTK classes for many years. I just use GDCM as a C++ library.
