KaminskyqPLMScript: Build qPLM Array Object From Specified Rotopol(tm) Format...

View source: R/KaminskyqPLMScript.R

KaminskyqPLMScriptR Documentation

Build qPLM Array Object From Specified Rotopol(tm) Format Images

Description

KaminskyqPLMScript creates an array-format qPLMarr object using the standard output images from Rotopol(tm) software. Images are selected from the working directory using Sys.glob, allowing this function to build qPLMarr objects without user interaction (e.g, in an unattended "overnight" script).

Usage

KaminskyqPLMScript(
  sample.name,
  bitmap.glob,
  mask.glob = NULL,
  north.thickness,
  south.thickness,
  west.thickness,
  east.thickness,
  wavelength = 532,
  birefringence = 0.005,
  pixel = 7.5832259,
  up = 0,
  mask = TRUE,
  data.type = "generic"
)

Arguments

sample.name

A name that will be used as a stem to label output files from this function (images, etc.).

bitmap.glob

string to direct Sys.glob() to I, |sind|, and phi bitmaps.

mask.glob

string to direct Sys.glob() to mask bitmap.

north.thickness

Numerical; the thickness of the (masked) specimen at its "North" (top center) edge. If no mask is specified, this thickness should be measured at the top center edge of the image.

N, S, W, & E thicknesses can be specified separately to model 'wedged' specimens. If the specimen can be assumed to have a constant thickness across the field of view, the N value can be measured anywhere on the image, and will be used to fill in S, W, & E by default.

south.thickness, west.thickness, east.thickness

Numerical; optional thickness measurements from each corner of the

wavelength

Numerical; the center of the illumination wavelength. Default is a 532nm green filter.

birefringence

Numerical; the expected birefringence of the specimen. Default value is an empirical lab standard of 0.0005 for typical bone. Images with several materials of varying birefringence currently require multiple input runs with separate masks for each material.

pixel

Numerical; the absolute size of a pixel in the specimen plane. Intended to be in microns, but the value is arbitrary and not currently linked to specific dimensions in other functions. Default value is lab standard for a Leica A6 macroscope at 1.25x.

up

Numerical; a 'map-view' compass orientation to track a specific axis. Can be used, for example, to specify the dorsal side of a long bone cross-section. This value is passed to the qPLM object's attributes and does not influence the values in the result array.

mask

Boolean; should a mask image be used to define a region of interest? Mask images must be binary (black and white), and have the same pixel dimensions as the other input images. Black pixels (value of 0) will be dropped from the output object, and the output array will be cropped down to a rectangular 10-pixel border around the ROI.

data.type

Character string; description of section type in broad terms, e.g., <<"diaphyseal cross section">>. Keeps specimen data with qPLMarr object as an attribute, and can also be used for watchdogs in analysis functions. For example, applying centroidCorr to an object will add <<"centroid-corrected">> to the data.type attribute. In future versions, centroidCorr may prompt the user for confirmation if it is applied to an object that is already labeled as centroid-corrected. Default value is "generic."

Details

More information on the Rotopol(tm) system is available at http://cad4.cpac.washington.edu/ROTOPOLhome/ROTOPOL.htm.

Value

A qPLMarr object that records pixel-by-pixel estimates of I (transmissivity), phi (angular orientation in plane), and theta (angular orientation out of plane). qPLMarr objects also keep relevant data regarding the specimen: thickness, illumination wavelength, the birefringence parameter used to calculate orientations, pixel scale, etc.


TobinH/microTransit documentation built on Jan. 19, 2024, 5:21 a.m.