AllenInstitute / neuron_morphology

Tools for working with single-neuron morphological reconstructions
https://neuron-morphology.readthedocs.io/en/latest/
Other
19 stars 8 forks source link

enable absolute depth measurements by saving path length #188

Open tmchartrand opened 3 years ago

tmchartrand commented 3 years ago

Describe the use case that is addressed by this feature. The functionality in the layered_point_depths module is currently narrowly oriented towards aligning depths onto a reference layer boundary template using normalized depth measurements. Some of the methods could also be useful for other depth-related calculations, like absolute depth (full depth or in layer), but they need some tweaks to enable this.

Describe the solution you'd like A minimal set of changes would be to have the step_from_node function also return the length of the path traveled to an intersection. This enables user code to make some of the depth calculations without duplicating too much code.

In the long run, it may also be worth incorporating methods that compile the absolute depth info (similar to get_node_intersections), but that can remain user code for now.

Describe alternatives you've considered

Additional context A full working demonstration of this functionality also requires some fixes to the snap_polygons modules, which I'll file separately.

Do you want to work on this issue? Yes, will submit PR shortly.