[Paraview] Python Programmable Filter Time Series Source

2017-12-02 Thread Bane Sullivan
Here is an example of a programmable filter vis XML that I want to simply print off the various file names or give me and ability to read the file series. I have this python programmable filter set up to work when I click File->Open in ParaView. I have the ability to then chose file series from the

[Paraview] Python programmable filter to process results over time

2017-11-21 Thread Messner, Mark Christian
I'm trying to make a programmable filter to do some post-processing that involves accumulating data from multiple time steps. This isn't really what I'm trying to do but as an example of something that would get me most of the way there say I want to sum up the values of a field over a range o

[Paraview] Python Programmable Filter: Reading unsigned short TIFFs into vtkImageData

2014-11-17 Thread Allan Lyckegaard
Hi paraview list Based on this blog post: http://www.kitware.com/blog/home/post/534, I am trying to make a Python plugin (source) that reads a stack of unsigned short TIFFs (uint16) and outputs 3D unsigned short imagedata in Paraview. Assigning the geometry to the imagedata works fine (see def Re

Re: [Paraview] python programmable filter via xml with multiple input

2014-09-30 Thread Utkarsh Ayachit
Ah, sorry I missed that. Yea, if you want to simply use the vtkPythonProgrammableFilter, I'm afraid you'll have to stick with 1 input port accepting multiple connections, rather than separate input ports. Thus, you'll need to change your XML to just have 1 , however you can set the "multiple_input"

Re: [Paraview] python programmable filter via xml with multiple input

2014-09-29 Thread Fraser Callaghan
Thanks for the clarification. I had tried this with the following error: vtkPythonProgrammableFilter (0x5458a60): Attempt to connect input port index 1 for an algorithm with 1 input ports. I gather that 'SetNumberOfInputPorts()' should be called in the constructor of the filter, which I gather is

Re: [Paraview] python programmable filter via xml with multiple input

2014-09-29 Thread Utkarsh Ayachit
In your example, your XML is setup to provide the inputs on multiple "ports", while you're code is expecting multiple "connections" on same port. Use the following script, instead. print self.GetInputDataObject(0, 0).GetNumberOfPoints() print self.GetInputDataObject(1, 0).GetNumberOfPoints

[Paraview] python programmable filter via xml with multiple input

2014-09-27 Thread Fraser Callaghan
Hi, I am able to run a python programmable filter accessing multiple inputs selected from the pipe line e.g: # numInputs = self.GetNumberOfInputConnections(0) for i in range(numInputs): print self.GetInputDataObject(0,i).GetNumberOfPoints() ## I am able to use the xml format to define

Re: [Paraview] Python Programmable Filter: Get Filename of Import filter

2011-11-28 Thread pat marion
he file information > property. > Looking at the doxygen documentation it in principle should have, but > perhaps not everything is wrapped into the ParaView VTK module. > > Markus > >> From: pat.mar...@kitware.com >> Date: Wed, 23 Nov 2011 16:28:15 -0500 >> Subject:

Re: [Paraview] Python Programmable Filter: Get Filename of Import filter

2011-11-28 Thread Markus Fuger
, but perhaps not everything is wrapped into the ParaView VTK module. Markus > From: pat.mar...@kitware.com > Date: Wed, 23 Nov 2011 16:28:15 -0500 > Subject: Re: [Paraview] Python Programmable Filter: Get Filename of Import > filter > To: m_fu...@hotmail.com > CC: paraview@para

Re: [Paraview] Python Programmable Filter: Get Filename of Import filter

2011-11-23 Thread pat marion
Hi Markus, You can walk up the filter pipeline from the python programmable filter like this: filter = self while filter.GetInput(): filter = filter.GetInput().GetProducerPort().GetProducer() print filter.GetClassName() This is technique is also discouraged :) Filters should be self cont

[Paraview] Python Programmable Filter: Get Filename of Import filter

