| |
Program Functions
150
wedge-stimulus phase images, mrRedGreenCmap, a binary red and green color map for sign
maps, and a gray(10) color map for overlay images. hsv, hot, and gray are MATLAB com-
mands that create and return the color maps. The mat file vCmap.mat, which also resides in
the Utilities directory, stores the custom color map that is used by default for wedge-stimulus
phase images by mrFindBorders. The function vRedGreenCmap creates a gray-red-green
color map with 256 entries. The first three color maps can be rotated.
vCropToDisc.m
This function fills the outer or inner region of a circle within an image with a specified value.
The image, the center of the circle, its radius, the value with which to fill the region, and a
mode can be given to the function. The mode determines whether to fill the outer or inner part
of the circle. The function returns the modified image as well as a mask, which is a matrix of
zeros and ones. An entry of the mask has a value of one if it is part of the region that is over-
written by the specified value; otherwise the entry is zero.
vEuclDist.m
vEuclDist calculates the Euclidean distance between two specified points.
2
2
1
2
1
1
1
2
2
2
( 2
1)
( 2
1)
pt
pt
a
pt
b
a
pt
b
euclDist
a
a
b
b
-
=
=
=
-
+
-
Equation 27: Euclidean Dis-
tance
vFilterImLP.m
An image can be low-pass filtered by calling this function. The function parameter mode de-
termines the kind of filter that is used. Currently, two different low-pass filters are available.
For low-pass filtering, the function conv2 is called with an appropriate filter vector. conv2 is a
|  |
|
| |
|
|