Starting Neurotorch and accessing the API

class neurotorchmz.core.session.Edition(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

The edition of Neurotorch which should be launched

NEUROTORCH = 1

Standard version

NEUROTORCH_DEBUG = 10

Launches the developer version with (depending on your version) additional features and debugging output

NEUROTORCH_LIGHT = 2

Launches Neurotorch without some external connectivity. Designed to minimize external dependencies and for bundling

neurotorchmz.Start(edition: Edition = Edition.NEUROTORCH, headless: bool = False, background: bool = False) Session

Create a new session of Neurotorch. You can access it via the provided Session object returned by this function (only in background mode).

In contrast to a session, use the API if you don’t want Neurotorch to manage your data and only want to access the detection functions.

Parameters:
  • edition (Edition) – Choose which edition of Neurotorch you want to launch

  • headless (bool) – When set to true, the tkinter GUI is not opened. Some functions may not work in headless mode

  • background (bool) – Controls wether the GUI is running in a different thread. Note that tkinter may raise warnings, which can generally be ignored.

neurotorchmz.Start_Background(edition: Edition = Edition.NEUROTORCH, headless=False) Session

Create a new session of NeurotorchMZ. The same as calling Start with background=True

class neurotorchmz.core.session.Session(edition: Edition = Edition.NEUROTORCH)

A session is the main entry into Neurotorch. It stores the loaded data and provides update functions for the GUI

In contrast, if you only want to access the detection functions and don’t need Neurotorch to handle the images for you, use the API

property active_image_object: ImageObject | None

Retreive or set the currently active ImageObject

property active_image_signal: SignalObject | None

Retreive the signal of the currently active ImageObject. The concept of a signal is the generalization of extrinsic synaptic stimulation

property ijH

Returns the ImageJHandler object or None if not yet imported

import_ijh()

Import the ImageJ helper (ijh)

launch(background: bool = False)

Launches the GUI. The parameter background controls if a thread is used. Can only be called once

Raises:

RuntimeError – The GUI has already been started

notify_image_object_change()

When changing the ImageObject, call this function to notify the GUI about the change. Will invoke a ImageChanged TabUpdateEvent on all tabs in the window.

property roifinder_detection_result: DetectionResult

Returns the detection result object of the roi finder tab

property root

Returns the current tkinter root. If in headless mode, return None

set_active_image_object(imgObj: ImageObject | None)

Replace the active ImageObject or remove it by setting it to zero. Creates a new SignalObject

property synapse_analysis_detection_result: DetectionResult

Returns the detection result object of the synapses analysis tab