2011-11-23 Thread Markus Fuger
Hello, it seems if my question formulated in a previous thread (http://www.paraview.org/pipermail/paraview/2011-November/023318.html) did not really decribe what I needed. I do like to get the information of the ImportFilter.GetPropertyValue('FileNameInfo') in a Programmable Filter, namely t

Re: [Paraview] Python Programmable Filter

2010-04-19 Thread Utkarsh Ayachit
No, it's not possible to write a python programmable filter with multiple output ports. The number of output ports needs to be set in the constructor of the class itself which is too early to be able to set by the user from the panel for any filter. Workaround is producing a multi-block. Utkarsh

[Paraview] Python Programmable Filter

2010-04-19 Thread Favre Jean
Hello Can one write a Python Programmable Filter with multiple outputs? I tried the obvious self.SetNumberOfOutputPorts(2), which complained, and in any case, I wonder how it would interact with the GUI option which defines the output Data Set Type. Since there is a single option, I guess I wou

Re: [Paraview] python programmable filter

2009-05-10 Thread John Biddiscombe
What does //BTX and //ETX means Begin TCL Exclude End TCL Exclude. VTK was originally wrapped for use with TCL -hence the name choice. The original parser code used BTX/ETX to mark pieces that couldn't be wrapped and should be skipped. ? how to know if a method is automaticlly or not ?

Re: [Paraview] python programmable filter

2009-05-10 Thread Nehme Bilal
Thank you Jean. What does //BTX and //ETX means ? how to know if a method is automaticlly or not ? Thanks, Nehme On Sun, 10 May 2009 08:10:09 +0200 (CEST) Jean Favre wrote: On 10, May 2009 03:38 AM, Nehme Bilal wrote: Hi, I am using vtkKdTree in a python programmable filter. I would

Re: [Paraview] python programmable filter

2009-05-09 Thread Jean Favre
On 10, May 2009 03:38 AM, Nehme Bilal wrote: >Hi, >I am using vtkKdTree in a python programmable filter. I >would like to use: >void vtkKdTree::FindPointsWithinRadius(double R, >const double x[3], >vtkIdList* result) the method is not available. It is enclosed into a //BTX //ETX in the source

[Paraview] python programmable filter

2009-05-09 Thread Nehme Bilal
Hi, I am using vtkKdTree in a python programmable filter. I would like to use: void vtkKdTree::FindPointsWithinRadius(double R, const double x[3], vtkIdList* result) but I don't know how to write it in python. I tried the following : coord = (687856,539156,269) result = vtk.vtkIdList() kd

Re: [Paraview] Python Programmable Filter

2008-11-13 Thread Utkarsh Ayachit
To print the class name for any vtkobject in python use: print obj.GetClassName() Utkarsh Jacques Papper wrote: Indeed the VTK online doxygen is very useful. Is there any way in python of getting the name of the class of the object I'm dealing with ? That way I can find the class documentati

Re: [Paraview] Python Programmable Filter

2008-11-13 Thread Jacques Papper
Indeed the VTK online doxygen is very useful. Is there any way in python of getting the name of the class of the object I'm dealing with ? That way I can find the class documentation in the Doxygen ? Thanks again, Jacques 2008/11/13 David E DeMarle <[EMAIL PROTECTED]> > There is probably a python

Re: [Paraview] Python Programmable Filter

2008-11-13 Thread David E DeMarle
There is probably a python way to get help more easily, but one way to figure it out is to look at the VTK doxygen documentation for vtkDataObject and it's subclasses, and realize that all (or almost all) of the public C++ methods are wrapped into python and therefore available to use. cheers, Dav

Re: [Paraview] Python Programmable Filter

2008-11-13 Thread Jacques Papper
Thanks a lot Utkarsh ! It works. I was almost there, but I couldn't figure out a way to expose the available interface for each object! Where am I supposed to look to figure out that CopyStructure(), and NewInstance(), SetBlock() etc ... are functions available ? Kind regards, Jacques Papper 20

Re: [Paraview] Python Programmable Filter

2008-11-13 Thread Utkarsh Ayachit
Jacques, Couple of ways to solve your problem: * Solution One: If you don't want to deal with the fact that your data is a vtkMultiblockDataSet, apply the "Merge Blocks" filter after each of the "Extract Block" filters and then connect to the "Programmable Filter" to to the output from the "M

Re: [Paraview] Python Programmable Filter

2008-11-13 Thread Jacques Papper
Here is what I am doing at the moment. -Load geometry 1 -Extract wing block -Load geometry 2 -Extract wing block Then use the resample filter with wing1 as input and wing2 as source (this works) The last bit is missing (that is merging the data from wing2 with the resampled data) Jacques 2008/

Re: [Paraview] Python Programmable Filter

2008-11-13 Thread Berk Geveci
Programmable filter can still be made to work. Do the datasets have multiple parts? I am not sure how resampling would work with multiple parts. It is impossible to guess which parts map to which parts... -berk On Thu, Nov 13, 2008 at 8:28 AM, Jacques Papper <[EMAIL PROTECTED]> wrote: > They are

Re: [Paraview] Python Programmable Filter

2008-11-13 Thread Jacques Papper
They are multi-block datasets from Ensight Reader. Is there another way of dealing with this then ? Jacques 2008/11/13 Berk Geveci <[EMAIL PROTECTED]> > Are the inputs multi-block datasets by any chance? > > > -berk > > On Thu, Nov 13, 2008 at 6:03 AM, Jacques Papper > <[EMAIL PROTECTED]> wrote:

Re: [Paraview] Python Programmable Filter

2008-11-13 Thread Berk Geveci
Are the inputs multi-block datasets by any chance? -berk On Thu, Nov 13, 2008 at 6:03 AM, Jacques Papper <[EMAIL PROTECTED]> wrote: > Hi Berk, > > I am trying out your suggestion of merging arrays : > > input0 = self.GetInputDataObject(0,0) > input1 = self.GetInputDataObject(0,1) > output = self

[Paraview] Python Programmable Filter

2008-11-13 Thread Jacques Papper
Hi Berk, I am trying out your suggestion of merging arrays : input0 = self.GetInputDataObject(0,0) input1 = self.GetInputDataObject(0,1) output = self.GetOutputDataObject(0) output.GetPointData().AddArray(input0.GetPointData().GetArray("pressure1")) output.GetPointData().AddArray(input1.GetPointD