Re: [Paraview] Fw: How do we get the indexes and IDs from the extracted selections to be seen in the Trace?
The indices of the points selected are in a field called "vtkOriginalPointIds". It is a field with a special meaning and is hidden in some cases. if you write the selected data to disk, it will show up as field "vtkOriginalPointIds" Consider the pvpython code below: from paraview.simple import * w = Wavelet() w.UpdatePipeline() selection=SelectPoints() selection.QueryString="RTData <= 40" selection.FieldType = 'POINT' selection.UpdatePipelineInformation() # create a new 'Extract Selection' mySelection = ExtractSelection(Input=w, Selection=selection) mySelection.UpdatePipeline() SaveData("foo.vtk", mySelection) and inspect the contents of foo.vtk, you will find your ids. if you need more, I simply use a Python Calculator to rename the field and I can then access the array passthru = PythonCalculator(Input = mySelection) passthru.Expression = 'inputs[0].PointData["vtkOriginalPointIds"]' passthru.ArrayAssociation = "Point Data" passthru.ArrayName = 'ids' passthru.UpdatePipeline() passthru.GetPointDataInformation().GetArray("ids").GetName() HTH Jean ___ Powered by www.kitware.com ParaView discussion is moving! Please visit https://discourse.paraview.org/ for future posts. 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 Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: https://public.kitware.com/mailman/listinfo/paraview
Re: [Paraview] Fw: How do we get the indexes and IDs from the extracted selections to be seen in the Trace?
On Wed, Jun 6, 2018 at 9:37 AM Sarah Flaherty wrote: > If it does not show in the trace, is it possible to access those numbers > through the python shell? > Alas, the situation is the same. As a workaround, you can add a GenerateIds filter to your data to generate point and cell IDs, and add an Extract Selection filter with Preserve Topology on, which generates a 'vtkInsidedness' point and cell array marking which points/cells have been selected. Then, you can add an Append Attributes filter to both the GenerateIds and Extract Selection filters to combine the IDs and vtkInsidedness arrays. Finally, add z Threshold filter and threshold by the vtkInsidedness array. The result will be a data set containing only selected cells and points with the original cell/point IDs. You can then access these IDs through Python. Cory > Sarah > -- > *From:* Cory Quammen > *Sent:* Wednesday, June 6, 2018 9:31:41 AM > *To:* Sarah Flaherty > *Cc:* paraview@public.kitware.com; ParaView > *Subject:* Re: [Paraview] Fw: How do we get the indexes and IDs from the > extracted selections to be seen in the Trace? > > Hi Sarah, > > I'm afraid that selections are not currently well supported in Python. > Because of that, they are not recorded in Python traces. > > It is on our todo list to provide a real Python API for selections in one > of the next ParaView releases. > > Best regards, > Cory > > On Wed, Jun 6, 2018 at 9:17 AM Sarah Flaherty > wrote: > > Paraview, > > I am trying to have the index of the points that are selected and > extracted displayed in the trace. They are seen in the Properties Bar on > the right when the ExtractSelection1 is active, however they are not seen > in the trace. How do I get this information into python script or the trace? > Thank you, > Sarah Flaherty > ___ > Powered by www.kitware.com > > ParaView discussion is moving! Please visit > https://discourse.paraview.org/ for future posts. > > 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 > > Search the list archives at: http://markmail.org/search/?q=ParaView > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/paraview > > > > -- > Cory Quammen > Staff R&D Engineer > Kitware, Inc. > -- Cory Quammen Staff R&D Engineer Kitware, Inc. ___ Powered by www.kitware.com ParaView discussion is moving! Please visit https://discourse.paraview.org/ for future posts. 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 Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: https://public.kitware.com/mailman/listinfo/paraview
Re: [Paraview] Fw: How do we get the indexes and IDs from the extracted selections to be seen in the Trace?
Cory, If it does not show in the trace, is it possible to access those numbers through the python shell? Sarah From: Cory Quammen Sent: Wednesday, June 6, 2018 9:31:41 AM To: Sarah Flaherty Cc: paraview@public.kitware.com; ParaView Subject: Re: [Paraview] Fw: How do we get the indexes and IDs from the extracted selections to be seen in the Trace? Hi Sarah, I'm afraid that selections are not currently well supported in Python. Because of that, they are not recorded in Python traces. It is on our todo list to provide a real Python API for selections in one of the next ParaView releases. Best regards, Cory On Wed, Jun 6, 2018 at 9:17 AM Sarah Flaherty mailto:sjflahe...@loyola.edu>> wrote: Paraview, I am trying to have the index of the points that are selected and extracted displayed in the trace. They are seen in the Properties Bar on the right when the ExtractSelection1 is active, however they are not seen in the trace. How do I get this information into python script or the trace? Thank you, Sarah Flaherty ___ Powered by www.kitware.com<http://www.kitware.com> ParaView discussion is moving! Please visit https://discourse.paraview.org/ for future posts. 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 Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: https://public.kitware.com/mailman/listinfo/paraview -- Cory Quammen Staff R&D Engineer Kitware, Inc. ___ Powered by www.kitware.com ParaView discussion is moving! Please visit https://discourse.paraview.org/ for future posts. 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 Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: https://public.kitware.com/mailman/listinfo/paraview
Re: [Paraview] Fw: How do we get the indexes and IDs from the extracted selections to be seen in the Trace?
Hi Sarah, I'm afraid that selections are not currently well supported in Python. Because of that, they are not recorded in Python traces. It is on our todo list to provide a real Python API for selections in one of the next ParaView releases. Best regards, Cory On Wed, Jun 6, 2018 at 9:17 AM Sarah Flaherty wrote: > Paraview, > > I am trying to have the index of the points that are selected and > extracted displayed in the trace. They are seen in the Properties Bar on > the right when the ExtractSelection1 is active, however they are not seen > in the trace. How do I get this information into python script or the trace? > Thank you, > Sarah Flaherty > ___ > Powered by www.kitware.com > > ParaView discussion is moving! Please visit > https://discourse.paraview.org/ for future posts. > > 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 > > Search the list archives at: http://markmail.org/search/?q=ParaView > > Follow this link to subscribe/unsubscribe: > https://public.kitware.com/mailman/listinfo/paraview > -- Cory Quammen Staff R&D Engineer Kitware, Inc. ___ Powered by www.kitware.com ParaView discussion is moving! Please visit https://discourse.paraview.org/ for future posts. 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 Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: https://public.kitware.com/mailman/listinfo/paraview
[Paraview] Fw: How do we get the indexes and IDs from the extracted selections to be seen in the Trace?
Paraview, I am trying to have the index of the points that are selected and extracted displayed in the trace. They are seen in the Properties Bar on the right when the ExtractSelection1 is active, however they are not seen in the trace. How do I get this information into python script or the trace? Thank you, Sarah Flaherty ___ Powered by www.kitware.com ParaView discussion is moving! Please visit https://discourse.paraview.org/ for future posts. 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 Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: https://public.kitware.com/mailman/listinfo/paraview