# Appending vtkImageData in paraview

**URL:** https://discourse.paraview.org/t/appending-vtkimagedata-in-paraview/3701
**Category:** ParaView Support
**Tags:** vtk, python
**Created:** [February 29, 2020, 4:12pm UTC](https://discourse.paraview.org/t/appending-vtkimagedata-in-paraview/3701 "2020-02-29T16:12:00Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Vishnu-C](https://discourse.paraview.org/user_avatar/discourse.paraview.org/vishnu-c/32/3121_2.png) [@Vishnu-C](https://discourse.paraview.org/u/Vishnu-C)
#### Post date: [February 29, 2020, 4:12pm UTC](https://discourse.paraview.org/t/appending-vtkimagedata-in-paraview/3701/1 "2020-02-29T16:12:00Z")

</div>

Hello,

I want to append vtkImageData files to a single file, I could easily do that with vtk. But from paraview I can apply transform filters to place them as needed and append them. I tried two techniques to do that,

1. Write a Programable Filter

When i do this the output gets clipped to bounding box of smallest dataset between the two, in short it doesn’t append correct.

1. Write a python script

> ```
> from paraview import *
> from paraview import servermanager as sm
> sources = GetSources()
> sources = sources.values()
> source1 = sources[1]
> source2 = sources[2]
> imgData1 = sm.Fetch(source1)
> imgData2 = sm.Fetch(source2)
> vtkAppend = vtk.vtkImageAppend()
> vtkAppend.SetInputData(imgData1)
> vtkAppend.SetInputData(imgData2)
> vtkAppend.Update()
> dataMerged = vtkAppend.GetOutput()
> 
> writer = vtk.vtkStructuredPointsWriter()
> writer.SetInputData(dataMerged)
> writer.SetFileName("vtkmerged.vtk")
> writer.Write()
> 
> ```

With this I get error as  
`AttributeError: 'module' object has no attribute 'vtkStructuredPointsWriter'`

Any insights on this problem would help a lot.  
Thanks  
Vishnu C

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 2, 2020, 2:46am UTC](https://discourse.paraview.org/t/appending-vtkimagedata-in-paraview/3701/2 "2020-03-02T02:46:58Z")

</div>

What about using Append filter and Save Data with the GUI ?

---

<div class="post-metadata">

### Author: ![Vishnu-C](https://discourse.paraview.org/user_avatar/discourse.paraview.org/vishnu-c/32/3121_2.png) [@Vishnu-C](https://discourse.paraview.org/u/Vishnu-C)
#### Post date: [March 2, 2020, 3:10am UTC](https://discourse.paraview.org/t/appending-vtkimagedata-in-paraview/3701/3 "2020-03-02T03:10:43Z")

</div>

Paraview hangs and I had to force quit the application.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 2, 2020, 3:12am UTC](https://discourse.paraview.org/t/appending-vtkimagedata-in-paraview/3701/4 "2020-03-02T03:12:13Z")

</div>

Let’s concentrate on this issue first.

Which version ParaView are you using ?  
Can you share a dataset and simple steps to reproduce your issue ?

---

<div class="post-metadata">

### Author: ![Vishnu-C](https://discourse.paraview.org/user_avatar/discourse.paraview.org/vishnu-c/32/3121_2.png) [@Vishnu-C](https://discourse.paraview.org/u/Vishnu-C)
#### Post date: [March 2, 2020, 3:13am UTC](https://discourse.paraview.org/t/appending-vtkimagedata-in-paraview/3701/5 "2020-03-02T03:13:44Z")

</div>

Sure, I am away from computer, will send them in some time. Thanks for the reply.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 2, 2020, 3:14am UTC](https://discourse.paraview.org/t/appending-vtkimagedata-in-paraview/3701/6 "2020-03-02T03:14:11Z")

</div>

@martink may know more, but I don’t think the GLTFExporter support binary export yet.
