process_ranges: Process input ranges

View source: R/p.R

process_rangesR Documentation

Process input ranges

Description

Processes x- and y-ranges.

Usage

process_ranges(
  xrange = getImageRange(object)$x,
  yrange = getImageRange(objet)$y,
  expand = 0,
  persp = "image",
  object = NULL,
  ranges = NULL
)

Arguments

xrange, yrange

Vector of length two or NULL. If not NULL, specifies the x- and y-range to which the output image is cropped. E.g. xrange = c(200, 500) results in the image being cropped from x-coordinate 200px up to x-coordinate 500px. If NULL, the original image ranges are taken.

This argument works within the SPATA2 distance framework. If values are specified in European units of length the input is immediately converted to pixel units. See info section Distance measures for more information.

expand

Parameter to adjust how the image is expanded. See section Image expansion for more information.

persp

If image, adjusts the logic of the function to the fact that the height of images starts on top and not on the bottom.

object

An object of class spata2.

Value

List of 4 slots. Named xmin, xmax, ymin and ymax. Adjusted range in pixel.


kueckelj/SPATA2 documentation built on March 16, 2024, 10:25 a.m.