[Paraview] Selection of points

Eric E. Monson emonson at cs.duke.edu
Mon Aug 4 13:57:59 EDT 2008


Hey John,

That feature sounds great, but it still sounds like this should be  
taken care of by a Global ID. If the reader supports it, your  
ParticleId array could be set as a vtkIdTypeArray attached to the  
PointData using SetGlobalIds().

When I have point data of this type (where points come into and pop  
out of existence and change their order in the arrays, but I have  
assigned global ids) I can run ahead to an arbitrary time step, select  
some points, then go to the Selection Inspector and pull the Selection  
Type down to Global IDs. From there if I jump back to the first time  
step it keeps the correct selection, and it will behave correctly  
whether that Global ID exists only for part of the time series or the  
whole thing. So, it seems like the Global ID fills the same role as  
your "snapshot".

It sounds like your solution works great, so the only reason I'm  
chiming in on this is that Global IDs are an under-used, but existing  
part of VTK and ParaView, and may be a more natural and/or consistent  
solution than using a filter to do the same job. The downside is that  
readers would need to be extended so that they know how to assign that  
ParticleId array as a Global ID. In the VTK XML readers this is broken  
right now, and Xdmf / HDF5 doesn't have this capacity natively. (In my  
little Xdmf reader mod, I added an "ID" AttributeType as the flag for  
the .xmf file -- HDF 5 doesn't include the concept of an IdType  
array.) Exodus II is the main format I've seen which has good support  
for global ids.

Talk to you later,
-Eric


On Aug 4, 2008, at 11:01 AM, John Biddiscombe wrote:

> Eric
>
> No. My particles already have a global Id which I use to track them  
> independently. The trouble is (was), that when you select some in  
> ParaView, it uses their Id taken from the index they have in the  
> vtkPoints list (or Cell Id if using verts) and noy my "ParticleId"  
> array. This order can change arbitrarily in my data. As time steps  
> change - the selected points constantly shift about.
>
> I fixed the problem by creating a vtkSnapshot filter which simply  
> captures a dataset when you create it. It caches the result and  
> never updates anything from then on. This way I can select a bunch  
> of particles using the mouse, copy the active selection, then  
> snapshot it. I then pass this into the TTemporalTrails filter as the  
> selction input (you might need to update your copy to get this  
> filter). I can now pick individual (or groups) of particles at time  
> T=large, capture them, go back to T=0 and draw pathlines only for  
> thos eI wanted. Nice. This is also handy because particles can be  
> injected at differnt times and if their Id doesn't exist at some T  
> value, the trails filter just skips them. The ones selected get  
> drawn - if they exist.
>
> JB
>
>> Hey John,
>>
>> I'm trying to make sure I understand your question -- would your  
>> problem be solved if your particles had a Global ID associated with  
>> them, which was a unique "tag" that didn't change over time? (Then,  
>> the selection type could be "global id" and shouldn't reorder when  
>> time is stepped back to zero.)
>>
>> I've had to add a Global ID assignment to my version of the Xdmf  
>> reader so that my animated particle data could be selected and have  
>> attributes plotted over time, etc.
>>
>> Talk to you later,
>> -Eric
>>
>> ------------------------------------------------------
>> Eric E Monson
>> Duke Visualization Technology Group
>>
>>
>>
>> On Jul 22, 2008, at 3:46 AM, John Biddiscombe wrote:
>>
>>> I have a dataset which consists of animating particles. I can  
>>> select a region of space and get the Id's of certain particles. I  
>>> now wish to pass this list back into my Pathline filter so that  
>>> only the particles selected are drawn with pathlines. However,  
>>> when I hit the back button for the animation to return to time  
>>> zero, the selected particles now change. I can change the  
>>> selection type to Id - which is great because I can use this  
>>> information directly in the pathline filter to pick out the lines,  
>>> but again - when I change time step, the particles are re-ordered  
>>> and my information is lost.
>>>
>>> I'd like to copy the active selection - and then fix it - so it is  
>>> now disconnected from the pipeline and becomes a static piece of  
>>> data which does noit change with time.  If I save the selction to  
>>> disk, I can load it and use it as I'd like to. Is there a way of  
>>> copying the active selection - and disconnecting it from the  
>>> pipeline so that I can skip the disk save/load stage and pass the  
>>> selection directly to my pathline filter?
>>>
>>> thanks
>>>
>>> JB
>>>
>>> -- 
>>> John Biddiscombe,                            email:biddisco @  
>>> cscs.ch
>>> http://www.cscs.ch/about/BJohn.php
>>> CSCS, Swiss National Supercomputing Centre  | Tel:  +41 (91)  
>>> 610.82.07
>>> Via Cantonale, 6928 Manno, Switzerland      | Fax:  +41 (91)  
>>> 610.82.82
>>>
>>>
>>> _______________________________________________
>>> ParaView mailing list
>>> ParaView at paraview.org
>>> http://www.paraview.org/mailman/listinfo/paraview
>>
>
>
> -- 
> John Biddiscombe,                            email:biddisco @ cscs.ch
> http://www.cscs.ch/about/BJohn.php
> CSCS, Swiss National Supercomputing Centre  | Tel:  +41 (91) 610.82.07
> Via Cantonale, 6928 Manno, Switzerland      | Fax:  +41 (91) 610.82.82
>



More information about the ParaView mailing list