navis.TreeNeuron.prune_by_volume¶
- TreeNeuron.prune_by_volume(v, mode='IN', prevent_fragments=False, inplace=False)[source]¶
Prune neuron by intersection with given volume(s).
- Parameters:
v (str | navis.Volume | list of either) – Volume(s) to check for intersection
mode ('IN' | 'OUT', optional) – If ‘IN’, parts of the neuron inside the volume are kept.
prevent_fragments (bool, optional) – If True, will add nodes to
subset
required to keep neuron from fragmenting.inplace (bool, optional) – If True, operation will be performed on itself. If False, operation is performed on copy which is then returned.
- Return type:
Optional
[TreeNeuron
]
See also
in_volume()
Base function. See for details and examples.