Thanks Utkarsh, the required information is in MetaData:
print iter.GetCurrentMetaData() vtkInformation (0x3808f00) Debug: Off Modified Time: 269417 Reference Count: 2 Registered Events: (none) DONT_PRUNE: 1 NAME: my_given_name Now I want to work with the NAME-Attribute (my_given_name) but I don't know how to get this into a variable? I can't find a GetName()-Method... print dir(iter.GetCurrentMetaData()) ['AddObserver', 'Append', 'AppendUnique', 'BreakOnError', 'Clear', 'Copy', 'CopyEntries', 'CopyEntry', 'DebugOff', 'DebugOn', 'FastDelete', 'Get', 'GetAddressAsString', 'GetClassName', 'GetDebug', 'GetGlobalWarningDisplay', 'GetKey', 'GetMTime', 'GetNumberOfKeys', 'GetReferenceCount', 'GetRequest', 'GlobalWarningDisplayOff', 'GlobalWarningDisplayOn', 'Has', 'HasObserver', 'InvokeEvent', 'IsA', 'IsTypeOf', 'Length', 'Modified', 'NewInstance', 'PrintRevisions', 'Register', 'Remove', 'RemoveAllObservers', 'RemoveObserver', 'RemoveObservers', 'SafeDownCast', 'Set', 'SetDebug', 'SetGlobalWarningDisplay', 'SetReferenceCount', 'SetRequest', 'UnRegister'] Thanks for help. Regards Bastian Am 30.05.2010 16:58, schrieb Utkarsh Ayachit: > The following example shows how to create an iterator to iterate over > all blocks in a composite dataset. The iterator > (http://www.vtk.org/doc/nightly/html/classvtkCompositeDataIterator.html) > has methods like HasCurrentMetaData(), GetCurrentMetaData() that you > can use to get the meta-data for the current block. Note that by > default the iterator skips over non-leaf nodes. If you want to access > those, use VisitOnlyLeavesOff() on the iterator. > > http://www.itk.org/Wiki/Python_Programmable_Filter#Dealing_with_Composite_Datasets > > Utkarsh > > On Sat, May 29, 2010 at 1:15 PM, BastiL2001 <bastil2...@yahoo.de> wrote: > >> Thanks Andi, >> >> I don't know since the ensight reader does this for me. I want to work with >> the input he produces. >> >> Is it in any way possible to link GetMetaData to the current block? Afaik I >> can not query each blocks meta-Data, can I? >> >> Are you naming the block in the meta-data? In vtkCompositeDataSet there is >> a method called GetMetaData >> (http://www.vtk.org/doc/nightly/html/classvtkCompositeDataSet.html#abcf79d23fc3a67138da3336e4cda2afe) >> that may be what you're looking for. >> >> Andy >> >> On Fri, May 28, 2010 at 3:58 PM, BastiL2001 <bastil2...@yahoo.de> wrote: >> >>> Thanks Andi, >>> >>> I will do this. What I am planning to do is to create a scalr field with >>> some distance information as an output. >>> >>> Another issue: I want to loop oder a multi-block dataset with an iterator >>> in a programmable filter (works) and find out the name of the currently >>> visited block. Is that possible? Thanks. >>> >>> Regards Bastian >>> >>> ________________________________ >>> Von: pat marion <pat.mar...@kitware.com> >>> An: Utkarsh Ayachit <utkarsh.ayac...@kitware.com> >>> CC: Andy Bauer <andy.ba...@kitware.com>; "bastil2...@yahoo.de" >>> <bastil2...@yahoo.de>; ParaView <paraview@paraview.org> >>> Gesendet: Freitag, den 28. Mai 2010, 16:59:07 Uhr >>> Betreff: Re: [Paraview] vtkCellLocator: Python >>> >>> Unfortunately some of the locator api is pass by reference and therefore >>> not wrapped by python. Bastian, let us know if you run into missing methods >>> when trying to use the cell locator in python. >>> >>> Pat >>> >>> On Fri, May 28, 2010 at 10:31 AM, Utkarsh Ayachit >>> <utkarsh.ayac...@kitware.com> wrote: >>> >>>> Andy, >>>> >>>> Bastian wants to use the cell locator in a python programmable -- >>>> which won't involve any fetching. >>>> >>>> Bastian, >>>> You can create a cell locator in your programmable filter simply by: >>>> >>>> locator = vtk.vtkCellLocator() >>>> >>>> >>>> Utkarsh >>>> >>>> >>>> >>>> >>>> On Fri, May 28, 2010 at 10:22 AM, Andy Bauer <andy.ba...@kitware.com> >>>> wrote: >>>> >>>>> My guess is that you'll want to use a filter to get access to the cell >>>>> locator. What's the desired output for this? >>>>> >>>>> You could also fetch the data set to the client and then use the vtk >>>>> wrapped >>>>> classes in paraview.vtk to use the cell locator if the class has been >>>>> wrapped but the fetch operation should be used with caution. >>>>> >>>>> Andy >>>>> >>>>> On Thu, May 27, 2010 at 5:55 PM, bastil2...@yahoo.de >>>>> <bastil2...@yahoo.de> >>>>> wrote: >>>>> >>>>>> Dear all, >>>>>> >>>>>> can I use vtkCellLocator from within Pyhon oder the Python >>>>>> programmable >>>>>> filter? If yes, how? Or do I need to write my own filter in c++? >>>>>> Thanks. >>>>>> >>>>>> Regards Bastian >>>>>> _______________________________________________ >>>>>> 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 >>>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >>>>> >>>>> >>>>> >>>> _______________________________________________ >>>> 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 >>>> >>> >>> >> >> >> _______________________________________________ >> 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 >> >> >> > _______________________________________________ > 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 > >
_______________________________________________ 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