iblatlas.atlas

Classes for manipulating brain atlases, insertions, and coordinates.

Module attributes

ALLEN_CCF_LANDMARKS_MLAPDV_UM

The ML AP DV voxel coordinates of brain landmarks in the Allen atlas.

PAXINOS_CCF_LANDMARKS_MLAPDV_UM

The ML AP DV voxel coordinates of brain landmarks in the Franklin & Paxinos atlas.

S3_BUCKET_IBL

The name of the public IBL S3 bucket containing atlas data.

Functions

MRITorontoAtlas

The MRI Toronto brain atlas.

NeedlesAtlas

Instantiates an atlas.BrainAtlas corresponding to the Allen CCF at the given resolution using the IBL Bregma and coordinate system.

cart2sph

Converts cartesian to spherical coordinates.

sph2cart

Converts Spherical to Cartesian coordinates.

Classes

AllenAtlas

The Allan Common Coordinate Framework (CCF) brain atlas.

BrainAtlas

Objects that holds image, labels and coordinate transforms for a brain Atlas.

BrainCoordinates

Class for mapping and indexing a 3D array to real-world coordinates.

FranklinPaxinosAtlas

pathlib.PurePosixPath: The default relative path of the atlas file.

Insertion

Defines an ephys probe insertion in 3D coordinate.

Trajectory

3D Trajectory (usually for a linear probe), minimally defined by a vector and a point.

ALLEN_CCF_LANDMARKS_MLAPDV_UM = {'bregma': array([5739, 5400,  332])}

The ML AP DV voxel coordinates of brain landmarks in the Allen atlas.

Type:

dict

PAXINOS_CCF_LANDMARKS_MLAPDV_UM = {'bregma': array([5700, 4460,  330])}

The ML AP DV voxel coordinates of brain landmarks in the Franklin & Paxinos atlas.

Type:

dict

S3_BUCKET_IBL = 'ibl-brain-wide-map-public'

The name of the public IBL S3 bucket containing atlas data.

Type:

str

cart2sph(x, y, z)[source]

Converts cartesian to spherical coordinates.

Returns spherical coordinates (r, theta, phi).

Parameters:
  • x (numpy.array) – A 1D array of x-axis coordinates.

  • y (numpy.array) – A 1D array of y-axis coordinates.

  • z (numpy.array) – A 1D array of z-axis coordinates.

Returns:

  • numpy.array – The radial distance of each point.

  • numpy.array – The polar angle.

  • numpy.array – The azimuthal angle.

See also

sph2cart

sph2cart(r, theta, phi)[source]

Converts Spherical to Cartesian coordinates.

Returns Cartesian coordinates (x, y, z).

Parameters:
  • r (numpy.array) – A 1D array of radial distances.

  • theta (numpy.array) – A 1D array of polar angles.

  • phi (numpy.array) – A 1D array of azimuthal angles.

Returns:

  • x (numpy.array) – A 1D array of x-axis coordinates.

  • y (numpy.array) – A 1D array of y-axis coordinates.

  • z (numpy.array) – A 1D array of z-axis coordinates.

See also

cart2sph

class BrainCoordinates(nxyz, xyz0=(0, 0, 0), dxyz=(1, 1, 1))[source]

Bases: object

Class for mapping and indexing a 3D array to real-world coordinates.

  • x = ml, right positive

  • y = ap, anterior positive

  • z = dv, dorsal positive

The layout of the Atlas dimension is done according to the most used sections so they lay contiguous on disk assuming C-ordering: V[iap, iml, idv]

Parameters:
  • nxyz (array_like) – Number of elements along each Cartesian axis (nx, ny, nz) = (nml, nap, ndv).

  • xyz0 (array_like) – Coordinates of the element volume[0, 0, 0] in the coordinate space.

  • dxyz (array_like, float) – Spatial interval of the volume along the 3 dimensions.

xyz0

The Cartesian coordinates of the element volume[0, 0, 0], i.e. the origin.

Type:

numpy.array

x0

The x-axis origin coordinate of the element volume.

Type:

int

y0

The y-axis origin coordinate of the element volume.

Type:

int

z0

The z-axis origin coordinate of the element volume.

Type:

int

property dxyz

Spatial interval of the volume along the 3 dimensions.

Type:

numpy.array

property nxyz

Coordinates of the element volume[0, 0, 0] in the coordinate space.

Type:

numpy.array

x2i(x, round=True, mode='raise')[source]

