E. Example Analysis

$Revision: 1.3 $
$Date: 2006/08/14 14:29:30 $

How To Load and Analyse Data Using the Sample Dataset.

Keyboard/mouse action Explanation
   
Press \fbox{Load new data\ldots}. A new window titled Load data will pop-up. First, we need to load the sample dataset. The data parameters should all be set automatically, as lyngby will have read-in a conversion file specifying them.
   
Press the \fbox{Apply} button at the bottom of the new window The values of the GUI will be written to global variables needed for the loading.
   
Press the \fbox{Load Data!} button. The window will close. The data will now be read in from the files. In the main window it should display ``Finished loading data!'' at the bottom.
   
Press the \fbox{Create/Edit External Influences...} button bringing up a new window This is were you, e.g., can specify a stimulus function.
   
Press \fbox{Setup design} The first pre-processing step is to mask out those unwanted timepoints from the paradigm and run structures.
   
Press \fbox{Process design} Next, the mean is removed from the paradigm structure (i.e. the paradigm signal is transformed from 0, 1, 0, 1, 0, 1...to -1/2, +1/2, -1/2, +1/2, -1/2, +1/2...) as required by some analysis algorithms.
   
Press \fbox{Close}. The window should disappear  
   
Press the \fbox{Data setup\ldots} button in the main window. A new window titled Data Setup will pop-up. The next stage is to perform any pre-processing of the data.
   
If not already highlighted, select the first options (``normalization'') on the left-hand pane, and press ``Setup design and run''. A new window (``Pre-Processing'') will appear. The next stage is to select the pre-processing methods that will be applied to the data.
   
Select the first and third option and press the \fbox{Apply
Pre-Processing and Close} button. The Pre-Proceesing window will close, and the status of the pre-processing will be shown on the status bar within the main window.
   
Press \fbox{Done!} in the Data setup window. This will close the window
   
Click on the top button of the Data Analysis frame, initally labeled Original. From the pop-up list, select the FIR Filter algorithm. Next, the actual analysis of the data can take place. As an example, we will do a FIR Filter analysis of the paradigm and the fMRI data.
   
Press the \fbox{Parameters\ldots} button to bring up a new window. Once you have finished examining the settings, press the \fbox{Close} button to shut the window. The initial parameters for the FIR Filter can be set within a dedicated window. The Parameters window will be different for each algorithm, reflecting the different variables used in each case. Note that each algorithm will have a sensible set of defaults within its Parameters window. For this example, we can use default settings.
   
Press the \fbox{Calculate} button to start the calculation. The calculation is then started, with feedback given on the status line within the main window. Note that once the calculation is finished, the symbol adjacent to the algorithm name changes to a ``+'', indicating that results for this algorithm are ready to be examined. A ``-'' indicates that no calculation has been performed, whilst a ``!'' indicates that the parameters have been changed, but not yet used in a calculation.
   
Press the \fbox{View these results} button. A set of three windows, labelled Control, Volume and Time will pop-up. Once the calculations have finished (as shown in the status line), then the results can be viewed.
   
Click on different voxels in the Volume window. Note how the Time window displays the relevant time-series. The control window initially shows two ``layers''. The lower one controls the right-hand time-based window, while the upper one is used to control the left-hand volume-based window. The Time window shows the time-series for whichever voxel is selected in the Volume window. The current voxel location is shown above the time-series in the form [x,y,z]. Note how the data in the top-left of the image [x = 32-34, y = 1, z = 34] correlates better with the paradigm than that at the bottom-right [x = 14-20, z = 40-45]. Note also how the FIR model (red-line) matches the data far more closely in these highly-activated regions.
   
Click on \fbox{Sum of Coefficients} in the Data Layer, and pick Activation Strength from the pop-up list. For the FIR filter, there are several results for both the volume and time windows. The Activation Strength shows better contrast between the activated and non-activated regions.
   
Click on \fbox{Time} in the Time Layer, selecting the Histogram of Data option. The Time window will change from displaying a time-series to showing a histogram of the greylevels for the selected voxel. The time display can also display other types of data that are voxel-dependent. For instance, the FIR filter algorithm generates a range of results displaying histograms of the greyscales of a voxel through the time-series.
   
Click on different voxels and note that the general shape of the histogram is different for the activated and non-activated areas. The different areas in the volume have different greyscale distributions. Note that the distribution in activated areas has a bimodal distribution, reflecting the two distinct grey-levels that occur during the activated and non-activated states, whilst the distribution of non-activated areas is generally monomodal.
   
