Find the location, size and magnification of an inForm field by inspecting a component_data.tif file.

get_field_info(path)

Arguments

path

Path to the component_data.tif file.

Value

A named list with values

location

The physical (x, y) location of the top-left corner of the field on the source slide, in microns.

field_size

The physical (width, height) of the field, in microns.

image_size

The (width, height) of the field image, in pixels.

microns_per_pixel

The size of each pixel, in microns.

pixels_per_microns

The inverse of microns per pixel

Details

The field location is determined from the coordinates in the file name. The field size and magnification are read from TIFF tags in the file.

Limited to 1x1 fields due to limitations in the tiff package. Install the Akoya Biosciences fork of the tiff package to remove this limitation.

See also

Examples

  path <- system.file('extdata', 'sample',
    'Set4_1-6plex_[16142,55840]_component_data.tif',
    package='phenoptr')
  get_field_info(path)
#> $image_size
#> [1] 1868 1400
#> 
#> $microns_per_pixel
#> [1] 0.4981226
#> 
#> $pixels_per_micron
#> [1] 2.007538
#> 
#> $field_size
#> [1] 930.4929 697.3716
#> 
#> $location
#> [1] 15704.71 55491.58
#>