iblatlas.gui.atlasview

TopView is the main Widget with the related ControllerTopView Class There are several SliceView windows (sagittal, coronal, possibly tilted etc…) that each have a SliceController object The underlying data model object is an iblatlas.atlas.AllenAtlas object

TopView(QMainWindow) ControllerTopView(PgImageController)

SliceView(QWidget) SliceController(PgImageController)

Functions

main

view

application entry point

Classes

ControllerTopView

TopView ControllerTopView

ImageLayer

Class for keeping track of image layers.

PgImageController

Abstract class that implements mapping fr`om axes to voxels for any window.

SliceController

SliceView

Window containing a volume slice

TopView

Main Window of the application.

class TopView(**kwargs)[source]

Bases: QMainWindow

Main Window of the application. This is a top view of the brain with 2 movable lines allowing to select sagittal and coronal slices.

focusInEvent(self, a0: QFocusEvent | None)[source]
closeEvent(self, a0: QCloseEvent | None)[source]
add_scatter_feature(data)[source]
add_image_layer(**kwargs)[source]
Parameters:

pg_kwargs – pyqtgraph setImage arguments: {‘levels’: None, ‘lut’: None,

‘opacity’: 1.0} :param slice_kwargs: iblatlas.atlas.slice arguments: {‘volume’: ‘image’, ‘mode’: ‘clip’} :return:

add_regions_feature(values, cmap, opacity=1.0)[source]
slider_alpha_move()[source]
mouseMoveEvent(self, a0: QMouseEvent | None)[source]
on_brain_tree_selection(rid)[source]
set_volume(volume: ndarray, colormap: str = 'magma', levels=None)[source]
class SliceView(topview: TopView, waxis, haxis, daxis, **kwargs)[source]

Bases: QWidget

Window containing a volume slice

add_scatter()[source]
add_image_layer(name=None, **kwargs)[source]
Parameters:

pg_kwargs – pyqtgraph setImage arguments: {‘levels’: None, ‘lut’: None,

‘opacity’: 1.0} :param slice_kwargs: iblatlas.atlas.slice arguments: {‘volume’: ‘image’, ‘mode’: ‘clip’} :return:

closeEvent(self, a0: QCloseEvent | None)[source]
keyPressEvent(self, a0: QKeyEvent | None)[source]
mouseClick(event)[source]
mouseMoveEvent(self, a0: QMouseEvent | None)[source]
replace_image_layer(index, **kwargs)[source]
class PgImageController(win, res=25)[source]

Bases: object

Abstract class that implements mapping fr`om axes to voxels for any window. Not instantiated directly.

cursor2xyamp(qpoint)[source]

Used for the mouse hover function over image display

cursor2ind(qpoint)[source]

image coordinates over the image display

property imageItem

returns the first image item

set_image(pg_image_item, im, dw, dh, w0, h0, **pg_kwargs)[source]
Parameters:
  • im

  • dw

  • dh

  • w0

  • h0

  • pgkwargs – og.ImageItem.setImage() parameters: level=None, lut=None, opacity=1

Returns:

set_points(x=None, y=None)[source]
class ControllerTopView(qmain: TopView, res: int = 25, volume='image', atlas=None, **kwargs)[source]

Bases: PgImageController

TopView ControllerTopView

property lines_sagittal
property lines_coronal
property lines_horizontal
property slices: dict
property figures: dict
set_slice(fig, coord=0, mapping='Allen')[source]
set_top()[source]
set_scatter(fig, coord=0)[source]
class SliceController(fig, waxis=None, haxis=None, daxis=None, wdir=1, hdir=1)[source]

Bases: PgImageController

cursor2xyamp(qpoint)[source]

Extends the superclass method to also get the brain region from the model

Parameters:

qpoint

Returns:

class ImageLayer(image_item: ~pyqtgraph.graphicsItems.ImageItem.ImageItem = <factory>, pg_kwargs: dict = <factory>, slice_kwargs: dict = <factory>)[source]

Bases: object

Class for keeping track of image layers.

:param image_item :param pg_kwargs: pyqtgraph setImage arguments: {‘levels’: None, ‘lut’: None, ‘opacity’: 1.0} :param slice_kwargs: iblatlas.atlas.slice arguments: {‘volume’: ‘image’, ‘mode’: ‘clip’} :param

image_item: ImageItem
pg_kwargs: dict
slice_kwargs: dict
view(res=25, title=None, atlas=None)[source]

application entry point

main()[source]