Find the nearest volume image index to a given x-axis coordinate.

Parameters:
  • x (float, numpy.array) – One or more x-axis coordinates, relative to the origin, x0.

  • round (bool) – If true, round to the nearest index, replacing NaN values with 0.

  • mode ({'raise', 'clip', 'wrap'}, default='raise') – How to behave if the coordinate lies outside of the volume: raise (default) will raise a ValueError; ‘clip’ will replace the index with the closest index inside the volume; ‘wrap’ will return the index as is.

Returns:

The nearest indices of the image volume along the first dimension.

Return type:

numpy.array

Raises:

ValueError – At least one x value lies outside of the atlas volume. Change ‘mode’ input to ‘wrap’ to keep these values unchanged, or ‘clip’ to return the nearest valid indices.

y2i(y, round=True, mode='raise')[source]

Find the nearest volume image index to a given y-axis coordinate.

Parameters:
  • y (float, numpy.array) – One or more y-axis coordinates, relative to the origin, y0.

  • round (bool) – If true, round to the nearest index, replacing NaN values with 0.

  • mode ({'raise', 'clip', 'wrap'}) – How to behave if the coordinate lies outside of the volume: raise (default) will raise a ValueError; ‘clip’ will replace the index with the closest index inside the volume; ‘wrap’ will return the index as is.

Returns:

The nearest indices of the image volume along the second dimension.

Return type:

numpy.array

Raises:

ValueError – At least one y value lies outside of the atlas volume. Change ‘mode’ input to ‘wrap’ to keep these values unchanged, or ‘clip’ to return the nearest valid indices.

z2i(z, round=True, mode='raise')[source]

Find the nearest volume image index to a given z-axis coordinate.

Parameters:
  • z (float, numpy.array) – One or more z-axis coordinates, relative to the origin, z0.

  • round (bool) – If true, round to the nearest index, replacing NaN values with 0.

  • mode ({'raise', 'clip', 'wrap'}) – How to behave if the coordinate lies outside of the volume: raise (default) will raise a ValueError; ‘clip’ will replace the index with the closest index inside the volume; ‘wrap’ will return the index as is.

Returns:

The nearest indices of the image volume along the third dimension.

Return type:

numpy.array

Raises:

ValueError – At least one z value lies outside of the atlas volume. Change ‘mode’ input to ‘wrap’ to keep these values unchanged, or ‘clip’ to return the nearest valid indices.

xyz2i(xyz, round=True, mode='raise')[source]

Find the nearest volume image indices to the given Cartesian coordinates.

Parameters:
  • xyz (array_like) – One or more Cartesian coordinates, relative to the origin, xyz0.

  • round (bool) – If true, round to the nearest index, replacing NaN values with 0.

  • mode ({'raise', 'clip', 'wrap'}) – How to behave if any coordinate lies outside of the volume: raise (default) will raise a ValueError; ‘clip’ will replace the index with the closest index inside the volume; ‘wrap’ will return the index as is.

Returns:

The nearest indices of the image volume.

Return type:

numpy.array

Raises:

ValueError – At least one coordinate lies outside of the atlas volume. Change ‘mode’ input to ‘wrap’ to keep these values unchanged, or ‘clip’ to return the nearest valid indices.

i2x(ind)[source]

Return the x-axis coordinate of a given index.

Parameters:

ind (int, numpy.array) – One or more indices along the first dimension of the image volume.

Returns:

The corresponding x-axis coordinate(s), relative to the origin, x0.

Return type:

float, numpy.array

i2y(ind)[source]

Return the y-axis coordinate of a given index.

Parameters:

ind (int, numpy.array) – One or more indices along the second dimension of the image volume.

Returns:

The corresponding y-axis coordinate(s), relative to the origin, y0.

Return type:

float, numpy.array

i2z(ind)[source]

Return the z-axis coordinate of a given index.

Parameters:

ind (int, numpy.array) – One or more indices along the third dimension of the image volume.

Returns:

The corresponding z-axis coordinate(s), relative to the origin, z0.

Return type:

float, numpy.array

i2xyz(iii)[source]

Return the Cartesian coordinates of a given index.

Parameters:

iii (array_like) – One or more image volume indices.

Returns:

The corresponding xyz coordinates, relative to the origin, xyz0.

Return type:

numpy.array

