cropImg: Crop images

cropImgR Documentation

Crop images

Description

Crop images of class *Image in this package with a bounding box.

Usage

## S4 method for signature 'SpatRasterImage'
cropImg(x, bbox, filename = "")

## S4 method for signature 'BioFormatsImage'
cropImg(x, bbox)

## S4 method for signature 'ExtImage'
cropImg(x, bbox)

Arguments

x

An object of class *Image as implemented in this package.

bbox

Numeric vector with names "xmin", "xmax", "ymin", "ymax", in any order, to specify the bounding box.

filename

Output file name for transformed SpatRaster.

Value

Image of the same class as input but cropped. For BioFormatsImage, the image is not loaded into memory; only the extent is changed.

See Also

Other image methods: SFE-image, affineImg(), dim,BioFormatsImage-method, ext(), imgRaster(), imgSource(), mirrorImg(), rotateImg(), scaleImg(), translateImg(), transposeImg()


pachterlab/SpatialFeatureExperiment documentation built on Aug. 23, 2024, 11:38 p.m.