Syntax
[im,fullnam]=imreadlastchanged([iext,idir])
Input Parameter
iext : | | image extensionsl default is {'*.png' '*.jpg' '*.tif'} |
idir : | | image directory; default is desktopdir |
Output Parameter
im : | | image read in by image read |
fullnam : | | full filename |
Examples
imreadlastchanged
Copyright 2019-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Algorithm (Workflow)
This function, imreadlastchanged
, reads the last modified image from a specified directory. It is part of the SolidGeometry library and was introduced in version 4.5.
Input Parameters
- iext: A list of image extensions to search for. The default is
{'*.png', '*.jpg', '*.tif', '*.jpeg'}
.
- idir: The directory to search for images. The default is the desktop directory.
Output Results
- im: The image read from the file.
- fullnam: The full filename of the image.
Algorithm Steps
- Retrieve the image extensions and directory from the input parameters or use the defaults.
- Store the current working directory in
wdir
.
- Change the current directory to
idir
.
- Call
lasttouchedSG
to find the last modified image file matching the extensions in iext
.
- Return to the original working directory stored in
wdir
.
- Construct the full filename using
idir
and the result from lasttouchedSG
.
- Read the image using
imread
and store it in im
.
- If no output arguments are specified, display the image using
imshow
and set the title to the filename.
Algorithm explaination created using ChatGPT on 2025-08-19 01:07. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-09-21