[Paraview] SetActiveVectors with paraview.simple

Oliver Borm oli.borm at web.de
Thu Sep 29 16:44:44 EDT 2011


Hello,

according to (the closed) bug 7387 the vtkTransformFilter is only able
(by design) to transform one "active" vector. From my point of view,
this seems to be a limitation of the virtual function
TransformPointsNormalsVectors(), as this function can only handle one
result vector and one Normal vector. In order to avoid to change the
paraview API, I'll need to SetActiveVectors() from within
paraview.simple in python, as I need to control which of my vectors need
to transform properly.

In the GUI this can be done within the Programmable Filter, for example
like this (Check copy arrays on):

activeVectorName = "fubar"

output = self.GetOutputDataObject(0)

if output.IsA("vtkMultiBlockDataSet"):
    iter = output.NewIterator()
    iter.UnRegister(None)
    iter.InitTraversal()
    while not iter.IsDoneWithTraversal():
       
iter.GetCurrentDataObject().GetPointData().SetActiveVectors(activeVectorName)
        iter.GoToNextItem()
else:
    output.GetPointData().SetActiveVectors(activeVectorName)


Is it possible to do this directly within paraview.simple in python?

Thanks,
Oliver



More information about the ParaView mailing list