scanometrics.GUI.Brain3D package

Submodules

scanometrics.GUI.Brain3D.Brain3D module

class scanometrics.GUI.Brain3D.Brain3D.Brain3D(scan_dir)

Bases: QWidget

capture_and_emit_screenshot()

Capture screenshots from both hemispheres and emit them.

fill_layout(widgets_info)

Method to fill the specified layout with widgets.

Args:
widgets_info (list): List of tuples containing widget information:

(widget_name, widget, widget_style, signal_label, layout_position)

get_logps_vals(metric)
handle_sgn(value, signal_type)
reset_cam()

Reset cameras to their initial positions.

sgn

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

sync_cam()

Synchronize or unsynchronize the camera movements between the two hemispheres.

update_display(metric)

Update the 3D brain model display with the latest annotation colors.

update_region_label(region_info)
class scanometrics.GUI.Brain3D.Brain3D.ColorBar

Bases: QWidget

paintEvent(self, a0: Optional[QPaintEvent])

scanometrics.GUI.Brain3D.Hemisphere module

class scanometrics.GUI.Brain3D.Hemisphere.Hemisphere(brain_model_path, annot_file_path, init_camera)

Bases: QWidget

camera_updated

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

click(obj, event)

Handle mouse click events to select parts of the brain model.

initialize_interactor()

Initialize the interactor and add event observers.

load_annot_file()

Load the annotation file for brain region labeling and coloring.

load_brain_model()

Load the brain model from the file and add it to the renderer.

static logpval_to_color(logpval)

Map log-p-values to colors, creating a gradient similar to the provided image. Blue for negative values, gray for values near zero, and red to yellow for positive values.

on_camera_update(caller, event)
reset_camera_position()

Reset the camera to its initial position.

save_screenshot()

Capture the VTK render window as an image and return it as a dictionary with the image buffer and caption.

setup_ui()

Set up the user interface layout.

setup_vtk()

Set up the VTK renderer and interactor.

sgn

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

update_camera(camera)
update_polydata_with_annot(devtn_logps)

Update the polydata with colors from the annotation file.