[Paraview] ExtractSelection loses selection order

David Doria daviddoria at gmail.com
Wed Jan 20 14:20:51 EST 2010


On Wed, Jan 20, 2010 at 10:03 AM, David Doria <daviddoria at gmail.com> wrote:

> On Wed, Jan 20, 2010 at 9:58 AM, David E DeMarle <dave.demarle at kitware.com
> > wrote:
>
>> 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
>> >
>>
>>
> I see. Is there any other way in Paraview I can get a list of points in the
> order I click/select them?
>
> Thanks,
>
> David
>

A hack for the time being... I selected one point at a time and extracted
it. Then I append the data sets. This makes a resulting data set of the
points which were selected in the correct order.

Thanks,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20100120/80769f1b/attachment.htm>


More information about the ParaView mailing list