contours: Add contours to a slice series

Description Usage Arguments Value Examples

View source: R/pipeFuncs.R

Description

Adds contours to every slice in the series, with control over the contour levels and attributes.

Usage

1
2
contours(ssm, volume, levels, col = "red", lty = 1, lwd = 1,
  name = "contours")

Arguments

ssm

The slice series info, usually passed along the pipe and specified by the user

volume

3D matrix representing the volume from which to obtain contours

levels

A vector of levels at which to draw the contours.

col

The colour for the contours. Can be a single value, in which case all levels will use the same colour, or a vector if different colours for different levels are desired. Default is red.

lty

The line type for the contours. Can be a single value, in which case all levels will use the same line type, or a vector if different line types for different levels are desired. Default is 1.

lwd

The line width for the contours. Can be a single value, in which case all levels will use the same line width, or a vector if different line widths for different levels are desired. Default is 1.

name

An optional name.

Value

The slices series for continuation down the pipe.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
sliceSeries(nrow = 1, begin=200, end=300) %>%
  anatomy(anatVol, low=700, high=1400) %>%
  overlay(stats, low=2, high=6, symmetric = T) %>%
  legend("t-statistics") %>%
  contours(abs(stats), levels=c(3,5), lwd=2, lty=c(3,1), col="green") %>%
  draw()

## End(Not run)

Mouse-Imaging-Centre/MRIcrotome documentation built on Feb. 27, 2020, 1:31 p.m.