[Paraview] [EXT] Re: Select points based on coordinates

Dennis Conklin dennis_conklin at goodyear.com
Wed Sep 13 13:32:10 EDT 2017


Yifei,

Glad that helped.   If memory becomes critical, you could write a Programmable Filter that created array Loc by shallow copying array coords – this would sharply reduce the memory footprint of the Loc array.

Next time I’ll ask you for help!

Dennis

From: Yifei Ma [mailto:yifei85.ma at gmail.com]
Sent: Wednesday, September 13, 2017 1:19 PM
To: Dennis Conklin <dennis_conklin at goodyear.com>
Cc: Paraview (paraview at paraview.org) <paraview at paraview.org>
Subject: Re: [EXT] Re: [Paraview] Select points based on coordinates

Hi Dennis,

Calculator filter did the trick. I created Loc using vector array coords. Then I have no problem finding the points using Find Data by specifying certain Loc.

Thanks for the help.

Best,
Yifei

On Wed, Sep 13, 2017 at 10:03 AM, Dennis Conklin <dennis_conklin at goodyear.com<mailto:dennis_conklin at goodyear.com>> wrote:
Yifei,

I don’t know anything about vtu files – I don’t see any array of “Position”.

However, perhaps you can use vector array coords – this is Paraviews internal array of point positions.   You could use this to create Loc after you read your file into Paraview – your filesize would not increase, although you would use some memory for the duplicate of coords (I assume running Calculator does a deep copy, anyone able to correct me)

So, read in file, run calculator on it – add Point Data Array Name of Loc – from the Vectors dropdown add coords to expression.   Now you will have a vector called Loc and my earlier queries will work.

I could not get the queries to work directly with the coords vector array – maybe someone else knows how to do that.

Dennis

From: Yifei Ma [mailto:yifei85.ma at gmail.com<mailto:yifei85.ma at gmail.com>]
Sent: Wednesday, September 13, 2017 12:32 PM
To: Dennis Conklin <dennis_conklin at goodyear.com<mailto:dennis_conklin at goodyear.com>>
Cc: Paraview (paraview at paraview.org<mailto:paraview at paraview.org>) <paraview at paraview.org<mailto:paraview at paraview.org>>
Subject: [EXT] Re: [Paraview] Select points based on coordinates

 WARNING - External email; exercise caution.



Hi Dennis,

Sorry that I wasn't clear about the data file. The "Loc" DataArray is not included in the original data. I simply copy&paste the "Position" DataArray and re-named it "Loc" in order to find data based on its location. This is a workaround and it works just fine for small data files. However, my original data is quit huge and I have to do the copy&paste for thousands of files to make the workaround work. Also file size will be increased significantly by using this method. Since the "Position" information is already included in each data file. I am wondering if there is a way to access it in "Find Data". If so, I don't need to replicate it to create "Loc".

Thanks,
Yifei

On Wed, Sep 13, 2017 at 7:57 AM, Dennis Conklin <dennis_conklin at goodyear.com<mailto:dennis_conklin at goodyear.com>> wrote:
Yifei,

I don’t understand the issue.
I DL’ed your file and proceeded as follows
Edit/Settings/General/Auto Convert Properties checked (On)

Find Data
Find POINTS in test_data.vtu
Loc(0) is >= 0.009
Run Selection Query
Extract Selection

This correctly extracted the 1 point met that requirement

If I change to a query of
(Loc[:,0] >= .008) & (Loc[:,1] >= -.0004)  then it correctly selects the single point that meets that criteria.

Perhaps the difficulty is because you haven’t  set Auto Convert Properties

Hope this helps.
Dennis

_______________________________________________
Powered by www.kitware.com<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com&data=01%7C01%7Cdennis_conklin%40goodyear.com%7C51fc8cfd504d4775bf5708d4fac51963%7C939e896692854a9a9f040887efe8aae0%7C0&sdata=yKnJ8jV%2Bh2UEwoR9aaGP3V3Ne9xuTwnzz3KHXEwQVdM%3D&reserved=0>

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=01%7C01%7Cdennis_conklin%40goodyear.com%7C51fc8cfd504d4775bf5708d4fac51963%7C939e896692854a9a9f040887efe8aae0%7C0&sdata=9iWB%2BrTwSfe%2B4HtCNBjecnnkb1hM8%2BFOD4eRqs0Zy6w%3D&reserved=0>

Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fparaview.org%2FWiki%2FParaView&data=01%7C01%7Cdennis_conklin%40goodyear.com%7C51fc8cfd504d4775bf5708d4fac51963%7C939e896692854a9a9f040887efe8aae0%7C0&sdata=JMax3IOj%2F6zRRMEfb4upCobXQ3NyQEMfucBybgq3wFc%3D&reserved=0>

Search the list archives at: http://markmail.org/search/?q=ParaView<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3DParaView&data=01%7C01%7Cdennis_conklin%40goodyear.com%7C51fc8cfd504d4775bf5708d4fac51963%7C939e896692854a9a9f040887efe8aae0%7C0&sdata=0QcOAUDIEwwLeaMSnUtBx6qJKJEQMPD5Bhu2ZPLNE6M%3D&reserved=0>

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fparaview&data=01%7C01%7Cdennis_conklin%40goodyear.com%7C51fc8cfd504d4775bf5708d4fac51963%7C939e896692854a9a9f040887efe8aae0%7C0&sdata=3HO1tslxBDYT%2F1IzcxWyhCmuqd1vBgvTdTm8FliHSFw%3D&reserved=0>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170913/ecce38c1/attachment.html>


More information about the ParaView mailing list