property xlim
property ylim
property zlim
lim(axis)[source]
property xscale
property yscale
property zscale
property mgrid
class BrainAtlas(image, label, dxyz, regions, iorigin=[0, 0, 0], dims2xyz=[0, 1, 2], xyz2dims=[0, 1, 2])[source]

Bases: object

Objects that holds image, labels and coordinate transforms for a brain Atlas. Currently this is designed for the AllenCCF at several resolutions, yet this class can be used for other atlases arises.

volumes = None
image = None

A 3D annotation label volume.

Type:

numpy.array

label = None

One or several optional data volumes, the 3 last dimensions should match the image and the label volumes dimensions

Type:

numpy.array

mask()[source]

Returns a Boolean mask volume of the brain atlas, where 1 is inside the convex brain and 0 is outside This returns an ovoid volume shaped like the brain and this will contain void values in the ventricules. :return: np.array Bool (nap, nml, ndv)

compute_surface()[source]

Get the volume top, bottom, left and right surfaces, and from these the outer surface of the image volume. This is needed to compute probe insertions intersections.

NOTE: In places where the top or bottom surface touch the top or bottom of the atlas volume, the surface will be set to np.nan. If you encounter issues working with these surfaces check if this might be the cause.

get_labels(xyz, mapping=None, radius_um=None, mode='raise')[source]

Performs a 3D lookup from real world coordinates to the volume labels and return the regions ids according to the mapping

Parameters:
  • xyz – [n, 3] array of coordinates

  • mapping – brain region mapping (defaults to original Allen mapping)

  • radius_um – if not null, returns a regions ids array and an array of proportion of regions in a sphere of size radius around the coordinates.

  • mode – {‘raise’, ‘clip’} determines what to do when determined index lies outside the atlas volume

‘raise’ will raise a ValueError (default) ‘clip’ will replace the index with the closest index inside the volume :return: n array of region ids

tilted_slice(xyz, axis, volume='image')[source]

From line coordinates, extracts the tilted plane containing the line from the 3D volume

Parameters:

xyz – np.array: points defining a probe trajectory in 3D space (xyz triplets)

if more than 2 points are provided will take the best fit :param axis:

0: along ml = sagittal-slice 1: along ap = coronal-slice 2: along dv = horizontal-slice

Parameters:

volume – ‘image’ or ‘annotation’

Returns:

np.array, abscissa extent (width), ordinate extent (height),

squeezed axis extent (depth)

plot_tilted_slice(xyz, axis, volume='image', cmap=None, ax=None, return_sec=False, **kwargs)[source]

From line coordinates, extracts the tilted plane containing the line from the 3D volume

Parameters:

xyz – np.array: points defining a probe trajectory in 3D space (xyz triplets)

if more than 2 points are provided will take the best fit :param axis:

0: along ml = sagittal-slice 1: along ap = coronal-slice 2: along dv = horizontal-slice

Parameters:

volume – ‘image’ or ‘annotation’

Returns:

matplotlib axis

extent(axis)[source]
Parameters:

axis – direction along which the volume is stacked: (2 = z for horizontal slice) (1 = y for coronal slice) (0 = x for sagittal slice)

Returns:

slice(coordinate, axis, volume='image', mode='raise', region_values=None, mapping=None, bc=None)[source]

Get slice through atlas

Parameters:
  • coordinate – coordinate to slice in metres, float

  • axis – xyz convention: 0 for ml, 1 for ap, 2 for dv - 0: sagittal slice (along ml axis) - 1: coronal slice (along ap axis) - 2: horizontal slice (along dv axis)

  • volume

    • ‘image’ - allen image volume

    • ’annotation’ - allen annotation volume

    • ’surface’ - outer surface of mesh

    • ’boundary’ - outline of boundaries between all regions

    • ’volume’ - custom volume, must pass in volume of shape ba.image.shape as regions_value argument

    • ’value’ - custom value per allen region, must pass in array of shape ba.regions.id as regions_value argument

  • mode – error mode for out of bounds coordinates - ‘raise’ raise an error - ‘clip’ gets the first or last index

  • region_values – custom values to plot - if volume=’volume’, region_values must have shape ba.image.shape - if volume=’value’, region_values must have shape ba.regions.id

  • mapping – mapping to use. Options can be found using ba.regions.mappings.keys()

Returns:

2d array or 3d RGB numpy int8 array of dimensions: - 0: nap x ndv (sagittal slice) - 1: nml x ndv (coronal slice) - 2: nap x nml (horizontal slice)

compute_boundaries(values)[source]

