oursin.atlas.ontology

Classes

Atlas

CustomAtlas

Structure

Structure attributes can be accessed as

class CustomAtlas(atlas_name, atlas_dimensions, atlas_resolution)[source]

Bases: object

class Atlas(atlas_name)[source]

Bases: object

load()[source]

Load this atlas

clear()[source]

Clear all visible areas

load_defaults()[source]

Load the left and right areas

Note that this function is not stateful, if you save the scene it will not be reloaded.

set_reference_coord(reference_coord)[source]

Set the reference coordinate for the atlas (Bregma by default)

Parameters

reference_coord : list of float

get_areas(area_list)[source]

Get the area objects given a list of area acronyms

Parameters

area_listlist of string

List of acronyms to get objects for

Returns

list of Structure

Examples

>>> area_list = urchin.get_areas(["root", "VISp"])
set_visibilities(area_list, area_visibility, side=Side.FULL, push=True)[source]

Set visibility of multiple areas at once

Parameters

area_list : list of Structure area_visibility : list of bool sided : string, optional

Brain area side to load, default = FULL

Examples

>>> urchin.ccf25.set_visibilities(urchin.ccf25.get_areas(["root", "VISp"]), [True, False])
>>> urchin.ccf25.set_visibilities(urchin.ccf25.get_areas(["root", "VISp"]), True)
set_colors(area_list, area_colors, push=True)[source]

Set color of multiple areas at once.

Parameters

area_list : list of Structure area_colors : list of colors (hex string or RGB triplet)

Examples

>>> urchin.ccf25.set_visibilities(urchin.ccf25.get_areas(["root", "VISp"]), ['#ff0000', '#00ff00'])
>>> urchin.ccf25.set_visibilities(urchin.ccf25.get_areas(["root", "VISp"]), [255, 255, 255])
set_colormap(colormap_name, min=0, max=1)[source]

Set colormap used for mapping area intensity values to colors

Options are - cool (default, teal 0 -> magenta 1) - grey (black 0 -> white 1) - grey-green (grey 0, light 1/255 -> dark 1) - grey-purple (grey 0, light 1/255 -> dark 1) - grey-red (grey 0, light 1/255 -> dark 1) - grey-rainbow (grey 0, rainbow colors from 1/255 -> 1)

Parameters

colormap_namestring

colormap name

set_color_intensity(area_list, area_intensities, push=True)[source]

Set intensity values, colors will be set according to the active colormap

Parameters

area_intensitieslist of float

0->1

Examples

>>> urchin.ccf25.set_color_intensity(urchin.ccf25.get_areas(["root", "VISp"]), [0, 1])
set_alphas(area_list, area_alphas, push=True)[source]

Set alpha values, without changing colors

Parameters

area_list : list of Structure area_alphas : list of float

set_materials(area_list, area_materials, push=True)[source]

Set material of multiple areas at once.

Material options are - ‘opaque-lit’ or ‘default’ - ‘opaque-unlit’ - ‘transparent-lit’ - ‘transparent-unlit’

Parameters

area_colorsdict {string: string}

Keys are area IDs or acronyms, Values are hex colors

Examples

>>> urchin.ccf25.set_materials(urchin.ccf25.get_areas(["root", "VISp"]), ['transparent-lit', 'opaque-lit'])
>>> urchin.ccf25.set_materials(urchin.ccf25.get_areas(["root", "VISp"]), ['transparent-lit])
class Structure(data, index, update_callback)[source]

Bases: object

Structure attributes can be accessed as

>>> structure.name
>>> structure.acronym
>>> structure.id
>>> structure.rgb_triplet
>>> structure.path
set_visibility(visibility, side=Side.FULL, push=True)[source]

Set area visibility

Parameters

visibility : bool side : utils.Side, optional

.FULL, .LEFT, or .RIGHT

Examples

>>> urchin.ccf25.root.set_visibility(True)
>>> urchin.ccf25.root.set_visibility(True, urchin.utils.Side.LEFT)
set_color(color, push=True)[source]

Set area color.

Parameters

color : hex string

Examples

>>> urchin.ccf25.root.set_color('#ff0000')
>>> urchin.ccf25.root.set_color([255, 0, 0], "left")
set_alpha(alpha, push=True)[source]

Set area transparency.

Parameters

alpha: float

Examples

>>> urchin.ccf25.root.set_alpha(0.5)
set_intensity(intensity, push=True)[source]

Set color based on the intensity value through the active colormap.

Parameters

intensityfloat

0->1

Examples

>>> urn.set_intensity(0.5)
set_material(material, push=True)[source]

Set material.

Material options are - ‘opaque-lit’ or ‘default’ - ‘opaque-unlit’ - ‘transparent-lit’ - ‘transparent-unlit’

Parameters

material: string

Examples

>>> urchin.ccf25.root.set_material('transparent-lit')