View source: R/regressionMatchImage.R
regressionMatchImage | R Documentation |
Image intensity normalization by regressing the image intensities of the reference image with the source image.
regressionMatchImage(
sourceImage,
referenceImage,
mask = NULL,
polyOrder = 1,
truncate = TRUE
)
sourceImage |
image whose intensities we will match to the
|
referenceImage |
defines the reference intensity function. |
mask |
Defines voxels for regression modeling. |
polyOrder |
of polynomial fit. Default is 1 (linear fit). |
truncate |
boolean which turns on/off the clipping of intensities. |
the sourceImage
matched to the referenceImage
.
Avants BB
library(ANTsRCore)
sourceImage <- antsImageRead( getANTsRData( "r16" ) )
referenceImage <- antsImageRead( getANTsRData( "r64" ) )
matchedImage <- regressionMatchImage( sourceImage, referenceImage )
bad_source = sourceImage[1:200, 1:200]
testthat::expect_error(regressionMatchImage( bad_source, referenceImage ))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.