These functions allow one to get (neuronbridge_mip) and plot (plot_mip) colour MIPs (maximum projection images). MIPs are not 'stacks' of images, but a single image plane where colour encodes depth. The bluer the hue, the more anterior (front of the brain) the signal. The redder the hue, the more posterior (back of the brain). There may be differences/difficulties plotting images between different operating systems. Only extensively tested on MacOS Catalina.

neuronbridge_mip(
  id,
  dataset = c("detect", "by_line", "by_body"),
  images.url = "https://s3.amazonaws.com/janelia-flylight-color-depth",
  db = options("neuronbridger"),
  version = "v2_1_1"
)

plot_mip(mip, db = options("neuronbridger"), file.delete = FALSE)

scan_mip(
  mips,
  no.hits = 10,
  type = c("hits", "files", "ids", "images"),
  sleep = NULL,
  images.url = "https://s3.amazonaws.com/janelia-flylight-color-depth",
  db = options("neuronbridger")
)

neuronbridge_remove_mips(db = options("neuronbridger"), interactive = TRUE)

Arguments

id

character vector. An identifier/identifiers for the neuron(s)/line(s) you wish to search. This can either be a line code for a GAL4 line (e.g. R16F12) or a split GAL4 line (e.g. LH173) or a 'body ID' for a neuron from the hemibrain connectome, (e.g. 1537331894).

dataset

whether the ID given is a body ID ("by_body") from the hemibrain connectome or a genetic driver line ("by_line"). If left at "detect" then neuronbridger tries to guess to which id belongs by using neuronbridger:::guess_dataset.

images.url

the online database from which NeuronBridge gets its MIP files. Higher res .png files come from https://s3.amazonaws.com/janelia-flylight-color-depth. Lower res .jpg thumbnails come from https://s3.amazonaws.com/janelia-flylight-color-depth-thumbnails.

db

the directory in which image files are saved (neuronbridge_mip), and from which they are read (plot_mip). This defaults to a temporary directory: file.path(tempdir(),"neuronbridger").

version

the precomputed scores to search. For example, "v2_1_1" refers to this release.

mip

either a full path to .png file or an array describing a image file, e.g. as comes from png::readPNG.

file.delete

logical, whether or not to delete the saved .png file after plotting.

mips

either a data frame of 'hits' (e.g. as produced by neuronbridge_search), a vector of file paths to saved MIP .png files or ids for data items (i.e. from neuronbridge_ids).

no.hits

the number of hits to visualise if type="hits".

type

the type of argument given as mips.

sleep

defaults to NULL. User needs to press a key to move to the next MIP. If a numeric value, then MIPs progress automatically and a pause of sleep seconds occurs before the next MIP is shown.

interactive

logical. When using neuronbridge_remove_mips, whether or not to be accosted with an 'are you sure'?.

Value

a named list of .png (neuronbridge_mip) or visualisation of a .png MIP in an rgl display (plot_mip).

Details

By default MIPs are saved to your R session's temporary directory. However, you can specify an alternative directory (argument: db). MIPs are saved as .png files, where the file names are given as id_number.png.

FlyLight file names contain metadata as follows: '[Publishing Name]-[Slide Code]-[Driver]-[Gender]-[Objective]-[Area/Tile]-[Alignment Space]-CDM_[Channel].png'

Find information on these meta data entries by examining ?neuronbridge_hits.

See also

Examples

# \donttest{ if (FALSE) { # Let us now see the related MIP file mip = neuronbridge_mip("542634818") ## This gets every MIP file associated with id ## In this case, just one # Plot the MIP image in an rgl viewer plot_mip(mip) }# }