buildqPLM: Build qPLMarr Object From Rotating Analyzer Images.

View source: R/buildqPLM.R

buildqPLMR Documentation

Build qPLMarr Object From Rotating Analyzer Images.

Description

buildqPLM creates an array-format qPLMarr object by combining images of the same static specimen with the rotating analyzer set at consistent intervals.

Usage

buildqPLM(
  steps = 6,
  tiffs.glob,
  pixelshift = 10,
  mask.glob = NULL,
  north.thickness,
  south.thickness = NULL,
  west.thickness = NULL,
  east.thickness = NULL,
  wavelength = 532,
  birefringence = 0.005,
  pixel = 7.5832259,
  up = 0,
  mask = TRUE,
  data.type = "generic"
)

Arguments

steps

The number of analyzer positions used. Default is six (six images with 30 degrees rotation of the analyzer between each).

tiffs.glob

A string that identifies any shared part of the file names in the image series.

pixelshift

buildqPLM will try to align the input image stack by translating the images to get the best fit. The algorithm is experimental. Set this value to 0 to skip automated alignment.

mask.glob

A string that identifies the file name of the mask. Required if mask = TRUE.

north.thickness

Thickness of the specimen at its 'North' (top) edge. N, S, W, & E thicknesses can be specified separately to model 'wedged' specimens that do not have a consistent thickness across the entire specimen face. If the specimen can be assumed to have a constant thickness across the field of view, the N value will be used to fill in S, W, & E by default.

south.thickness

'South' (bottom) edge thickness.

west.thickness

'West' (left) edge thickness.

east.thickness

'East' (right) edge thickness.

wavelength

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

birefringence

The expected birefringence of the specimen. Default value is a semi-empirical lab standard of 5e-4 for bone. Images with several materials of varying birefringence currently require multiple input runs with separate masks for each material.

pixel

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 Leica Z6 Macroscope at 1.25x, MA1000 camera with 1x C-mount.

up

'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 qPLMarr object's attributes and does not influence the values in the result array.

mask

If mask = TRUE, buildqPLM will use the string in bitmap.glob to select a binary mask image. Mask images must have the same dimensions as the input images. White pixels in the mask correspond to pixels from the first input image that will be included in the qPLM output; black pixels are excluded.

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

Native R qPLM analysis from multiple images of a static specimen with a rotating analyzer. This code is an adaptation of the method of Glazer et al. (1996), with the intent of providing an inexpensive alternative that can be employed without extensive microscope customization.

Value

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

References

Glazer, A.M., Lewis, J.G., and Kaminsky, W., 1996. An automatic optical imaging system for birefringent media. Proc R Soc A 452(1955): 2751 - 2765.

Kaminsky, W., Gunn, E., Sours, R., and Kahr, B., 2007. Simultaneous false-colour imaging of birefringence, extinction and transmittance at camera speed. J Microsc 228(2): 153 - 164.

See Also

Other qPLM Input Functions: densBiref()

Examples

oldwd<-getwd()
setwd(system.file("extdata", package = "microTransit"))
testqPLMarr<-buildqPLM(steps = 6, tiffs.glob = "OsteonImg*",
                        mask.glob = "OsteonMask*", north.thickness = 40)
save(testqPLMarr, "testqPLMarr.R")
setwd(oldwd)
qPLMTiff("testqPLM", testqPLMarr)



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