Hi Xavier,
This is a weakness in the implementation of SelectNodesByMask. It returns a plain NodeCollection without any spatial metadata, so the returned NodeCollection does not represent a layer. Could you create a Github issue about this?
Finding a good solution for this is not entirely trivial. One solution would be to create a NodeCollection that contains copies of the positions of all the nodes that are selected. This is technically straightforward but for large selections, it could lead to noticeable memory overhead, at least if those collections are long-lived. Representing the selection as a collection of sliced connections can become complicated for layers with free node placement where likely each node would be a slice of its own.
We should discuss potential use cases to find out what would be the best solution.
Best,
Hans Ekkehard
--
Prof. Dr. Hans Ekkehard Plesser
Department of Data Science
Faculty of Science and Technology
Norwegian University of Life Sciences
PO Box 5003, 1432 Aas, Norway
Phone +47 6723 1560
Email hans.ekkehard.plesser@nmbu.no
Home http://arken.nmbu.no/~plesser