process_ranges: Process input ranges

View source: R/p.R

process_rangesR Documentation

Process input ranges

Description

Processes x- and y-ranges. The function assumes that x- and yrange are given from the perspective of a cartesian coordinate system.

Usage

process_ranges(
  xrange = getImageRange(object)$x,
  yrange = getImageRange(object)$y,
  expand = 0,
  persp = "ccs",
  object = NULL,
  ranges = NULL,
  opt = 1
)

Arguments

xrange, yrange

Distance vector of length two or NULL. If not NULL, specifies the x- and y-range to which the spatial output is cropped. E.g. xrange = c(200, 500) results in the two dimensional space being cropped from x-coordinate 200px up to x-coordinate 500px. If NULL, the original range is used.

expand

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

persp

Determines the perspective of the output. Thus, if image, it will flip the values of yrange. If 'ccs', the values of yrange are not flipped.

object

An object of class SPATA2 or, in case of S4 generics, objects of classes for which a method has been defined.

Value

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


theMILOlab/SPATA2 documentation built on Feb. 8, 2025, 11:41 p.m.