I’m trying to implement a simple custom filter using the
VTKPythonAlgorithmBase. I’d like to include a
vtkDataArraySelection and am now struggling with how to correctly use it.
Following the tutorials (VTK Python algorithm and Python algorithm examples), in
RequestData() I can simply write
input0 = dsa.WrapDataObject(vtkDataSet.GetData(inInfo))
and directly inspect all the arrays from there and add them to my
ArraySelection. However, it seems reasonable that array selection should be done before the actual computation. So I though of moving that functionality into the
RequestInformation method. However, it appears that
GetData does not work there, I get an error in that line.
So I wanted to ask if I can inspect data array names and add them to the selection at that point of pipeline execution at all and if so, how to do it. I’m really sorry if this is obvious, but I’m not that familiar with VTK and could not find information on how to do this.
Thanks in advance!