Compute the boundaries between regions on slice

Parameters:

values

Returns:

plot_slices(xyz, *args, **kwargs)[source]

From a single coordinate, plots the 3 slices that intersect at this point in a single matplotlib figure

Parameters:
  • xyz – mlapdv coordinate in m

  • args – arguments to be forwarded to plot slices

  • kwargs – keyword arguments to be forwarded to plot slices

Returns:

2 by 2 array of axes

plot_cslice(ap_coordinate, volume='image', mapping=None, region_values=None, **kwargs)[source]

Plot coronal slice through atlas at given ap_coordinate

Param:

ap_coordinate (m)

Parameters:
  • volume

    • ‘image’ - allen image volume

    • ’annotation’ - allen annotation volume

    • ’surface’ - outer surface of mesh

    • ’boundary’ - outline of boundaries between all regions

    • ’volume’ - custom volume, must pass in volume of shape ba.image.shape as regions_value argument

    • ’value’ - custom value per allen region, must pass in array of shape ba.regions.id as regions_value argument

  • mapping – mapping to use. Options can be found using ba.regions.mappings.keys()

  • region_values – custom values to plot - if volume=’volume’, region_values must have shape ba.image.shape - if volume=’value’, region_values must have shape ba.regions.id

  • mapping – mapping to use. Options can be found using ba.regions.mappings.keys()

  • **kwargs

    matplotlib.pyplot.imshow kwarg arguments

Returns:

matplotlib ax object

plot_hslice(dv_coordinate, volume='image', mapping=None, region_values=None, **kwargs)[source]

Plot horizontal slice through atlas at given dv_coordinate

Param:

dv_coordinate (m)

Parameters:
  • volume

    • ‘image’ - allen image volume

    • ’annotation’ - allen annotation volume

    • ’surface’ - outer surface of mesh

    • ’boundary’ - outline of boundaries between all regions

    • ’volume’ - custom volume, must pass in volume of shape ba.image.shape as regions_value argument

    • ’value’ - custom value per allen region, must pass in array of shape ba.regions.id as regions_value argument

  • mapping – mapping to use. Options can be found using ba.regions.mappings.keys()

  • region_values – custom values to plot - if volume=’volume’, region_values must have shape ba.image.shape - if volume=’value’, region_values must have shape ba.regions.id

  • mapping – mapping to use. Options can be found using ba.regions.mappings.keys()

  • **kwargs

    matplotlib.pyplot.imshow kwarg arguments

Returns:

matplotlib ax object

plot_sslice(ml_coordinate, volume='image', mapping=None, region_values=None, **kwargs)[source]

Plot sagittal slice through atlas at given ml_coordinate

Param:

ml_coordinate (m)

Parameters:
  • volume

    • ‘image’ - allen image volume

    • ’annotation’ - allen annotation volume

    • ’surface’ - outer surface of mesh

    • ’boundary’ - outline of boundaries between all regions

    • ’volume’ - custom volume, must pass in volume of shape ba.image.shape as regions_value argument

    • ’value’ - custom value per allen region, must pass in array of shape ba.regions.id as regions_value argument

  • mapping – mapping to use. Options can be found using ba.regions.mappings.keys()

  • region_values – custom values to plot - if volume=’volume’, region_values must have shape ba.image.shape - if volume=’value’, region_values must have shape ba.regions.id

  • mapping – mapping to use. Options can be found using ba.regions.mappings.keys()

  • **kwargs

    matplotlib.pyplot.imshow kwarg arguments

Returns:

matplotlib ax object

plot_top(volume='annotation', mapping=None, region_values=None, ax=None, **kwargs)[source]

Plot top view of atlas

Parameters:
  • volume

    • ‘image’ - allen image volume

    • ’annotation’ - allen annotation volume

    • ’boundary’ - outline of boundaries between all regions

    • ’volume’ - custom volume, must pass in volume of shape ba.image.shape as regions_value argument

    • ’value’ - custom value per allen region, must pass in array of shape ba.regions.id as regions_value argument

  • mapping – mapping to use. Options can be found using ba.regions.mappings.keys()

  • region_values

  • ax

  • kwargs

Returns:

class Trajectory(vector: ndarray, point: ndarray)[source]

Bases: object

3D Trajectory (usually for a linear probe), minimally defined by a vector and a point.

Examples

Instantiate from a best fit from an n by 3 array containing xyz coordinates:

