I have a 3D VTK dataset and I want to post-process it in a Python script (using pvbatch). Everything works well up to the application of the vtkAngularPeriodicFilter:
# Loop through snapshots
for i in range(valid_iterations_id[0], len(iterations)):
print("Processing iteration", i, "out of", len(iterations))
# Read the VTK data
data = vtkutils.read_vtk(folder + fileName[i])
print(data.GetOutput())
# Don't try using clip: too slow
#data = vtkutils.clip_vtk(data,Zmin)
# Remove part of data before Zmin
data = vtkutils.extractGeometry_vtk(data,Zmin)
print(data.GetOutput())
# Remove part of data after Zmax
data = vtkutils.extractGeometry_vtk(data,Zmax)
print(data.GetOutput())
# Remove part of data beyond cylinder radius
data = vtkutils.extractGeometry_vtk(data,cyl)
print(data.GetOutput())
# Apply angular periodic filter
data = vtkutils.angularPeriodic_vtk(data, 45., 2, [0., 0., 0.])
print(data.GetOutput())
# Slice through data
data = vtkutils.cut_vtk(data, cut)
print(data.GetOutput())
Then the code crashes when attempting to execute the vtkCutter with the following error message:
( 332.150s) [pvbatch ]vtkGenericDataArray.txx:268 ERR| 27vtkAngularPeriodicDataArrayIfE (0x10d227d0): GetVoidPointer is not supported by this class.
Which filter is behind this ? if it is actual vtkCutter, then it should be fixed to not rely on GetVoidPointer. In any case, you can work around this by using SetComputeRotationsOnTheFly (bool)
However, I must say that setting compute rotations on the fly to false kills the performance of your code (it is much slower) and may become prohibitive for large datasets…