Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Biosignal and Biomedical Image Processing MATLAB based Applications - John L. Semmlow

.pdf
Скачиваний:
403
Добавлен:
10.08.2013
Размер:
4.43 Mб
Скачать

FIGURE 13.16 The same image as in Figure 13.15 with a higher correlation threshold (0.7). Fewer errors are seen, but the active area is only partially identified.

eliminated, but now the active region is only partially identified. An intermediate threshold might result in a better compromise, and this is explored in one of the problems.

Functional MRI software packages allow isolation of specific regions of interest (ROI), usually though interactive graphics. Pixel values in these regions of interest can be plotted over time and subsequent processing can be done on the isolated region. Figure 13.17 shows the variation over time (actually, over the number of frames) of one of the active pixels. Note the very approximate correlation with the square wave-like task profile also shown. The poor correlation is due to noise and other artifacts, and is fairly typical of fMRI data. Identifying the very small signal within the background noise is the one of the major challenges for fMRI image processing algorithms.

Copyright 2004 by Marcel Dekker, Inc. All Rights Reserved.

FIGURE 13.17 Variation in intensity of a single pixel within the active area of Figures 13.15 and 13.16. A correlation with the task profile is seen, but considerable noise is also present.

Principal Component and Independent Component Analysis

In the above analysis, active pixels were identified by correlation with the task profile. However, the neuronal response would not be expected to follow the task temporal pattern exactly because of the dynamics of the blood flow response (i.e., blood hemodynamics) which requires around 4 to 6 seconds to reach its peak. In addition, there may be other processes at work that systematically affect either neural activity or pixel intensity. For example, respiration can alter pixel intensity in a consistent manner. Identifying the actual dynamics of the fMRI process and any consistent artifacts might be possible by a direct analysis of the data. One approach would be to search for components related to blood flow dynamics or artifacts using either principal component analysis (PCA) or independent component analysis (ICA).

Regions of interest are first identified using either standard correlation or other statistical methods so that the new tools need not be applied to the entire image. Then the isolated data from each frame is re-formatted so that it is onedimensional by stringing the image rows, or columns, together. The data from each frame are now arranged as a single vector. ICA or PCA is applied to the transposed ensemble of frame vectors so that each pixel is treated as a different source and each frame is an observation of that source. If there are pixels whose intensity varies in a non-random manner, this should produce one or more components in the analyses. The component that is most like the task profile can then be used as a more accurate estimate of blood flow hemodynamics in the correlation analysis: the isolated component is used for the comparison instead of the task profile. An example of this approach is given in Example 13.5.

Copyright 2004 by Marcel Dekker, Inc. All Rights Reserved.

Example 13.5 Select a region of interest from the data of Figure 13.16, specifically an area that surrounds and includes the potentially active pixels. Normally this area would be selected interactively by an operator. Reformat the images so that each frame is a single row vector and constitutes one row of an ensemble composed of the different frames. Perform both an ICA and PCA analysis and plot the resulting components.

%Example 13.5 and Figure 13.18 and 13.19

%Example of the use of PCA and ICA to identify signal

%and artifact components in a region of interest

%containing some active neurons.

%Load the region of interest then re-format to a images so that

%each of the 24 frames is a row then transpose this ensemble

%so that the rows are pixels and the columns are frames.

%Apply PCA and ICA analysis. Plot the first four principal

%components and the first two independent components.

%

close all; clear all; nu_comp = 2;

% Number of independent components

load roi2;

% Get ROI data

% Find number of frames %

[r c dummy frames] =

size(ROI);

%Convert each image frame to a column and construct an

%ensemble were each column is a different frame

%

 

 

 

for i = 1:frames

 

for j = 1:r

 

row =

ROI(j,:,:,i);

% Convert frame to a row

if j ==

1

 

temp =

row;

 

else

 

 

 

temp =

[temp row];

 

end

 

 

 

end

 

 

 

if i ==

