base

Contents

Base

__init__ [#18]

Check the source code online
1
def __init__(self):
Copied!
  docstring:
no docstring

get_plane_at_point [#26]

Check the source code online
1
def get_plane_at_point(self, pos, norm, sx, sy, color='lightgray',
2
alpha=0.25, **kwargs):
Copied!
  docstring:
1
Returns a plane going through a point at pos, oriented
2
3
orthogonally to the vector norm and of width and height
4
5
sx, sy.
6
7
:param pos: 3-tuple or list with x,y,z, coords of point the plane goes
8
through
9
10
:param sx, sy: int, width and height of the plane
11
12
:param norm: 3-tuple or list with 3d vector the plane is orthogonal to
13
14
:param color, alpha: plane color and transparency
Copied!

get_sagittal_plane [#42]

Check the source code online
1
def get_sagittal_plane(self, pos=None, **kwargs):
Copied!
  docstring:
1
Creates a Plane actor centered at the midpoint of root (or a user
2
given locatin)
3
4
and oriented along the sagittal axis
5
6
:param pos: if not None, passe a list of 3 xyz defining the position
7
of the
8
9
point the plane goes through.
Copied!

get_horizontal_plane [#69]

Check the source code online
1
def get_horizontal_plane(self, pos=None, **kwargs):
Copied!
  docstring:
1
Creates a Plane actor centered at the midpoint of root (or a user
2
given locatin)
3
4
and oriented along the horizontal axis
5
6
:param pos: if not None, passe a list of 3 xyz defining the position
7
of the
8
9
point the plane goes through.
Copied!

get_coronal_plane [#96]

Check the source code online
1
def get_coronal_plane(self, pos=None, **kwargs):
Copied!
  docstring:
1
Creates a Plane actor centered at the midpoint of root (or a user
2
given locatin)
3
4
and oriented along the coronal axis
5
6
:param pos: if not None, passe a list of 3 xyz defining the position
7
of the
8
9
point the plane goes through.
Copied!

get_region_CenterOfMass [#124]

Check the source code online
1
def get_region_CenterOfMass(self, regions, unilateral=True,
2
hemisphere='right'):
Copied!
  docstring:
1
Get the center of mass of the 3d mesh of one or multiple brain
2
regions.
3
4
:param regions: str, list of brain regions acronyms
5
6
:param unilateral: bool, if True, the CoM is relative to one
7
hemisphere (Default value = True)
8
9
:param hemisphere: str, if unilteral=True, specifies which hemisphere
10
to use ['left' or 'right'] (Default value = "right")
11
12
:returns: coms = {list, dict} -- [if only one regions is passed, then
13
just returns the CoM coordinates for that region.
14
15
If a list is passed then a dictionary is returned. ]
Copied!

_get_structure_mesh [#167]

Check the source code online
1
def _get_structure_mesh(self, acronym, **kwargs):
Copied!
  docstring:
no docstring

get_brain_regions [#171]

Check the source code online
1
def get_brain_regions(self, brain_regions, add_labels=False,
2
colors=None, use_original_color=True, alpha=None, hemisphere=None,
3
verbose=False, **kwargs):
Copied!
  docstring:
1
Gets brain regions meshes for rendering
2
3
Many parameters can be passed to specify how the regions should be
4
rendered.
5
6
To treat a subset of the rendered regions, specify which regions are
7
VIP.
8
9
Use the kwargs to specify more detailes on how the regins should be
10
rendered (e.g. wireframe look)
11
12
:param brain_regions: str list of acronyms of brain regions
13
14
:param colors: str, color of rendered brian regions (Default value =
15
None)
16
17
:param use_original_color: bool, if True, the allen's default color
18
for the region is used. (Default value = False)
19
20
:param alpha: float, transparency of the rendered brain regions
21
(Default value = None)
22
23
:param hemisphere: str (Default value = None)
24
25
:param add_labels: bool (default False). If true a label is added to
26
each regions' actor. The label is visible when hovering the mouse over
27
the actor
28
29
:param **kwargs: used to determine a bunch of thigs, including the
30
look and location of lables from scene.add_labels
Copied!

get_structure_ancestors [#286]

Check the source code online
1
def get_structure_ancestors(self, regions, ancestors=True,
2
descendants=False):
Copied!
  docstring:
1
Get's the ancestors of the region(s) passed as arguments
2
3
:param regions: str, list of str with acronums of regions of interest
4
5
:param ancestors: if True, returns the ancestors of the region
6
(Default value = True)
7
8
:param descendants: if True, returns the descendants of the region
9
(Default value = False)
Copied!

get_structure_descendants [#328]

Check the source code online
1
def get_structure_descendants(self, regions):
Copied!
  docstring:
no docstring

get_structure_parent [#333]

Check the source code online
1
def get_structure_parent(self, acronyms):
Copied!
  docstring:
1
Gets the parent of a brain region (or list of regions) from the
2
hierarchical structure of the
3
4
Allen Brain Atals.
5
6
:param acronyms: list of acronyms of brain regions.
Copied!

get_region_unilateral [#359]

Check the source code online
1
def get_region_unilateral(self, region, hemisphere='both', color=None,
2
alpha=None):
Copied!
  docstring:
1
Regions meshes are loaded with both hemispheres' meshes by default.
2
3
This function splits them in two.
4
5
:param region: str, actors of brain region
6
7
:param hemisphere: str, which hemisphere to return ['left', 'right' or
8
'both'] (Default value = "both")
9
10
:param color: color of each side's mesh. (Default value = None)
11
12
:param alpha: transparency of each side's mesh. (Default value =
13
None)
Copied!

mirror_point_across_hemispheres [#398]

Check the source code online
1
def mirror_point_across_hemispheres(self, point):
Copied!
  docstring:
no docstring

get_colors_from_coordinates [#403]

Check the source code online
1
def get_colors_from_coordinates(self, p0):
Copied!
  docstring:
1
Given a point or a list of points returns a list of colors where
2
3
each item is the color of the brain region each point is in
Copied!
Last modified 1yr ago