ImageFileDialog#

This module contains an ImageFileDialog.

class ImageFileDialog(parent=None)[source]#

Bases: 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.

../../../_images/imagefiledialog_h5.png

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.

../../../_images/imagefiledialog_edf.png

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")
selectedImage()[source]#

Returns the selected image data as numpy

Return type:

numpy.ndarray