Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

methods.linim

Methods for Images on a Linear Network


Description

Methods for the class "linim" of functions on a linear network.

Usage

## S3 method for class 'linim'
print(x, ...)

  ## S3 method for class 'linim'
summary(object, ...)

  ## S3 method for class 'linim'
as.im(X, ...)

  ## S3 method for class 'linim'
as.data.frame(x, ...)

  ## S3 method for class 'linim'
shift(X, ...)

  ## S3 method for class 'linim'
scalardilate(X, f, ..., origin=NULL)

  ## S3 method for class 'linim'
affine(X, mat=diag(c(1,1)), vec=c(0,0), ...)

Arguments

X,x,object

A pixel image on a linear network (object of class "linim").

...

Extra arguments passed to other methods.

f

Numeric. Scalar dilation factor.

mat

Numeric matrix representing the linear transformation.

vec

Numeric vector of length 2 specifying the shift vector.

origin

Character string determining a location that will be shifted to the origin. Options are "centroid", "midpoint" and "bottomleft". Partially matched.

Details

These are methods for the generic functions print, summary and as.data.frame, and the spatstat generic functions as.im, shift, scalardilate and affine.

An object of class "linfun" represents a pixel image defined on a linear network.

The method as.im.linim extracts the pixel values and returns a pixel image of class "im".

The method as.data.frame.linim returns a data frame giving spatial locations (in cartesian and network coordinates) and corresponding function values.

The methods shift.linim, scalardilate.linim and affine.linim apply geometric transformations to the pixels and the underlying linear network, without changing the pixel values.

Value

For print.linim the result is NULL.

The function summary.linim returns an object of class "summary.linim". In normal usage this summary is automatically printed by print.summary.linim.

For as.im.linim the result is an object of class "im".

For the geometric transformations shift.linim, scalardilate.linim and affine.linim, the result is another object of class "linim".

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak rubak@math.aau.dk

Examples

M <- as.mask.psp(as.psp(simplenet))
   Z <- as.im(function(x,y) {x-y}, W=M)
   X <- linim(simplenet, Z)
   ## ............  print basic details .........................
   X
   ## ............  print gory details  .........................
   summary(X)
   ## ...........................................................
   shift(X, c(1,1))
   scalardilate(X, 2)
   head(as.data.frame(X))

spatstat.linnet

Linear Networks Functionality of the 'spatstat' Family

v2.1-1
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Ottmar Cronie [ctb], Tilman Davies [ctb], Greg McSwiggan [ctb], Suman Rakshit [ctb]
Initial release
2021-03-28

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.