| |
Program Functions
136
6.11 Preprocessing
vPreProcessData.m
This function is called at many places in mrFindBorders, for example after loading data, after
changing the coherence threshold, after changing the phase offsets for the phase images (ring
or wedge stimuli), and after setting regions within the phase image to NaN. At first, vPreProc-
essData adds the phase offsets which are specified manually or by using the automatic phase
offset estimation to the original phase data (ring or wedge stimuli). The original phase data
was saved after loading and is not changed by vPreProcessData. Instead, a new variable for
the updated phase data is used. But adding phase offsets is not the only thing that the function
does. Regions that are NaN in the coherence images (ring and wedge stimuli), are set to 0.
Then, the coherence images are used to modify the previously processes phase images: An
entry within a phase image that has a corresponding coherence value that is below the coher-
ence threshold is set to NaN. NaN entries in the phase images can be matched with any phase
value in the atlas; the energy is not increased. The coherence is therefore seen as a confidence
measure here. Only regions that have a coherence that is at least as high as the coherence
threshold are used in the matching process. By increasing the coherence threshold, the level of
noise can be reduced in many cases. After setting phase values below coherence threshold to
NaN, the template matrix that was described above (toolsMenuSetNaN) is used to set regions
in the phase image (wedge stimulus) to NaN that are NaN in the template. Finally, the visual
field sign map is re-calculated based on the pre-processed data.
vPreprocessingAfterLoading.m
This function is only called from the function vLoadData after the phase and coherence data
has been loaded and before the visual field sign map is created. It determines the size of the
original images (the phase image has the same size as the corresponding coherence image).
The value is given back and stored since it is needed when ROIs are exported or saved. Then
it is checked if the size is different from the standard size of 129 pixels x 129 pixels. If this is
the case, the images are resized to the standard size. This is done by calling the MATLAB
function imresize. Nearest neighbor interpolation was chosen and is especially important for
|  |
|
| |
|
|