Appending vtkImageData in paraview

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

    from paraview import vtk
    A = self.GetInputDataObject(0, 0)
    B = self.GetInputDataObject(0, 1)
    vtkAppend = vtk.vtkImageAppend()
    vtkAppend.SetInputData(A)
    vtkAppend.SetInputData(B)
    vtkAppend.Update()
    output = self.GetOutput()
    output.ShallowCopy(vtkAppend.GetOutput())

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

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

Paraview hangs and I had to force quit the application.

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 ?

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

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