selFrame: Image Frame Selector and Viewer

View source: R/selFrame.R

selFrameR Documentation

Image Frame Selector and Viewer

Description

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)

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.

Value

The index of the selected image.

Examples


# Not run:
path <- system.file('extdata/frames/', package='BioTrajectory')
image_files <- list.files(path, pattern = "\\.png$", full.names = TRUE)
selFrame(image_files)



BioTrajectory documentation built on June 8, 2025, 11:54 a.m.