pymaid.CatmaidNeuron.prune_by_volume¶
- CatmaidNeuron.prune_by_volume(v: Volume | List[Volume] | Dict[str, Volume], mode: Literal['IN'] | Literal['OUT'] = 'IN', prevent_fragments: bool = False, inplace: bool = False) TreeNeuron | None ¶
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.
See also
in_volume()
Base function. See for details and examples.