regi_loop: Automatically loops through the image registration process

Description Usage Arguments Details

View source: R/regi_loop.R

Description

User friendly code to alter atlas to image registration. When run with defaults, this function will automatically create a list called regis with the length of setup$regi_z. Each element of that list will be NULL until manual correction to that registration is done. The function will loop through every single image listed in setup$regi_z in order. A simple user interface built into the console is provided to improve each registration. The user has the option to save the environment after every registration.

Usage

1
2
3
4
5
6
7
regi_loop(setup, filter = NULL, regis = NULL, plane = "coronal",
  closewindow = TRUE, filetype = c("tif", "tiff", "wmf", "emf", "png",
  "jpg", "jpeg", "bmp", "ps", "eps", "pdf"), autoloop = FALSE,
  touchup = FALSE, reference = FALSE, popup = TRUE,
  brightness = 70, font_col = "white", font_size = 40,
  font_location = "+100+100", gravity = "southwest", width = 18,
  height = 10.2)

Arguments

setup

(required) Setup list from setup_pl().

filter

(required) Filter optimized for registration of images in the registration channel.

regis

(optional, default = NULL) List for storing registration output. On the first run of this function, the regis list will be automatically created in the global environment. If it exists in the global environment, this argument must be set to regis = regis.

plane

(optional, default = "coronal") Atlas plane to register to. options: "coronal", "sagittal"

closewindow

(optional, default = TRUE) If TRUE, windows will close after every correspondance point alteration.

filetype

(optional, default = "tif") Image type to save as. See the type argument in the function savePlot(). Options: "tif", "tiff", "wmf", "emf", "png", "jpg", "jpeg", "bmp","ps", "eps", "pdf"

autoloop

(optional, default = FALSE) Run autoloop to save wholebrain's first pass at registering all registration planes. This argument takes precendence over arguments 'touchup' and 'reference'

touchup

(optional, default = FALSE) Run registration loop on a subset of registration plates. Options:

  • touchup = TRUE runs a user friendly interface allowing user to enter which plates they want to fix.

  • touchup = numeric vector of plate numbers user wants to fix (plates should be whole integers).

reference

(optional, default = FALSE) Run registration loop on reference planes only if TRUE. This argument takes precendence over argument 'touchup' UNLESS the project is not a whole brain project. Entering argument TRUE on a partial brain project will be ignored.

popup

(optional, default = TRUE) Popup the original raw image to be registered. This can help with internal structure visualization.

brightness

(optional, default = 70) Popup image brightness.

font_col

(optional, default = "white")

font_size

(optional, default = 40)

font_location

(optional, default = "+100+100") Move text from center of gravity parameter in pixels.

gravity

(optional, "southwest") Location of text annotation. e.g. "southwest" means bottom left of screen.

width

(default = 18) Registration plotting window width in inches.

height

(default = 10.2 ) Registration plotting window height in inches.

Details

This functions creates a vector list of registration information for each registration slice. Note: This is not a return. The vector regis is automatically created.


mjin1812/SMART documentation built on Aug. 8, 2019, 12:31 p.m.