# Transfer from VTK to SimpleITK

**URL:** https://discourse.itk.org/t/transfer-from-vtk-to-simpleitk/2717
**Category:** Beginner Questions
**Tags:** simpleitk
**Created:** [February 13, 2020, 9:58am UTC](https://discourse.itk.org/t/transfer-from-vtk-to-simpleitk/2717 "2020-02-13T09:58:08Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![flaviu2](https://discourse.itk.org/letter_avatar_proxy/v4/letter/f/74df32/32.png) [@flaviu2](https://discourse.itk.org/u/flaviu2)
#### Post date: [February 13, 2020, 9:58am UTC](https://discourse.itk.org/t/transfer-from-vtk-to-simpleitk/2717/1 "2020-02-13T09:58:08Z")

</div>

I come back here because I am working blind (I cannot compile SimpleITK, this is drive me crazy, because I am running out of time). And until I solve that issue (working on that by days !!! unbelievable) I am trying to write code that import data from VTK into SimpleITK, and I wrote:

```auto
sitk::ImportImageFilter importer;
importer.SetSpacing(m_pDICOMReader->GetOutput()->GetSpacing());
importer.SetOrigin(m_pDICOMReader->GetOutput()->GetOrigin());
importer.SetSize(m_pDICOMReader->GetOutput()->GetScalarSize());
sitk::Image img = importer.Execute();

```

it is ok ? (m\_pDICOMReader is vtkDICOMReader). I really need this code functional.

Thank you for your time !

---

_[View the full topic](https://discourse.itk.org/t/transfer-from-vtk-to-simpleitk/2717)._