1

 

 

data =

temp;

% Concatenate rows

else

 

 

 

data =

[data;temp];

 

end

 

 

 

end

 

 

 

%

 

 

 

% Now apply PCA analysis

 

[U,S,pc]=

svd(data’,0);

% Use singular value decomposition

eigen = diag(S).v2;

 

for i = 1:length(eigen)

 

Copyright 2004 by Marcel Dekker, Inc. All Rights Reserved.

FIGURE 13.18 First four components from a principal component analysis applied to a region of interest in Figure 13.15 that includes the active area. A function similar to the task is seen in the second component. The third component also has a possible repetitive structure that could be related to respiration.

pc(:,i) = pc(:,i) * sqrt(eigen(i)); end

%

% Determine the independent components w = jadeR(data’,nu_comp);

ica = (w* data’);

Copyright 2004 by Marcel Dekker, Inc. All Rights Reserved.

FIGURE 13.19 Two components found by independent component analysis. The task-related function and the respiration artifact are now clearly identified.

%

.......Display components.......

The principal components produced by this analysis are shown in Figure 13.18. A waveform similar to the task profile is seen in the second plot down. Since this waveform derived from the data, it should more closely represent the actual blood flow hemodynamics. The third waveform shows a regular pattern, possibly due to respiration artifact. The other two components may also contain some of that artifact, but do not show any other obvious pattern.

The two patterns in the data are better separated by ICA. Figure 13.19 shows the first two independent components and both the blood flow hemodynamics and the artifact are clearly shown. The former can be used instead of the task profile in the correlation analysis. The results of using the profile obtained through ICA are shown in Figure 13.20A and B. Both activity maps were obtained from the same data using the same correlation threshold. In Figure 13.20A, the task profile function was used, while in Figure 13.20B the hemody-

Copyright 2004 by Marcel Dekker, Inc. All Rights Reserved.

FIGURE 13.20A Activity map obtained by correlating pixels with the square-wave task function. The correlation threshold was 0.55. (Original image from the MATLAB Image Processing Toolbox. Copyright 1993–2003, The Math Works, Inc. Reprinted with permission.)

FIGURE 13.20B Activity map obtained by correlating pixels with the estimated hemodynamic profile obtained from ICA. The correlation threshold was 0.55.

Copyright 2004 by Marcel Dekker, Inc. All Rights Reserved.

namic profile (the function in the lower plot of Figure 13.19) was used in the correlation. The improvement in identification is apparent. When the task function is used, very few of the areas actually active are identified and a number of error pixels are identified. Figure 13.20B contains about the same number of errors, but all of the active areas are identified. Of course, the number of active areas identified using the task profile could be improved by lowering the threshold of correlation, but this would also increase the errors.

PROBLEMS

1.Load slice 13 of the MR image used in Example 13.3 (mri.tif). Construct parallel beam projections of this image using the Radon transform with two different angular spacings between rotations: 5 deg. and 10 deg. In addition, reduce spacing of the 5 deg. data by a factor of two. Reconstruct the three images (5 deg. unreduced, 5 deg. reduced, and 10 deg.) and display along with the original image. Multiply the images by a factor of 10 to enhance any variations in the background.

2.The data file data_prob_13_2 contains projections of the test pattern image, testpat1.png with noise added. Reconstruct the image using the inverse Radon transform with two filter options: the Ram-Lak filter (the default), and the Hamming filter with a maximum frequency of 0.5.

3.Load the image squares.tif. Use fanbeam to construct fan beam projections and ifanbeam to produce the reconstructed image. Repeat for two different beam distances: 100 and 300 (pixels). Plot the reconstructed images. Use a

FanSensorSpacing of 1.

4.The rf-pulse used in MRI is a shaped pulse consisting of a sinusoid at the base frequency that is amplitude modulated by some pulse shaping waveform.

The sinc waveform (sin(x)/x) is commonly used. Construct a shaped pulse con-

