ImageFileDialog
¶
This module contains an ImageFileDialog
.
-
class
ImageFileDialog
(parent=None)[source]¶ Bases:
silx.gui.dialog.AbstractDataFileDialog.AbstractDataFileDialog
The ImageFileDialog class provides a dialog that allow users to select an image from a file.
The ImageFileDialog class enables a user to traverse the file system in order to select one file. Then to traverse the file to select a frame or a slice of a dataset.
It supports fast access to image files using FabIO. Which is not the case of the default silx API. Image files still also can be available using the NeXus layout, by editing the file type combo box.
The selected data is an numpy array with 2 dimension.
Using an ImageFileDialog can be done like that.
dialog = ImageFileDialog() result = dialog.exec_() if result: print("Selection:") print(dialog.selectedFile()) print(dialog.selectedUrl()) print(dialog.selectedImage()) else: print("Nothing selected")