# How to create vtkUnstructuredGrid from an itk::Image?

**URL:** https://discourse.itk.org/t/how-to-create-vtkunstructuredgrid-from-an-itk-image/2364
**Category:** Beginner Questions
**Created:** [October 30, 2019, 12:45pm UTC](https://discourse.itk.org/t/how-to-create-vtkunstructuredgrid-from-an-itk-image/2364 "2019-10-30T12:45:38Z")
**Posts on this page:** 1
**Showing post:** 9

<div class="post-metadata">

### Author: ![Sara\_Caffe](https://discourse.itk.org/user_avatar/discourse.itk.org/sara_caffe/32/974_2.png) [@Sara\_Caffe](https://discourse.itk.org/u/Sara_Caffe)
#### Post date: [November 20, 2019, 11:51am UTC](https://discourse.itk.org/t/how-to-create-vtkunstructuredgrid-from-an-itk-image/2364/9 "2019-11-20T11:51:37Z")

</div>

@matt.mccormick Thank you, Sir, I am just checking with you if the installation procedure is correct?

I tried to follow [the link](https://discourse.itk.org/t/remote-itkmodule-build-on-top-of-another/1547) that you had guided a user. I set the `ITK_DIR` and `VTK_DIR` to the build directory of each application. Then, I set the following flags:

BUILD\_SHARED\_LIBS ON  
BUILD\_TESTING OFF  
ITK\_USE\_KWSTYLE OFF

ITK\_DIR /home/esara/software/vtk-itk/ITK-build  
VTK\_DIR /home/esara/software/vtk-itk/VTK-build

- I removed the ITK prefix in [this line](https://github.com/InsightSoftwareConsortium/ITKVtkGlue/blob/master/itk-module.cmake#L7)

After running cmake successfully, I could build the ITKVtkGlue

```
~/software/vtk-itk/ITKVtkGlue-build$ sudo make -j4
Scanning dependencies of target VtkGlue-all
Scanning dependencies of target ITKData
Built target VtkGlue-all
Built target ITKData

```

Thank you

---

_[View the full topic](https://discourse.itk.org/t/how-to-create-vtkunstructuredgrid-from-an-itk-image/2364)._
