mantidimaging.gui.windows.live_viewer.model module¶
- class mantidimaging.gui.windows.live_viewer.model.ImageWatcher(directory: Path)[source]¶
Bases:
QObject
A class to watch a directory for new images.
…
Attributes¶
- directoryPath
path to directory to watch
- watcherQFileSystemWatcher
file system watcher to watch directory
- image_changedpyqtSignal
signal emitted when an image is added or removed
Methods¶
- find_images()
Find all the images in the directory
- sort_images_by_modified_time(images)
Sort the images by modified time.
- find_images() list[Image_Data] [source]¶
Find all the images in the directory.
- image_changed¶
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.
- recent_image_changed¶
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.
- static sort_images_by_modified_time(images: list[Image_Data]) list[Image_Data] [source]¶
Sort the images by modified time.
- Parameters:
images – list of image objects to sort by modified time
- Returns:
sorted list of images
- update_recent_watcher(images: list[Image_Data]) None [source]¶
- class mantidimaging.gui.windows.live_viewer.model.Image_Data(image_path: Path)[source]¶
Bases:
object
Image Data Class to store represent image data.
…
Attributes¶
- image_pathPath
path to image file
- image_namestr
name of image file
- image_sizeint
size of image file
- image_modified_timefloat
last modified time of image file
- property stat: stat_result¶
- class mantidimaging.gui.windows.live_viewer.model.LiveViewerWindowModel(presenter: LiveViewerWindowPresenter)[source]¶
Bases:
object
The model for the spectrum viewer window.
…
Attributes¶
- presenterLiveViewerWindowPresenter
presenter for the spectrum viewer window
- pathPath
path to dataset
- imageslist
list of images in directory