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.

cmtkreg(x, returnDir = NA)

as.cmtkreg(x, ...)

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

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

# S3 method for default
as.cmtkreg(x, ...)

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



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


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.


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.