navis.interfaces.r.mirror_brain¶
- navis.interfaces.r.mirror_brain(x, template, mirror_axis='X', transform='warp', via=None, **kwargs)[source]¶
Mirror 3D object along given axixs.
This is a simple wrapper for
nat.templatebrains:mirror_brain
.- Parameters:
x (Neuron/List | numpy.ndarray | pandas.DataFrame) – Data to transform. Dataframe must contain
['x', 'y', 'z']
columns. Numpy array must be shape(N, 3)
.template (str) – Source template brain space that the data is in.
mirror_axis ('X' | 'Y' | 'Z', optional) – Axis to mirror.
transform ('warp' | 'affine' | 'flip', optional) – Which kind of transform to use.
via (str | None) – If a template brain (e.g. “FCWB”) is given will first transform coordinates into that space, then mirror and transform back. Use this if there is no mirror registration for the original template.
**kwargs – Keyword arguments passed to
nat.templatebrains:mirror_brain
.
- Returns:
Copy of input with transformed coordinates.
- Return type:
same type as
x