magmap.brain_globe.bg_controller module

Panel controller for BrainGlobe access

class magmap.brain_globe.bg_controller.AccessAtlasThread(brain_globe_mm, name, fn_success, fn_progress)[source]

Bases: QThread

Thread for setting up a specific access.

progress
run()[source]

Access the atlas, including download if necessary.

signal
update_prog(done, tot)[source]

Update progress bar for downloading an atlas.

Parameters:
  • done (float) – Amount completed.

  • tot (float) – Total amount for completion. 0 indicates that the done and total amounts are unknown.

class magmap.brain_globe.bg_controller.BrainGlobeCtrl(fn_set_atlases_table, fn_feedback, fn_progress, fn_opened_atlas=None)[source]

Bases: object

BrainGlobe controller.

bg_mm

BrainGlobe-MagellanMapper interface.

fn_feedback: Callable[[str], None]

Handler for outputting feedback messages.

fn_opened_atlas: Optional[Callable[[BrainGlobeAtlas], None]]

Handler for opening an atlas; defaults to None.

fn_progress: Callable[[int, str], None]

Handler for atlas download progress updates; defaults to None.

fn_set_atlases_table: Callable[[Sequence], None]

Handler for setting the atlases table.

open_atlas(name)[source]

Open atlas in a separate thread

Parameters:

name (str) – Atlas name

remove_atlas(name)[source]

Remove local copy of atlas.

Parameters:

name (str) – Atlas name.

update_atlas_table()[source]

Update the atlas table.

class magmap.brain_globe.bg_controller.SetupAtlasesThread(brain_globe_mm, fn_success, fn_progress)[source]

Bases: QThread

Thread for setting atlases by fetching the BrainGlobe atlas listing.

bg_mm: BrainGlobeMM

BrainGlobe-MagellanMapper model.

progress
run()[source]

Fetch the atlas listing.

signal
update_prog(pct, msg)[source]

Update progress bar.