Example slice view of neuralib.atlas

[1]:
import matplotlib.pyplot as plt

from neuralib.atlas.view import load_slice_view
[2]:
%load_ext autoreload
%autoreload

Example of offset view in coronal slice

[3]:
slice_index = 700
plane = load_slice_view('ccf_template', plane_type='coronal', allen_annotation_res=10).plane_at(slice_index)

fig, ax = plt.subplots(ncols=3, figsize=(20, 10))
plane.plot(ax=ax[0], with_annotation=True)
ax[0].set_title('without offset')

plane.with_angle_offset(deg_x=10, deg_y=0).plot(ax=ax[1], with_annotation=True)
ax[1].set_title('+10 degree ML offset')

plane.with_angle_offset(deg_x=0, deg_y=20).plot(ax=ax[2], with_annotation=True)
ax[2].set_title('+20 degree DV offset')
[3]:
Text(0.5, 1.0, '+20 degree DV offset')
../_images/notebooks_example_slice_view_4_1.png

Example of offset view in sagittal slice

[4]:
slice_index = 500
plane = load_slice_view('ccf_annotation', plane_type='sagittal', allen_annotation_res=10).plane_at(slice_index)

fig, ax = plt.subplots(ncols=3, figsize=(20, 10))
plane.plot(ax=ax[0], with_annotation=True)
ax[0].set_title('without offset')

plane.with_angle_offset(deg_x=10, deg_y=0).plot(ax=ax[1], with_annotation=True)
ax[1].set_title('+10 degree AP offset')

plane.with_angle_offset(deg_x=0, deg_y=20).plot(ax=ax[2], with_annotation=True)
ax[2].set_title('+20 degree DV offset')
[4]:
Text(0.5, 1.0, '+20 degree DV offset')
../_images/notebooks_example_slice_view_6_1.png