|
[Sponsors] |
[General] Listing the inputs of a grouped dataset with a programmable python filter in Paraview |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 28, 2019, 20:16 |
Listing the inputs of a grouped dataset with a programmable python filter in Paraview
|
#1 |
New Member
Nadine
Join Date: Jan 2019
Posts: 4
Rep Power: 8 |
Is there a way to list the names of the inputs in a Group Dataset filter with a programmable python filter?
I have a lot of point sources that I have grouped in paraview. Then I applied "Merge Blocks" and then the Programmable Python filter. This is the code so far in the programmable filter: Code:
pdi = self.GetInput() npts = pdi.GetNumberOfPoints() print npts for i in range(0, npts): coord1 = pdi.GetPoint(i) print coord1 PointSource1 PointSource5 etc. I would appreciate your help. |
|
February 7, 2019, 19:51 |
|
#2 |
New Member
Join Date: Feb 2019
Location: Czech Republic
Posts: 2
Rep Power: 0 |
It is possible to do it from the Python console in Paraview:
Code:
group_datasets = GetActiveSource() for input_obj in group_datasets.Input: for (name, _), obj in GetSources().items(): if obj == input_obj: print name break
__________________
Lead software developer at ENGINN EFFECT |
|
February 9, 2019, 17:41 |
|
#3 |
New Member
Nadine
Join Date: Jan 2019
Posts: 4
Rep Power: 8 |
Thanks tkarabela!
|
|
December 12, 2021, 15:54 |
|
#4 |
New Member
FATA
Join Date: Dec 2021
Posts: 1
Rep Power: 0 |
I am trying to setup best tennis stringing machines but prefix is now working properly.
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[General] selected cells in python programmable filter | ufocfd | ParaView | 3 | May 30, 2017 11:05 |
[General] Programmable Filter - Multiple Inputs - Crash | grnahas | ParaView | 0 | April 25, 2017 09:14 |
[General] Pass variable from programmable filter to Plot Over Line Filter | Jack001 | ParaView | 0 | March 29, 2016 14:18 |
[General] Python Programmable vtkImageData | joshuawd | ParaView | 6 | August 18, 2014 17:08 |
[General] Programmable Filter: when multiple inputs, how to verify which input is which? | macfly | ParaView | 0 | July 12, 2014 12:14 |