cmtkreg: Create and test cmtkreg objects that specify path to a CMTK...

View source: R/cmtkreg.R

cmtkregR Documentation

Create and test cmtkreg objects that specify path to a CMTK registration

Description

cmtkreg creates an object of class cmtkreg that describes one (or more) CMTK registrations. This is simply a character vector that also has class cmtkreg.

as.cmtkreg converts objects to class cmtkreg, minimally just by adding an appropriate class attribute.

is.cmtkreg checks if an object is a cmtk registration either by checking class (default), or inspecting file. Supports CMTK parameter files as well as NRRD deformation fields.

Usage

cmtkreg(x, returnDir = NA)

as.cmtkreg(x, ...)

## S3 method for class 'matrix'
as.cmtkreg(x, ...)

## S3 method for class 'reglist'
as.cmtkreg(x, ...)

## Default S3 method:
as.cmtkreg(x, ...)

is.cmtkreg(x, filecheck = c("none", "exists", "magic"))

Arguments

x

Path to a cmtk registration (either plain character vector or cmtkreg object)

returnDir

Whether to return the registration directory or the actual file containing the registration. When returnDir=NA, the default, returns the input path x after validation.

...

Additional arguments passed to methods. Currently ignored.

filecheck

Whether to check object class only (default: 'none') or find and check if registration file exists or check magic value in first line of file.


natverse/nat documentation built on Feb. 19, 2024, 7:19 a.m.