getImageDims: Obtain image dimensions/ranges

getImageDimsR Documentation

Obtain image dimensions/ranges

Description

Extracts information regarding the image.

  • getImageDims(): Extracts dimensions of the image, namely width, height and depth.

  • getImageRange(): Extracts range of the image x- and y-axis.

Usage

getImageDims(object, ...)

## S4 method for signature 'SPATA2'
getImageDims(object, img_name = activeImage(object), ...)

## S4 method for signature 'SpatialData'
getImageDims(object, img_name = activeImage(object), ...)

## S4 method for signature 'HistoImage'
getImageDims(object, ...)

getImageRange(object, ...)

## S4 method for signature 'SPATA2'
getImageRange(object, img_name = activeImage(object), ...)

## S4 method for signature 'SpatialData'
getImageRange(object, img_name = activeImage(object))

## S4 method for signature 'HistoImage'
getImageRange(object, ...)

Arguments

object

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

...

Used to absorb deprecated arguments or functions.

img_name

Character value. The name of the image of interest. If NULL, the active image is chosen by default. Either way, must be one of getImageNames().

Details

In case of confusion due to overlapping naming conventions: X-axis, x and x-range in terms of coordinates, corresponds to image width in terms of image analysis. Y-axis, y and y-range, in terms of coordinates, refers to image-height in terms of image analysis. SPATA2 primarily uses coordinates naming convention.

Value

Similar output, different data structure:

  • getImageDims(): Vector of length three: image width, image height, image depth

  • getImageRange(): Named list, names are x and y. Each slot contains a vector of length two that describes the range of the x- and y-axis.


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