>>> trj = Trajectory.fit(xyz)
vector: ndarray
point: ndarray
static fit(xyz)[source]

Fits a line to a 3D cloud of points.

Parameters:

xyz (numpy.array) – An n by 3 array containing a cloud of points to fit a line to.

Returns:

A new trajectory object.

Return type:

Trajectory

eval_x(x)[source]

given an array of x coordinates, returns the xyz array of coordinates along the insertion

Parameters:

x – n by 1 or numpy array containing x-coordinates

Returns:

n by 3 numpy array containing xyz-coordinates

eval_y(y)[source]

given an array of y coordinates, returns the xyz array of coordinates along the insertion

Parameters:

y – n by 1 or numpy array containing y-coordinates

Returns:

n by 3 numpy array containing xyz-coordinates

eval_z(z)[source]

given an array of z coordinates, returns the xyz array of coordinates along the insertion

Parameters:

z – n by 1 or numpy array containing z-coordinates

Returns:

n by 3 numpy array containing xyz-coordinates

project(point)[source]

projects a point onto the trajectory line

Parameters:

point – np.array(x, y, z) coordinates

Returns:

mindist(xyz, bounds=None)[source]

Computes the minimum distance to the trajectory line for one or a set of points. If bounds are provided, computes the minimum distance to the segment instead of an infinite line.

Parameters:
  • xyz – […, 3]

  • bounds – defaults to None. np.array [2, 3]: segment boundaries, inf line if None

Returns:

minimum distance […]

exit_points(bc)[source]

Given a Trajectory and a BrainCoordinates object, computes the intersection of the trajectory with the brain coordinates bounding box

Parameters:

bc – BrainCoordinate objects

Returns:

np.ndarray 2 y 3 corresponding to exit points xyz coordinates

class Insertion(x: float, y: float, z: float, phi: float, theta: float, depth: float, label: str = '', beta: float = 0)[source]

Bases: object

Defines an ephys probe insertion in 3D coordinate. IBL conventions.

To instantiate, use the static methods: Insertion.from_track and Insertion.from_dict.

x: float
y: float
z: float
phi: float
theta: float
depth: float
label: str = ''
beta: float = 0
static from_track(xyzs, brain_atlas=None)[source]

Define an insersion from one or more trajectory.

Parameters:
  • xyzs (numpy.array) – An n by 3 array xyz coordinates representing an insertion trajectory.

  • brain_atlas (BrainAtlas) – A brain atlas instance, used to attain the point of entry.

Return type:

Insertion

static from_dict(d, brain_atlas=None)[source]

Constructs an Insertion object from the json information stored in probes.description file.

Parameters:
  • d (dict) – A dictionary containing at least the following keys {‘x’, ‘y’, ‘z’, ‘phi’, ‘theta’, ‘depth’}. The depth and xyz coordinates must be in um.

  • brain_atlas (BrainAtlas, default=None) – If provided, disregards the z coordinate and locks the insertion point to the z of the brain surface.

Return type:

Insertion

Examples

>>> tri = {'x': 544.0, 'y': 1285.0, 'z': 0.0, 'phi': 0.0, 'theta': 5.0, 'depth': 4501.0}
>>> ins = Insertion.from_dict(tri)
property trajectory

Gets the trajectory object matching insertion coordinates :return: atlas.Trajectory

property xyz
property entry
property tip
static get_brain_exit(traj, brain_atlas, mode='raise')[source]

Given a Trajectory and a BrainAtlas object, computes the brain exit coordinate as the intersection of the trajectory and the brain surface (brain_atlas.surface)

Parameters:

brain_atlas

Returns:

3 element array x,y,z

static get_brain_entry(traj, brain_atlas, mode='raise')[source]

Given a Trajectory and a BrainAtlas object, computes the brain entry coordinate as the intersection of the trajectory and the brain surface (brain_atlas.surface)

Parameters:

brain_atlas

Returns:

3 element array x,y,z

class AllenAtlas(res_um=25, scaling=(1, 1, 1), mock=False, hist_path=None)[source]

Bases: BrainAtlas

The Allan Common Coordinate Framework (CCF) brain atlas.

Instantiates an atlas.BrainAtlas corresponding to the Allen CCF at the given resolution using the IBL Bregma and coordinate system.

atlas_rel_path = PurePosixPath('histology/ATLAS/Needles/Allen')

A diffusion weighted imaging (DWI) image volume.