Click on the \fbox{More\ldots} button to expand the control window to display an additional two rows. The upper row contains two new visual layers, Contour and Background, whilst the Masking Layer underneath is an intermediate processing layer that affects the data layer below it. See Fig. 2.11 for a graphical explanation. The toolbox can also display concurrent spatial information by the use of overlays - layers that sit above or below the data.
   
In the Masking Layer, click on the second button from the left (showing \fbox{None}), and select the ``$ >$'' option. Now we can mask the Data layer by using the Masking layer above. This creates a mask from a given dataset and then applies it to the dataset in the Data layer.
   
Click on the \fbox{Sum of Coefficients} button in the Masking layer and select Activation Strength from the pop-up list. We will choose to define the mask using the Activation Strength dataset, although any of the others could be used to give different masks.
   
Using the slider control in the Masking layer, adjust the threshold to around 0.96. You can use the edit box immediately to the left to type in 0.96 if you prefer. We can now adjust the size of the mask by adjusting the thresholding limit. This can be done by specifying either an absolute or fractile value. We'll use the latter, which is the default.
   
In the Background Layer, click on the first button to the right of the Background label. This turns the layer on. Now click the \fbox{Sum of Coefficients} button and select the Mean (data) dataset to display the anatomical data. It would be more useful if we could now see this thresholded data overlaid onto the original data.
   
Click on the button immediately to the right of the Contour label to activate the contour layer. Then click on the \fbox{Sum of
Coefficients} button and select the Activation strength dataset from the pop-up list. To see how far this threshold is from the rest of the data, we can now overlay a contour layer of the full Activation strength dataset. Note how you can now see that if you decreased the mask threshold, then the peak at [x = 31, y = 1, z = 27] will be the next to show up. The contour layer can also be used to compare different variables from the same result set. This allows a comparison of methods for highlighting the activated regions.
   
In the main window, below the Analysis pane, is the Post-processing section. Meta-K-means should already be selected. Click on the \fbox{Parameters} button to bring up the options dialog box. Make sure that the Parameter Variables Set is set to the FIR filter results. The other initial settings should should already be sensible. Click \fbox{Close} once you have finished. Next, we can cluster the actual parameters of the FIR filter - a Meta K-means clustering of the results. This enables us to look for patterns in the result dataset.
   
Click on the \fbox{Calculate} button. The post-processing analysis can then be started, with feedback on the progress given on the status line.
   
Once the calculation is finished, click on the \fbox{View results} button to bring up the triple-set of viewing windows. The results are viewed in the same way as the main analysis results.
   
Click on the \fbox{Time} button in the Time layer and select the Cluster mean seq. from the pop-up list. The Time window will now show an additional red line representing how the mean of the cluster that the selected voxel is a member of varies with time. The data can then be analysed using the same techniques as for the main anaylsis results. The Volume window shows the voxels in their correct locations, but with the colour indicating their cluster membership. Note how the voxels near the upper left of the image [around x = 31, y = 1, z = 34] are members of the same cluster, and that the mean of this cluster most closely follows the time series.
   
In the main window, click on the \fbox{Save Worksheet} button in the seventh pane. The entire workspace is then saved into the file lyngby_workspace.mat, located in the directory from which lyngby was started. Once the results have been analysed, you will probably want to save them. In Matlab, you are able to save the entire variable and result set into a single file which can then be reloaded at a later date without having to re-specify all the data loading parameters.
   
Click on the \fbox{Save Data\ldots} button to bring up the standard four layers plus the extra Save layer Alternatively, you may want to save a subset of the results. The toolbox has a new save layer which can be used for this purpose.
   
Click on the first button on the Save layer and select the Sequence option. On the second button, select the Matlab Binary option. Type in a filename into the edit box and then press the \fbox{Save here!}. As an example, we will save the time-sequence for the current voxel. Other options allow you to save the present slice, or the entire volume.
   
Click on the \fbox{Exit!} button and the lyngby main window will disappear. Once you have finished using the GUI, just close it. All the variables will still be accessible from the command line.
   
On the command-line, type:
>> lyngby_ui_global
To make the results and variables visible to the command-line you will need to make them all global. You can also do this whilst the GUI is still open.
   
In the command-line, type:
>> whos
This will then display all the variables as used in the calculations. You can now access the individual results and variables.
   

Finn Aarup Nielsen
2006-08-14