# Unable to view vtk file in slicer

**URL:** https://discourse.slicer.org/t/unable-to-view-vtk-file-in-slicer/16294
**Category:** Support
**Created:** [March 1, 2021, 7:06pm UTC](https://discourse.slicer.org/t/unable-to-view-vtk-file-in-slicer/16294 "2021-03-01T19:06:34Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![akshay\_pillai](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/akshay_pillai/32/8301_2.png) [@akshay\_pillai](https://discourse.slicer.org/u/akshay_pillai)
#### Post date: [March 1, 2021, 7:06pm UTC](https://discourse.slicer.org/t/unable-to-view-vtk-file-in-slicer/16294/1 "2021-03-01T19:06:34Z")

</div>

Operating system: windows 10  
Slicer version: 4.11  
Expected behavior:  
Actual behavior:

I am able to view this vtk file using paraview under points gaussian but not when I upload this to slicer. Is there a reason I am unable to see the vtk data in slicer? And how do I make it visible?

---

<div class="post-metadata">

### Author: ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)
#### Post date: [March 1, 2021, 8:37pm UTC](https://discourse.slicer.org/t/unable-to-view-vtk-file-in-slicer/16294/2 "2021-03-01T20:37:06Z")

</div>

Do you have an example of file causing problem ? Is there any relevant information in the log (in application menu bar: `View->Error log`) ?

---

<div class="post-metadata">

### Author: ![akshay\_pillai](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/akshay_pillai/32/8301_2.png) [@akshay\_pillai](https://discourse.slicer.org/u/akshay_pillai)
#### Post date: [March 1, 2021, 8:47pm UTC](https://discourse.slicer.org/t/unable-to-view-vtk-file-in-slicer/16294/3 "2021-03-01T20:47:54Z")

</div>

@jcfr Sorry, yes I do see an error. “.vtk does not contain coordinate system information. Assuming LPS.” I cant upload the file though. Have you seen this error. Anyhting I can do ?

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [March 1, 2021, 9:02pm UTC](https://discourse.slicer.org/t/unable-to-view-vtk-file-in-slicer/16294/4 "2021-03-01T21:02:31Z")

</div>

Lack of coordinate system information is just a warning, you can ignore it because the assumption of LPS is probably correct.

If you need to use points Gaussian to see the data set in Paraview then probably you do not have any cells. To display point cloud, you need to at least specify vertex cells, or run the point cloud through a glyph filter or surface reconstructor.

For example, if you want to apply a glyph filter on a point cloud loaded as a model node in Slicer then copy-paste this snippet into Slicer’s Python console:

```python
modelNode = getNode('MyModel') # replace this with the actual name of your model node
glyph=vtk.vtkGlyph3D()
glyph.SetInputData(modelNode.GetPolyData())
glyph.Update()
modelNode.SetAndObservePolyData(glyph.GetOutput())

```

How do you plan to use this data in Slicer?

---

<div class="post-metadata">

### Author: ![akshay\_pillai](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/akshay_pillai/32/8301_2.png) [@akshay\_pillai](https://discourse.slicer.org/u/akshay_pillai)
#### Post date: [March 1, 2021, 9:17pm UTC](https://discourse.slicer.org/t/unable-to-view-vtk-file-in-slicer/16294/5 "2021-03-01T21:17:00Z")

</div>

I just wanted to view the points as a 3d model in slicer. Thanks for that, I tried the glyph filter method but I get this: AttributeError: ‘MRMLCorePython.vtkMRMLModelNode’ object has no attribute ‘GetPointData’

---

<div class="post-metadata">

### Author: ![akshay\_pillai](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/akshay_pillai/32/8301_2.png) [@akshay\_pillai](https://discourse.slicer.org/u/akshay_pillai)
#### Post date: [March 1, 2021, 9:22pm UTC](https://discourse.slicer.org/t/unable-to-view-vtk-file-in-slicer/16294/6 "2021-03-01T21:22:28Z")

</div>

@lassoan @jcfr Here is a vtk file that I have issues with. I just want to upload to slicer and view as 3d.

> **[x.vtk](https://drive.google.com/file/d/1YtIR6HN8F0lBicQ0xzlhnb04oYvJPAQc/view?usp=sharing)**
>
> Google Drive file.

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [March 1, 2021, 9:36pm UTC](https://discourse.slicer.org/t/unable-to-view-vtk-file-in-slicer/16294/7 "2021-03-01T21:36:55Z")

</div>

> [@akshay\_pillai](#):
>
> Thanks for that, I tried the glyph filter method but I get this: AttributeError: ‘MRMLCorePython.vtkMRMLModelNode’ object has no attribute ‘GetPointData’

I’ve updated thr code snippet, it should work now.

---

<div class="post-metadata">

### Author: ![akshay\_pillai](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/akshay_pillai/32/8301_2.png) [@akshay\_pillai](https://discourse.slicer.org/u/akshay_pillai)
#### Post date: [March 2, 2021, 3:20pm UTC](https://discourse.slicer.org/t/unable-to-view-vtk-file-in-slicer/16294/8 "2021-03-02T15:20:21Z")

</div>

@lassoan Hey, thank you, that worked, but it still doesn’t display. What line can I use to display it or view it in the Data module?

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [March 2, 2021, 10:35pm UTC](https://discourse.slicer.org/t/unable-to-view-vtk-file-in-slicer/16294/9 "2021-03-02T22:35:51Z")

</div>

The remaining issue was that the 3D view had to be centered.
