[Paraview] D3 filter and PkdTrees: how to tell if D3 previously executed?, PkdTree point locators

burlen burlen.loring at gmail.com
Wed Nov 11 13:19:37 EST 2009


HI, I can only address the questions, 1) and 4). They can be solved 
using vtkInformationKey's

> 1. How do I tell if D3 has been executed previously in the pipeline?
>   

> 4. If I run D3 and/or build a KdTree within my filter it would be nice
> to save this for possible use by filters downstream. I see that D3 has
> a SetRetainKdTree, which may be what I am looking for in that regard,
> but if I build my own KdTree with associated locator is there a way to
> retain it/access it downstream?

One may pass information downstream via vtkInformationKey objects.

If you wanted to know weather there is a certain filter upstream, then 
that filter can leave a trace of its presence in the pipeline 
information as its RequestData is executed. It will add a 
vtkInformationKey to the output information. downstream filters then 
look for this specific key. If present it's evidence that the other 
filter is in the pipeline upstream.

You can pass almost anything you like downstream including vtk objects 
between readers,sources, and filters using the vtkInformationKey's. For 
example you may use vtkInformtionObjectBaseKey to pass a vtkPKdTree 
downstream between two filters.

You'll have to modify vtkDistributedDataFilter, adding the keys you need.

Hope this helps,

Burlen


Christine Corbett Moran wrote:
> Hi,
>
> I'm now playing around with creating some filters which use PkdTrees
> internally, mainly for their point locator capabilities. As the
> filters I'm interested in creating work best with spatial locality, I
> want to execute D3 if running in parallel and it has not previously
> been executed. I had four primary questions.
>
> 1. How do I tell if D3 has been executed previously in the pipeline?
> 2. It seems that I must first build a locator from points before
> calling e.g. FindClosestNPoints even though D3 takes in the same data
> set as input to build its KdTree. Does this mean
> BuildLocatorFromPoints(input) builds a different sort (and, in turn,
> new) KdTree than D3->SetInput(input) .... D3->Update()? Should I not
> even bother trying to get the KdTree from D3 and simply create a new
> one?
> 3. If I build my own PkDtree is this accomplished by creating a new
> one on each process, and for my locator calling
> BuildLocatorFromPoints(input) on each process, or should I do
> something special on e.g. the root process?
> 4. If I run D3 and/or build a KdTree within my filter it would be nice
> to save this for possible use by filters downstream. I see that D3 has
> a SetRetainKdTree, which may be what I am looking for in that regard,
> but if I build my own KdTree with associated locator is there a way to
> retain it/access it downstream?
>
> Christine
> _______________________________________________
> 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
>   



More information about the ParaView mailing list