sisting of cos(ω2) modulated by sinc(ω2). Pulse duration should be such that ω2 ranges between ±π: −2π ≤ ω2 ≤ 2π. The sinusoidal frequency, ω1, should be 10 ω2. Use the inverse Fourier transform to plot the magnitude frequency spectrum

of this slice selection pulse. (Note: the MATLAB sinc function is normalized to π, so the range of the vector input to this function should be ±2. In this case, the cos function will need to multiplied by 2π, as well as by 10.)

5.Load the 24 frames of image fmri3.mat. This contains the 4-D variable, I_fmri, which has 24 frames. Construct a stimulus profile. Assume the same task profile as in Example 13.4: the first 6 frames were taken during no-task conditions, the next six frames during the task condition, then the cycle was repeated. Rearrange Example 13.4 so that the correlations coefficients are computed first, then the thresholds are applied (so each new threshold value does not

Copyright 2004 by Marcel Dekker, Inc. All Rights Reserved.

require another calculation of correlation coefficients). Search for the optimal threshold. Note these images contain more noise than those used in Example 13.4, so even the best thresholded will contain error pixels.

6.Example of identification of active area using correlation. Repeat Problem 6 except filter the matrix containing the pixel correlations before applying the threshold. Use a 4 by 4 averaging filter. (fspecial can be helpful here.)

7.Example of using principal component analysis and independent component analysis to identify signal and artifact. Load the region of interest file roi4.mat which contains variable ROI. This variable contains 24 frames of a small region around the active area of fmri3.mat. Reformat to a matrix as in Example 13.5 and apply PCA and ICA analysis. Plot the first four principal components and the first two independent components. Note the very slow time constant of the blood flow hemodynamics.

Copyright 2004 by Marcel Dekker, Inc. All Rights Reserved.

2

Basic Concepts

NOISE

In Chapter 1 we observed that noise is an inherent component of most measurements. In addition to physiological and environmental noise, electronic noise arises from the transducer and associated electronics and is intermixed with the signal being measured. Noise is usually represented as a random variable, x(n). Since the variable is random, describing it as a function of time is not very useful. It is more common to discuss other properties of noise such as its probability distribution, range of variability, or frequency characteristics. While noise can take on a variety of different probability distributions, the Central Limit Theorem implies that most noise will have a Gaussian or normal distribution*. The Central Limit Theorem states that when noise is generated by a large number of independent sources it will have a Gaussian probability distribution regardless of the probability distribution characteristics of the individual sources. Figure 2.1A shows the distribution of 20,000 uniformly distributed random numbers between −1 and +1. The distribution is approximately flat between the limits of ±1 as expected. When the data set consists of 20,000 numbers, each of which is the average of two uniformly distributed random numbers, the distribution is much closer to Gaussian (Figure 2.1B, upper right). The distribution

*Both terms are used and reader should be familiar with both. We favor the term “Gaussian” to avoid the value judgement implied by the word “normal.”

Copyright 2004 by Marcel Dekker, Inc. All Rights Reserved.

FIGURE 2.1 (A) The distribution of 20,000 uniformly distributed random numbers.

(B) The distribution of 20,000 numbers, each of which is the average of two uniformly distributed random numbers. (C) and (D) The distribution obtained when 3 and 8 random numbers, still uniformly distributed, are averaged together. Although the underlying distribution is uniform, the averages of these uniformly distributed numbers tend toward a Gaussian distribution (dotted line). This is an example of the Central Limit Theorem at work.

constructed from 20,000 numbers that are averages of only 8 random numbers appears close to Gaussian, Figure 2.1D, even though the numbers being averaged have a uniform distribution.

The probability of a Gaussianly distributed variable, x, is specified in the well-known normal or Gaussian distribution equation:

p(x) =

1

ex2/ 2σ2

(1)

 

 

σ

 

 

 

Copyright 2004 by Marcel Dekker, Inc. All Rights Reserved.