Skip to contents

Creates a large giotto image that can be added to a Giotto subcellular object. Generates deep copy of SpatRaster

Usage

createGiottoLargeImage(
  raster_object,
  name = "image",
  negative_y = TRUE,
  extent = NULL,
  use_rast_ext = FALSE,
  image_transformations = NULL,
  flip_vertical = FALSE,
  flip_horizontal = FALSE,
  xmax_bound = NULL,
  xmin_bound = NULL,
  ymax_bound = NULL,
  ymin_bound = NULL,
  scale_factor = 1,
  verbose = TRUE
)

Arguments

raster_object

filepath to an image, a terra SpatRaster or, other format openable via terra::rast()

name

name for the image

negative_y

Map image to negative y spatial values if TRUE. Meaning that origin is in upper left instead of lower left.

extent

SpatExtent object to assign spatial extent. Takes priority unless use_rast_ext is TRUE.

use_rast_ext

Use extent from input raster object

image_transformations

vector of sequential image transformations - under construction

flip_vertical

flip raster in a vertical manner

flip_horizontal

flip raster in a horizontal manner

xmax_bound, xmin_bound, ymax_bound, ymin_bound

assign min and max x and y values for image spatial placement

scale_factor

scaling of image dimensions relative to spatial coordinates

verbose

be verbose

Value

a giottoLargeImage object

Examples

image_test <- system.file("extdata/toy_intensity.tif",
    package = "GiottoClass"
)

createGiottoLargeImage(raster_object = image_test)
#> An object of class giottoLargeImage : "image"
#> Image extent            : 0, 1091, -1107, 0 (xmin, xmax, ymin, ymax)
#> Original image extent   : 0, 1091, -1107, 0 (xmin, xmax, ymin, ymax)
#> Scale factor            : 1, 1 (x, y)
#> Resolution              : 1, 1 (x, y)
#> Layers                  : 1 
#> Estimated max intensity : 168 
#> Estimated min intensity : 0 
#> Values                  : integers
#> File path               : '/home/runner/work/_temp/Library/GiottoClass/extdata/toy_intensity.tif'