View source: R/py-nipy-coreg.R
py_nipy_coreg | R Documentation |
'nipy'
scriptAlign 'CT' using
nipy.algorithms.registration.histogram_registration
.
py_nipy_coreg(
ct_path,
mri_path,
clean_source = TRUE,
inverse_target = TRUE,
precenter_source = TRUE,
smooth = 0,
reg_type = c("rigid", "affine"),
interp = c("pv", "tri"),
similarity = c("crl1", "cc", "cr", "mi", "nmi", "slr"),
optimizer = c("powell", "steepest", "cg", "bfgs", "simplex"),
tol = 1e-04,
dry_run = FALSE
)
cmd_run_nipy_coreg(
subject,
ct_path,
mri_path,
clean_source = TRUE,
inverse_target = TRUE,
precenter_source = TRUE,
reg_type = c("rigid", "affine"),
interp = c("pv", "tri"),
similarity = c("crl1", "cc", "cr", "mi", "nmi", "slr"),
optimizer = c("powell", "steepest", "cg", "bfgs", "simplex"),
dry_run = FALSE,
verbose = FALSE
)
ct_path, mri_path |
absolute paths to 'CT' and 'MR' image files |
clean_source |
whether to replace negative 'CT' values with zeros; default is true |
inverse_target |
whether to inverse 'MRI' color intensity; default is true |
precenter_source |
whether to adjust the 'CT' transform matrix before alignment, such that the origin of 'CT' is at the center of the volume; default is true. This option may avoid the case that 'CT' is too far-away from the 'MR' volume at the beginning of the optimization |
smooth, interp, optimizer, tol |
optimization parameters, see
|
reg_type |
registration type, choices are |
similarity |
the cost function of the alignment; choices are
|
dry_run |
whether to dry-run the script and to print out the command instead of executing the code; default is false |
subject |
'RAVE' subject |
verbose |
whether to verbose command; default is false |
Nothing is returned from the function. However, several files will be generated at the 'CT' path:
'ct_in_t1.nii'
aligned 'CT' image; the image is also re-sampled into 'MRI' space
'CT_IJK_to_MR_RAS.txt'
transform matrix from volume 'IJK' space in the original 'CT' to the 'RAS' anatomical coordinate in 'MR' scanner
'CT_RAS_to_MR_RAS.txt'
transform matrix from scanner 'RAS' space in the original 'CT' to 'RAS' in 'MR' scanner space
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.