[Paraview] ExtractSelection loses selection order

David E DeMarle dave.demarle at kitware.com
Wed Jan 20 09:58:33 EST 2010


It was not meant to be preserved. For performance reasons the
extraction filter (vtkExtractSelectedIds specifically) sorts both the
selection list and the element id array so that it can do a quick
lookup of the usually numerous entries in the selection list.

David E DeMarle
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x109



On Tue, Jan 19, 2010 at 1:37 PM, David Doria <daviddoria at gmail.com> wrote:
> On Mon, Jan 18, 2010 at 12:31 PM, David Doria <daviddoria at gmail.com> wrote:
>>
>> If I select 3 points and then use the ExtractSelection filter, I would
>> expect the IDs of the points to be 0,1,2, in the order selected.
>> Instead, they are 2, 0, 1.
>>
>> Is there any way to prevent this? I am trying to set corresponding
>> landmarks, so the order is important, and it is being lost.
>>
>> Thanks,
>>
>> David
>
> Here is a demo of the problem:
>
> http://www.rpi.edu/~doriad/Paraview_List/ExtractSelection/
>
> points.vtp contains 10 points, (0-9). I selected points 9, 8, 7, in that
> order and extracted the selection. The result (extracted.vtp) has the 3
> extracted points (corresponding to 9,8,7) ordered 2, 1, 0, rather than 0, 1,
> 2, which was the selection order.
>
> Is this a bug or was the ordered never intended to be preserved?
>
> Thanks,
>
> David
>
> _______________________________________________
> 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