| Title: | Wrapper for the Computational Morphometry Toolkit ('CMTK') Library |
|---|---|
| Description: | Provides R bindings for selected components of the Computational Morphometry Toolkit ('CMTK') for image registration and point transformation. A subset of the 'C++' source code required for point transforms is bundled with 'cmtkr'. This allows direct calls into the 'CMTK' library, avoiding command-line invocations and providing order-of-magnitude speed improvements. Additional 'CMTK' functionality may be wrapped in future releases. 'CMTK' is described in Rohlfing T and Maurer CR (2003) <doi:10.1109/titb.2003.808506>. |
| Authors: | Gregory Jefferis [aut, cre] (ORCID: <https://orcid.org/0000-0002-0587-9355>), Torsten Rohlfing [aut] (CMTK library author (included source)), SRI International [cph] (Copyright holder for CMTK library), Google, Inc. [cph] (Copyright holder for CMTK library contributions) |
| Maintainer: | Gregory Jefferis <[email protected]> |
| License: | GPL-3 |
| Version: | 0.2.3 |
| Built: | 2026-05-13 09:02:37 UTC |
| Source: | https://github.com/jefferis/cmtkr |
Provides R bindings for selected components of the Computational Morphometry Toolkit ('CMTK') for image registration and point transformation. A subset of the 'C++' source code required for point transforms is bundled with 'cmtkr'. This allows direct calls into the 'CMTK' library, avoiding command-line invocations and providing order-of-magnitude speed improvements. Additional 'CMTK' functionality may be wrapped in future releases. 'CMTK' is described in Rohlfing T and Maurer CR (2003) doi:10.1109/titb.2003.808506.
Maintainer: Gregory Jefferis [email protected] (ORCID)
Authors:
Torsten Rohlfing (CMTK library author (included source))
Other contributors:
SRI International (Copyright holder for CMTK library) [copyright holder]
Google, Inc. (Copyright holder for CMTK library contributions) [copyright holder]
Useful links:
transform 3D points using one or more CMTK registrations
streamxform(points, reglist, inversionTolerance = 1e-08, affineonly = FALSE)streamxform(points, reglist, inversionTolerance = 1e-08, affineonly = FALSE)
points |
an Nx3 matrix of 3D points |
reglist |
A character vector specifying registrations. See details. |
inversionTolerance |
the precision of the numerical inversion when transforming in the inverse direction. |
affineonly |
Whether to apply only the affine portion of transforms
default |
To transform points from sample to reference space, you will need
to use the inverse transformation. This can be achieved by preceding the
registration with a --inverse flag. When multiple registrations are
being used the are ordered from sample to reference brain.
An Nx3 numeric matrix with the same dimensions as points
containing transformed coordinates. Rows for points that cannot be
transformed are returned as NA_real_.
m=matrix(rnorm(30,mean = 50), ncol=3) reg=system.file("extdata","cmtk","FCWB_JFRC2_01_warp_level-01.list", package='cmtkr') # from reference to sample streamxform(m, reg) # from sample to reference streamxform(m, c("--inverse", reg)) ## Not run: # concatenating 3 registrations to map S -> B1 -> B2 -> T # the first two registrations are inverted, the last is not. streamxform(m, c("--inverse", StoB1, "--inverse", B1toB2, TtoB2)) ## End(Not run)m=matrix(rnorm(30,mean = 50), ncol=3) reg=system.file("extdata","cmtk","FCWB_JFRC2_01_warp_level-01.list", package='cmtkr') # from reference to sample streamxform(m, reg) # from sample to reference streamxform(m, c("--inverse", reg)) ## Not run: # concatenating 3 registrations to map S -> B1 -> B2 -> T # the first two registrations are inverted, the last is not. streamxform(m, c("--inverse", StoB1, "--inverse", B1toB2, TtoB2)) ## End(Not run)