Hi,
I would like to define a custom programmable filter to work with
MultiBlockDatasets. In that filter, I need to access to the name of each
block being processed. By "name", I mean the information given in the
"Information>Data Hierarchy" tree.
Could you explain me how to access to that information in a programmable
filter?
Fort information, here is a code example of what I would like to do:
[code]
from paraview.vtk import dataset_adapter as DA
input = self.GetInputDataObject(0, 0)
output = self.GetOutputDataObject(0)
def process_block(input_block, output_block) :
data = input_block.PointData['data']
if data is None :
print 'data is None'
else :
# <<<< get the name of input_block >>>>
print 'do something with data'
iter = DA.MultiCompositeDataIterator([input, output])
for input_block, output_block in iter:
process_block(input_block, output_block)
[/code]
B. L.
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the ParaView Wiki at:
http://paraview.org/Wiki/ParaView
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview