populse_mia.user_interface.data_viewer.anatomist_2.snd_window

Open a new window for a selected object with only one view possible.

Classes

NewWindowViewer()

Window for displaying a selected object in a single anatomical view.

class populse_mia.user_interface.data_viewer.anatomist_2.snd_window.NewWindowViewer[source]

Bases: QMainWindow

Window for displaying a selected object in a single anatomical view.

This class creates a window that remains on top of other windows and allows the user to choose between different anatomical views (axial, sagittal, coronal, or 3D) for visualizing the selected object.

Contains:
Methods:
  • changeDisplay: Changes display on user’s demand.

  • close: Close properly objects before exiting Mia.

  • createNewWindow: Opens a new window in the vertical layout.

  • disableButton: Manages button availability and whether they should be checked or not depending on which view is displayed.

  • setObject: Store object to display.

  • showPopup: Defines the dimensions of the popup which is a QWidget.

__init__()[source]

Initialize the NewWindowViewer with UI components and event connections.

changeDisplay(index, obj)[source]

Changes the display based on user’s selection.

Parameters:
  • index (int) – Index of the view to display (0: Axial, 1: Sagittal, 2: Coronal, 3: 3D).

  • obj (anatomist.cpp.anatomist.AObject) – The object to display.

close()[source]

Properly closes objects before exiting.

createNewWindow(wintype='Axial')[source]

Opens a new window in the vertical layout.

Parameters:

wintype (str) – Type of the view to create (default is ‘Axial’).

disableButton(index)[source]

Manages button availability and checked state depending on the displayed view.

Parameters:

index (int) – Index of the view to enable.

setObject(obj)[source]

Stores the object to be displayed.

Parameters:

obj (anatomist.cpp.anatomist.AObject) – The object to display.

showPopup(obj)[source]

Defines the dimensions of the popup and displays the object.

QWidget is added to self.popups in order to keep the widget but being able to replace the object inside.

Parameters:

obj (anatomist.cpp.anatomist.AObject) – The object to display in the popup.