ext | R Documentation |
Unlike in SpatialExperiment
, images in SFE have extents which are used
to align them to the geometries and in geometric operations on SFE objects.
These functions get or set the extent for S4 image classes inheriting from
VirtualSpatialImage
implemented in the SFE package.
## S4 method for signature 'BioFormatsImage'
ext(x)
## S4 method for signature 'ExtImage'
ext(x)
## S4 method for signature 'SpatRasterImage'
ext(x)
## S4 replacement method for signature 'BioFormatsImage,numeric'
ext(x) <- value
## S4 replacement method for signature 'ExtImage,numeric'
ext(x) <- value
## S4 replacement method for signature 'SpatRasterImage,numeric'
ext(x) <- value
x |
A |
value |
A numeric vector with names "xmin", "xmax", "ymin", "ymax" specifying the extent to use. |
Getters return a numeric vector specifying the extent. Setters return
a *Image
object of the same class as the input.
For SpatRasterImage
, the image may be may not be loaded into
memory. You can check if the image is loaded into memory with
terra::inMemory(imgRaster(x))
, and check the original file path with
imgSource
. If the image is not loaded into memory, then the
original file must be present at the path indicated by
imgSource
in order for any code using the image to work, which
includes this function ext
.
For BioFormatsImage
, internally only the pre-transform extent is
stored. The ext
getter will apply the transformation on the fly. The
setter sets the pre-transformation extent.
Other image methods:
SFE-image
,
affineImg()
,
cropImg()
,
dim,BioFormatsImage-method
,
imgRaster()
,
imgSource()
,
mirrorImg()
,
rotateImg()
,
scaleImg()
,
translateImg()
,
transposeImg()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.