This average template brain was created from images of 1,675 young adult C57BL/6J mouse brains acquired using serial two-photon tomography. This volume has a C-ordered shape of (ap, ml, dv) and contains uint16 values.

Type:

numpy.array

image = None

An annotation label volume.

The Allen atlas label volume has with the shape (ap, ml, dv) and contains uint16 indices of the Allen CCF brain regions to which each voxel belongs.

Type:

numpy.array

label = None

One or several optional data volumes, the 3 last dimensions should match the image and the label volumes dimensions

Type:

numpy.array

xyz2ccf(xyz, ccf_order='mlapdv', mode='raise')[source]

Converts anatomical coordinates to CCF coordinates.

Anatomical coordinates are in meters, relative to bregma, which CFF coordinates are assumed to be the volume indices multiplied by the spacing in micormeters.

Parameters:
  • xyz (numpy.array) – An N by 3 array of anatomical coordinates in meters, relative to bregma.

  • ccf_order ({'mlapdv', 'apdvml'}, default='mlapdv') – The order of the CCF coordinates returned. For IBL (the default) this is (ML, AP, DV), for Allen MCC vertices, this is (AP, DV, ML).

  • mode ({'raise', 'clip', 'wrap'}, default='raise') – How to behave if the coordinate lies outside of the volume: raise (default) will raise a ValueError; ‘clip’ will replace the index with the closest index inside the volume; ‘wrap’ will return the index as is.

Returns:

  • numpy.array – Coordinates in CCF space (um, origin is the front left top corner of the data

  • volume, order determined by ccf_order

ccf2xyz(ccf, ccf_order='mlapdv')[source]

Convert anatomical coordinates from CCF coordinates.

Anatomical coordinates are in meters, relative to bregma, which CFF coordinates are assumed to be the volume indices multiplied by the spacing in micormeters.

Parameters:
  • ccf (numpy.array) – An N by 3 array of coordinates in CCF space (atlas volume indices * um resolution). The origin is the front left top corner of the data volume.

  • ccf_order ({'mlapdv', 'apdvml'}, default='mlapdv') – The order of the CCF coordinates given. For IBL (the default) this is (ML, AP, DV), for Allen MCC vertices, this is (AP, DV, ML).

Returns:

The MLAPDV coordinates in meters, relative to bregma.

Return type:

numpy.array

compute_regions_volume(cumsum=False)[source]

Sums the number of voxels in the labels volume for each region. Then compute volumes for all of the levels of hierarchy in cubic mm.

Param:

cumsum: computes the cumulative sum of the volume as per the hierarchy (defaults to False)

Returns:

NeedlesAtlas(*args, **kwargs)[source]

Instantiates an atlas.BrainAtlas corresponding to the Allen CCF at the given resolution using the IBL Bregma and coordinate system. The Needles atlas defines a stretch along AP axis and a squeeze along the DV axis.

Parameters:
  • res_um ({10, 25, 50} int) – The Atlas resolution in micrometres; one of 10, 25 or 50um.

  • **kwargs – See AllenAtlas.

Returns:

An Allen atlas object with MRI atlas scaling applied.

Return type:

AllenAtlas

Notes

The scaling was determined by manually transforming the DSURQE atlas [1]_ onto the Allen CCF. The DSURQE atlas is an MRI atlas acquired from 40 C57BL/6J mice post-mortem, with 40um isometric resolution. The alignment was performed by Mayo Faulkner. The atlas data can be found here. More information on the dataset and segmentation can be found here.

References

MRITorontoAtlas(*args, **kwargs)[source]

The MRI Toronto brain atlas.

Instantiates an atlas.BrainAtlas corresponding to the Allen CCF at the given resolution using the IBL Bregma and coordinate system. The MRI Toronto atlas defines a stretch along AP a squeeze along DV and a squeeze along ML. These are based on 12 p65 mice MRIs averaged [1]_.

Parameters:
  • res_um ({10, 25, 50} int) – The Atlas resolution in micrometres; one of 10, 25 or 50um.

  • **kwargs – See AllenAtlas.

Returns:

An Allen atlas object with MRI atlas scaling applied.

Return type:

AllenAtlas

References

class FranklinPaxinosAtlas(res_um=(10, 100, 10), scaling=(1, 1, 1), mock=False, hist_path=None)[source]

Bases: BrainAtlas

pathlib.PurePosixPath: The default relative path of the atlas file.

atlas_rel_path = PurePosixPath('histology/ATLAS/Needles/FranklinPaxinos')