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

Markus Fuger m_fuger at hotmail.com
Mon Nov 28 05:36:51 EST 2011


Hi Pat,

Thank you for your hint! Unfortunately I would need one more step:
The reason is that the last filter after the while loop will return a
vtkFileSeriesReader where I can't find or access the 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.marion at kitware.com
> Date: Wed, 23 Nov 2011 16:28:15 -0500
> Subject: Re: [Paraview] Python Programmable Filter: Get Filename of Import filter
> To: m_fuger at hotmail.com
> CC: paraview at paraview.org
> 
> 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
> contained algorithms and that do not make assumptions about their
> upstream connections.  But, if it works, it works!
> 
> Pat
> 
> On Wed, Nov 23, 2011 at 2:47 PM, Markus Fuger <m_fuger at hotmail.com> wrote:
> > 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 the filename (and directory) of the recent file in a file series.
> > (I believe that I can get to the most upper filter by a while loop. But to
> > apply that scheme I would first of all need the filter object of the
> > programmable filer)
> >
> > On the previous thread I was blamed to not follow the seperation of the
> > client - server. Due to the fact, that both (at least for the moment) run on
> > the same maschine, this should not be the largest problem.
> >
> > Thank you in advance,
> > Markus
> >
> > _______________________________________________
> > 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://www.paraview.org/mailman/listinfo/paraview
> >
> >
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20111128/a78ab264/attachment-0001.htm>


More information about the ParaView mailing list