Find point in vtkappendpolydata

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Find point in vtkappendpolydata

Doug Hoppes

Hi all,

 

                Quick question that I can’t seem to find the answer for.  I have a vtkappendpolydata that contains 200 input connections  and 1000 points per connection.  I was able to use the vtkpointlocator to locate my point quickly but I need the input connection and the point index within that connection. 

 

                Is there a fast search of a vtkappendpolydata to get me this information?

 

Dougie


_______________________________________________
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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Find point in vtkappendpolydata

Cory Quammen-2
On Fri, Jun 22, 2018 at 10:32 AM Doug Hoppes <[hidden email]> wrote:

Hi all,

 

                Quick question that I can’t seem to find the answer for.  I have a vtkappendpolydata that contains 200 input connections  and 1000 points per connection.  I was able to use the vtkpointlocator to locate my point quickly but I need the input connection and the point index within that connection. 

 

                Is there a fast search of a vtkappendpolydata to get me this information?


Nothing in VTK will give you that, I'm afraid, but with some bookkeeping it shouldn't be too hard. The output of vtkAppendPolyData should have the points appended in the order the inputs are added to it. With that in mind, you could make a map say, the from upper index of that input's points in the append filter's output to the input itself. Then, given the id of the point in the output, you can get use the map to get the input, and do some subtraction to get the id in the input. I've likely missed some details, but that should get you going in the right direction.

HTH,
Cory
 

 

Dougie

_______________________________________________
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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtkusers


--
Cory Quammen
Staff R&D Engineer
Kitware, Inc.

_______________________________________________
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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: Find point in vtkappendpolydata

Bill Lorensen
I have not tried this but you could store the input connection and
point index in the PointData for each input. Then when the point
locator returns an index you can use the appended data to find the
connections and original point id.



On Fri, Jun 22, 2018 at 7:43 AM, Cory Quammen <[hidden email]> wrote:

> On Fri, Jun 22, 2018 at 10:32 AM Doug Hoppes <[hidden email]>
> wrote:
>>
>> Hi all,
>>
>>
>>
>>                 Quick question that I can’t seem to find the answer for.
>> I have a vtkappendpolydata that contains 200 input connections  and 1000
>> points per connection.  I was able to use the vtkpointlocator to locate my
>> point quickly but I need the input connection and the point index within
>> that connection.
>>
>>
>>
>>                 Is there a fast search of a vtkappendpolydata to get me
>> this information?
>
>
> Nothing in VTK will give you that, I'm afraid, but with some bookkeeping it
> shouldn't be too hard. The output of vtkAppendPolyData should have the
> points appended in the order the inputs are added to it. With that in mind,
> you could make a map say, the from upper index of that input's points in the
> append filter's output to the input itself. Then, given the id of the point
> in the output, you can get use the map to get the input, and do some
> subtraction to get the id in the input. I've likely missed some details, but
> that should get you going in the right direction.
>
> HTH,
> Cory
>
>>
>>
>>
>> Dougie
>>
>> _______________________________________________
>> 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 VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>
>> Follow this link to subscribe/unsubscribe:
>> https://public.kitware.com/mailman/listinfo/vtkusers
>
>
>
> --
> Cory Quammen
> Staff R&D Engineer
> Kitware, Inc.
>
> _______________________________________________
> 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 VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/vtkusers
>



--
Unpaid intern in BillsParadise at noware dot com
_______________________________________________
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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtkusers