imgetfile

Open Image dialog box

Syntax

[filename, user_canceled] = imgetfile

Description

[filename, user_canceled] = imgetfile displays the Open Image dialog box. You can use this dialog box in imaging applications to get the name of the image file a user wants to open. The Open Image dialog box includes only files using supported image file formats (listed in imformats) and DICOM files. When the user selects a file and clicks Open, imgetfile returns the full path of the file in the return value filename and sets the user_canceled return value to FALSE. If the user clicks Cancel, imgetfile returns an empty string in filename and sets the user_canceled return value to TRUE.

    Note:   The Open Image dialog box is modal; it blocks the MATLAB® command line until the user responds.

Was this topic helpful?