This function launch a shiny application in browser to measure the distance between a pair of clicks. See section Details for usage of the application.

diameter_measurer(files, labels = "Plate",
  obs = "Done with ClickMetrics", csv = "my_clicks.csv",
  width = "800px", height = "800px", app_path = NULL)

Arguments

files

character[>0] Path to images that will be loaded by load.image().

labels

character[>0] Names that represent treatments for the case when phots are from an experiments.

obs

character[1] Any name used to identify the records, e.g. the user that made the clicks.

csv

character[1] Path to save a csv with recorded clicks. If NULL, the file is written in a temporary directory.

width

character[1] Value passad as argumento to width parameter of plotOutput() function.

height

character[1] Value passad as argumento to height parameter of plotOutput() function.

app_path

character[1] (optional, default is NULL) A path for shiny application is case of improving/developing the existing one.

Value

The function creates a CSV file with recorded clicks. After pressing Exit button, a data.frame is returned. It contains all click coordinates.

Details

Sidebar panel

Contains widgets to user interact with.

Main panel

Shows the image and a table with clicks already done. Each click adds a dot on the plot. A pair of consective cliks are linked by a line segment.

Image dropdown list

Selects the image to be measured. A column named image in the returned data.frame will contain this information.

Component radio buttons

Selects the treament, condition or component associated with the clicks. A column named component in the returned data.frame will contain this information. Note: double click in the image cycles among itens, so, a double click move to the next component in the list.

Observation text input

A text field used to inform anything, like the user name (a global information), or the color of the mycelium, the growth temperature (local information). Note: this information must be filled before the clicks. A column named obs in the returned data.frame will contain this information.

Record clicks button

It triggers write.csv() to save clicks in disc. The button should be pressed after all clicks have been made. A column named ts in the returned data.frame will contain the time stamp of the recorded data.

Undo button

Undoes the last click.

Restore button

Clean all clicks.

Exit button

Stops the application.

Examples

# NOT RUN { files <- dir(path = system.file("images", package = "ClickMetrics"), pattern = "^petri.*\\.png$", full.names = TRUE) files tb <- diameter_measurer(files = files, labels = c("Plate", "Trat1", "Trat2"), obs = "Done with ClickMetrics", csv = "my_clicks.csv") str(tb) with(tb, by(cbind(x, y), INDICES = pair, FUN = dist)) # }