image_similarity: Compute Image Similarity Metrics

Description Usage Arguments Value Note Examples

View source: R/image_similarity.R

Description

Compute Image Similarity Metrics

Usage

1
2
image_similarity(image1, image2, image1_mask = NULL,
  image2_mask = NULL, ...)

Arguments

image1

Object of class nifti or character filename. Passed to the fixed image in imageSimilarity

image2

Object of class nifti or character filename Passed to the moving image in imageSimilarity

image1_mask

Mask for first image (optional)

image2_mask

Mask for second image (optional)

...

Additional arguments to pass to imageSimilarity

Value

A numeric value

Note

Not all metrics are symmetric.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
library(ANTsRCore)
library(extrantsr)
x =  getANTsRData( 'r16' )
y =  getANTsRData( 'r30' )
image_similarity(x,y, type="MeanSquares")
image_similarity(y,x, type="MeanSquares")

image_similarity(x,y, type="Correlation")
image_similarity(y,x, type="Correlation")

# NOT SYMMETRIC
image_similarity(x,y, type="MattesMutualInformation")
image_similarity(y,x, type="MattesMutualInformation")

# NOT SYMMETRIC
mutual_information(x, y)
mutual_information(y, x)

image_similarity(x,y, type="ANTSNeighborhoodCorrelation")
image_similarity(y,x, type="ANTSNeighborhoodCorrelation")
image_similarity(x,y, type="JointHistogramMutualInformation")
image_similarity(y,x, type="JointHistogramMutualInformation")
image_similarity(x,y, type="Demons")
image_similarity(y,x, type="Demons")

neuroconductor-releases/extrantsr documentation built on Dec. 10, 2019, 12:07 a.m.