sorted/unsorted data array selection

In my plugin I’ve been using the following type of logic

void addNames(vtkDataArraySelection* select)

When presented with these values in ParaView (5.6), the order is sorted. In previous versions, the order corresponded to the insertion order.

Looked at the vtkDataArraySelection doxygen, but can’t see anything indicating sort vs non-sort. There were a few (very good) changes to vtkDataArraySelection, but nothing that would seem to affect this. Is there anything within the ParaView interface to vtkDataArraySelection that could explain this?


1 Like

I encountered a similar Problem with my/our custom reader. Did you figure out the cause of the behavior yet?

Regards, Stephan

Yes, ParaView sorts arrays by the name. The sorting happens in vtkPVDataSetAttributesInformation since it builds a map to store information about arrays.

Thanks for the response.
Is this newly introduced in Vesrion 5.6? Before that, (5.4.1, 5.5.0) there was no sorting of the Attributes-Information.

Is there any workaround to supress the behavior?

Is this newly introduced in Vesrion 5.6?


Is there any workaround to supress the behavior?

alas, no.

Ok, that is good to know.
We ran into some issues with the internal sorting of the data in our custom reader, that we already resolved.

Previously, we sorted the data internally to show the most important variables first and the others afterwards in alphabetical order. Unfortunately, this does not seem to be possible anymore.

Do you know in which part of the code the sorting is happening? As we need to compile paraview from source (to compile our read), we would have the option to modify the part of the code to not sort the array. Would that be feasible?

I also tried different things, but to no avail.

As mentioned earlier, vtkPVDataSetAttributesInformation is the key. It’s using a map which sorts the arrays by name.