This function provides an interactive image frame viewer where the user can navigate through a sequence of images
and select a specific one. The viewer uses buttons for navigation (previous and next) and an option to select an image.
The function uses the `rp.control` to create a window for the interface, and `grid` for displaying images.
Usage
selFrame(image_files)
Value
The index of the selected image.
Arguments
image_files
A vector of file paths to the images that will be displayed in the viewer.
Details
The function displays a sequence of images from the provided file paths, allowing the user to navigate between them
using "Previous" and "Next" buttons. The images are displayed using `grid.raster` from the `grid` package. A "Select" button
allows the user to select the current image, and the function returns the index of the selected image.