Tutorial of the fMRI Submission Interface
Introduction
This document describes how to enter a typical fMRI experiment in
the submission interface for the NeuroGenerator project. It is not
possible to write a document which describes every kind of experiment
and how to enter them, but this tutorial will hopefully help you
to understand the concepts of the submission interface. You can always
ask us if you need help. The experiment described here is only an example
and not a real experiments in the database.
The experiment structure
The NeuroGenerator database has a hierarchic structure of the
experiment structure which looks like this:
EXPERIMENT
|
SUBJECT
|
SESSION
|
REPETITION/BLOCK
|
CONDITION/TRIAL
|
EVENT
Experiments are on the top level. Each experiment has several subjects
and each subject has several sessions. The conditions performed in the
experiment are described as single trials and each such trial is
described in terms of one or more events.
When entering a block/epoch related design, the conditions are entered as
block of trials in each session. In such a block, only trials of the same
condition may be entered. The blocks are modelled as effects om the analysis
and not the trials.
An event related design is very similar, but here we do not enter the
conditions as block of trials. Instead, they are entered as single trials.
The conditions must be defined before entering any information into the
sessions. A condition is treated as a definition of one trial in the experiment.
We are going to see an example of this later on in the tutorial. Each condition
is described in terms of events, and each such event is described in terms of
keywords. There are keywords for almost any kind of event you want to model,
for instance 'somatosensory' and 'visual'.
An example
Say we have an experiment in which we want to analyse which areas in the brain
that are active during a visual working memory task. In this experiment we have two
different conditions; one working memory condition and one control condition.
Entering conditions and events
The working memory condition is defined by three events and lasts for 8 seconds.
The first event is a visual event showing a picture of a pattern and it has a
duration time of 2 seconds. Then, a memory event takes place in which the subject
should hold this image in memory for 3 seconds. After that, a second visual
event takes place which shows a new image for 3 seconds. The subject should decide
if this image is the same image as the first one and make a response by pressing
the right or the left button with the index finger. This is done in the response
event. Due to the
reaction time we assume that the response event starts 1 second after the
last visual stimulus and has a duration time of 1 seconds. This is an approximation
of course since it varies between subjects and trials.
To enter this condition in the submission interface, press the 'Define condition/trial'
button:

Fig 1: The define and create buttons
You will get an empty condition/trial window where you should define a trial of
this condition. A good start is to name the condition. It is automatically named
'trial1' as this is the first condition or trial we are defining. Let us call
it 'working memory' and give it a duration time of 8 seconds:

Fig 2: The condition window
What if the trials have different duration times during the experiment? It
is always possible to enter the duration time for each trial in the experiment or
the duration time for each block of trials. If you have a fix duration time, as in
this case, you can enter it here. If the duration time varies you
should enter the most common duration time.
The first event that we will enter is a visual event, i.e. a stimulus. Pressing
the 'stimuli' button gives us an event window. This event is automatically given
the name 'event1' but we will change it to 'visual' and give it a duration time
of two seconds. The start time is relative the onset times of the trials and
should remain zero for this event:

Figure 3: The event window
Each event has a set of keywords describing what is happening. By pressing
the 'Select keyword' button, you will get a menu of keywords to select from. Let
us assume that the images shown are some kind of pattern, hence we choose the
'stimulus/visual/character/pattern/geometrical' keyword. When choosing this, we
get a lot of keywords associated with this keyword which we also need to set,
for instance if it's moving or not. This is a perfect example of why to enter
this detailed description of each single event. When you get your copy of the
database you will be able to query
for all experiments having events with a visual movement and see if they overlap
with area V5 (which should be activated for a visual movement stimulus).
There are a lot of keywords to choose from
and we will not look at each one of them, but if you
have a question of a certain keyword you can always write to us. Figure 4 shows
all the keywords that are entered for this particular event. It is worth to mention
that some keywords will ask for information, for instance the
keyword 'field of views degrees' in which you should tell the field of view in degrees
of this particular visual stimulus:

Figure 4: All keywords entered for the 'visual' event
If we are not satisfied with the keywords, we can give a suggestion by pressing
the 'suggest own keywords' checkbox. When doing so, a text area will show up
at the bottom of all the keywords in the event window.
All the changes done in the event window will be done when you make them and
the 'OK' button will only close the window. We can always go back to this event
later on. It is now possible to see the event in the condition window and in the
condition tree on the
left side of the submission interface:

Figure 5: The updated condition window and condition tree
The next event is an event of higher cognition which we call a 'think event'.
It has a duration time of 3 seconds and its start time is 2 seconds. In this
particular case there is no need to select a keyword from the keyword menu as
we did before. This is how the event window will look like:

Figure 6: The memorize event
The visual event that comes after the memorize event is equal the first visual event in
terms of keywords. The submission interface has a copy feature which is enabled
by pressing the right mouse button on the event to be copied. An event may be copied
to the same condition or another condition:

Figure 7: Copy the event
We choose to copy this event to the 'working memory' condition. The condition
tree is updated with the new event. The new event is called 'copy of visual':

Figure 8: The condition tree
We get the event window for the new event by pressing the left mouse button on
the new event. We want to change the name to 'visual', the start time to 5 seconds,
and the duration time to 3 seconds:

Figure 9: The second visual event
Finally, we enter the response event. This event starts at 7 seconds and
has a duration time of 1 second. The start time and duration time of the
events of a condition is not of importance for the analysis and we cannot
give an exact time stamp for each event in every trial since the start time
and the duration time may vary. Hence, the
events will only give a rough description of the condition. In a block design
experiment, where we have blocks of trials, it is not even necessary to give
an exact time stamp for each trial in a block. The experiment should be entered
as an event related design if the start time and duration time is of importance
for each event in the study. In that case, every event is entered as a condition
having one event only, thus giving a one to one relationship between condition
and event.
After adding the response event in the same manner as before, we are done with
the working memory condition. The condition window should look like this:

Figure 10: The working memory condition
The control condition is very similar to the working memory condition. The only
difference is the memorize event, which does not occur during the control condition.
Instead of starting from scratch, we can copy the working memory condition, remove
the memorize event and call it 'control'. This is done the same manner as when we
copied an event; press the right mouse button on the condition node in the condition
tree and you will get a menu where you can choose to copy or remove this condition.

Figure 11: Copy a condition
The new condition is called 'copy of working memory'. By pressing the left mouse button
on this condition, we get the condition window with this condition. Removing the memorize
event from this new condition can be done in two ways. The easiest way is to press the
right mouse button on the memorize event in the condition tree for the new condition, just
as we did before when we made a copy of an event, and then choose 'remove' in the popup-menu
instead of 'copy to'. The other way is to bring up the event window for this event, by pressing
the left mouse button on this event in the condition tree, then delete the event by pressing
the delete button in the event window. The new condition should look like this when we are done:

Figure 12: The new 'control' condition
Besides the 'working memory' condition and the 'control' condition, we do also have a baseline
which occurs when nothing else is happening during the session. Even though this condition should
not be modelled as a separate condition in the analysis (read for instance "Functional MRI, an
introduction to methods" by Jezzard, P et.al.), it is nice to have a description of it in the
database as it may affect meta analysis done on a set of experiments. As a submitter you will also
become a user of the database and you probably want to know what is going in during the baseline
if you look at a set of experiments.
The baseline is entered as yet another condition, but we will be able to explicitly tell that
this condition is in fact a baseline when entering all the conditions to a session. For now we
just create another condition. In this experiment, the baseline is just a rest condition in
which the subject had the eyes fixated on a hair cross and the ears plugged to reduce noise.
The duration time of this condition, even though asked for, is of no concern when used as
baseline. The condition inherits the duration time from the previous entered condition, thus
getting a duration time of 8 seconds. That is ok.
A 'rest' event differs from all the other events we can enter (stimulus, response and think).
A condition with a rest event cannot have any other event. Hence, you do not have to enter
a start time and a duration time for this event. This way, we get a one to one relationship
between a rest event and a rest condition, i.e. a rest condition is the same as a rest event.
We cannot enter a rest event if there are other events already entered into this condition.
When pressing the rest event button in the condition window, the condition window will look
like this:

Figure 13: The rest condition
The event window showing the rest event will look like this:

Figure 14: The rest event
After changing the names of the rest condition and the rest event (we want to call them rest), the
condition table should look like this:

Figure 15: The condition table showing all conditions and events
Entering subjects
The conditions are now defined, but we have not yet entered any information when they occur
in the experiment. This may be different for different subjects and/or different sessions
within a subject. We need to start with creating a subject, which is done by pressing the
'create subject' button. The subject window with this subject is now visible on the screen:

Figure 16: The subject window
Subject information
The first folder contains some basic information about the subject which you need to enter.
Year of birth should be entered with four digits, e.g. '1973'. The subject attributes table
can be ignored for this experiment, as it is only used for group studies, i.e. when we want
to compare one group of subjects to another.
Sessions
The sessions folder contains a table of all sessions for this subject. The move up and move
down buttons allow you to change the order of the sessions in the table. The set property
button opens a session window with the session that you have marked in the table. All the
sessions will show up in the subject tree and you can get the session window for a certain
session by pressing the left button in the tree, just as we did with the conditions and the
events in the condition tree. Finally, the 'create new session' creates a new session for
this subject.
Entering sessions
Let us assume that this subject did three equal sessions. When pressing the 'create new session'
button, you should get a session window with the first session:

Figure 17: The session window
We do not need to enter the scanner time since this information will be obtained from the
number of images for this session and the TR setting in scanner settings. Let's say that
the session time is 210 seconds. In this experiment,
the trials of the conditions was entered as blocks, each block having a duration time of
30 seconds and 3 trials. Remember that the condition duration time was 8 seconds, and we
should get a duration time of 8*3=24 seconds for a block of 3 trials of this condition. However,
by entering 30 seconds we allow a small time between the trials in this block. It is of no
importance for the analysis when the trials occur within this block, so all we need to enter
is how many trials we have within a block, the start time and the duration time.
In this experiment, the 'working memory' block has a duration time of 30 seconds, 3 trials within each block
and starts at these time points:
30 150
The 'control' block has also a duration time of 30 seconds and 3 trials within each block. It starts
at these time points:
90 180
Let's start with entering the first condition. We choose the condition which we want to enter and
how we want to enter it (as trials or blocks of trials):

Figure 18: Tell how to enter the condition
Now we can enter the onset times (i.e. the start time for each block), the duration times for
each block, and the number of trials for each block. This is done like this:

Figure 19: Enter onset times, duration times and number of trials for 'working memory'
The list of values can be imported from an ascii file (press the 'import' button).
Notice that we only need to enter 'trials/block' once.
If you have a lot of blocks and the
same number of trials in each block, you only need to tell this once. However, if you have
for instance 4 trials in the second block, you would need to tell this specifically like
this:

Figure 20: Enter number of trials when the amount is different for the blocks
Since we defined that the duration time for the condition is 8 seconds, it is obvious that
4 trials will not fit within a block of 30 seconds. Once again, the condition definition
should be seen as a rough description of how a typical trial of this condition might be.
The analysis is done on the blocks and only considers the start time and the duration time
of these blocks.
The trials table should now look like this:

Figure 21: The trials table
The table shows that there are 3 trials per block (working memory*3). After adding the
control condition in the same manner, the table should look like this:

Figure 22: The trials table with all the blocks
There are some periods of time where we do not have any kind of activation and this is what we
call the baseline. In this experiment, the baseline is a rest condition and we just
select this condition as our baseline. We are now done and the window should look like
this:

Figure 23: The session as it should look like
There is another folder in the session window called 'Attributes'. We did not look at
this when entering the conditions and the events. It is possible to enter an attribute
on each condition or each event which describes something of interest for the analysis,
for instance reaction time. The attribute could tell how much a certain trial or
block of trials should be modelled in the linear model. We do not have any attributes
in this example and we will therefore skip that part. If the analysis of your experiment
need this information, please write to us and we will help you. You can always get help
inside the submission interface by pressing the help buttons:

Figure 24: The help button
Pressing the 'OK' button will close the window. The subject window and the subject tree
is updated with the new session:

Figure 25: The new session in the subject window and the subject tree
The subject has three sessions, each session equal to the others. Hence, we want to
copy the session we already made. This can be done just the same way as when one
copies events and conditions, i.e press the right button on the session in the
subject tree and choose 'copy to subject1'. We will do this twice. Then we should
change the names of the copies to 'session2' and 'session3' (open each copy and
change the name). We are done and the subject tree should look like this:

Figure 26: All the sessions for this subject
Scanner settings
Every session has a scanner setting. In most cases the scanner setting should be the same
for all the sessions and all the subjects. We have entered three sessions and the scanner
setting table looks like this:

Figure 27: The scanner settings table
As you see, the scanner setting is undefined for all sessions. We have not yet made a
scanner setting. We do this by pressing the 'make new setting' button and we get the
scanner setting window:

Figure 28: The scanner setting window
The TR and TA should be entered in seconds. TA is the 'time of acquisition', i.e. the
time it takes from the first slice to the last slice. TR is the time resolution. Hence,
the time when nothing is scanned, i.e. the time between two images, is TR-TA. Hopefully
this window is self explained, but I will explain it in more detail in a future version
of this tutorial. As always, write to us if you have questions. When done with the
scanner setting, press the OK button in the window.
If you want to mark several sessions in the scanner setting table, mark the first session,
press the shift button and mark the last session. Release the shift button when done. The
table should look like this:

Figure 29: The sessions are marked
Now, press the 'Set scanner setting' button. You will get a popup menu with all the
scanner settings defined. We have only defined one setting and we choose that one.
When done, you should get this table:

Figure 30: The scanner settings are set for each session
Images
Each subject has one anatomical MR images and a set of functional MR images for
each session. Different scanners stores the data in different formats and even
the file structure may be different. The default version of the submission interface
assumes that all the files belonging to a certain session are in a specific directory.
It might be necessary to adjust the submission interface to your scanner setting. If
you cannot enter your data the way it is done in this tutorial, please send us an
email and describe how you want to enter your data. We do also need a description of
the file structure on your laboratory.
The anatomical MR image is entered as a file list of one or several files. The table
looks like this:

Figure 31: The anatomical MR image table
Pressing the 'add files' button gives you a file browser window. You can select several
files the same way you did to select several sessions in the scanner setting table.
The images are added to the table when you are done.
The functional MR image table works in the same manner, except that you enter directories
instead of files, one for each session. All the files for one session are in the corresponding
directory. There are also two buttons to change the order
of the directories:

Figure 32: The functional MR image table
The name "image" of the second column is a little bit confusing, since you add a lot of images
on each session. However, you can see each session as a 4D image divided into one or several
files in one directory per session.
Copy subjects
Subjects can be copied just like everything else, i.e. by pressing the mouse button when the
mouse pointer is on the subject to be copied, then choose 'copy' in the popup menu. The files
are not copied because they are specific for each subject, but everything else (including the
sessions) are copied.
Entering an interpretation
We are now finished with the experiment structure and should now enter an interpretation of
this experiment. We can enter several interpretations if we like, but in this experiment we
have only one interpretation. The interpretation folder looks like this:

Figure 33: The interpretation folder
There is an interpretation tree and there is a 'create new interpretation' button in this
folder.
Subjects folder
Pressing the button gives us an interpretation window which looks like this:

Figure 34: The interpretation window
We start by selecting the subjects which we want in this interpretation. In this case,
we want them all. The left table lists all the subjects in the experiment, while the
right table lists all the subjects in this interpretation. We add the subjects by
pressing the add button and remove them by pressing the remove button. The tables should
look like this:

Figure 35: Subject tables
Contrasts folder
The next folder looks like this:

Figure 36: Contrasts
We want to analyse the difference in activation between the 'working memory' condition and the 'control'
condition, but we also want to see the difference in activation between the 'working memory' condition
and the baseline, and between the 'control' condition and the baseline. Hence, we want to make three
contrasts to the general linear model:
CONTRAST1 = WORKING_MEMORY - CONTROL
CONTRAST2 = WORKING_MEMORY - REST
CONTRAST3 = CONTROL - REST
We start by pressing the 'Add contrast' button. We get a window which asks us for a short name of this
contrast. Let us call the first contrast 'wm-control'. A new row is added to the table:

Figure 37: Contrast table
The row should be
1.0 0.0 -1.0
since we want to subtract control from working memory. To change the value in a cell, double click on
it and enter the new value. The same thing should be done with all the contrasts. This is how it looks
like when we are done:

Figure 38: The contrasts for this experiment
Notice that we do not enter '-1' in the rest cells. It does not really matter and it is ok if you choose
to do so. The rest condition is never modelled in the general linear model and this value is never considered
for that reason.
Statistical Parametric Maps folder
The next folder in the contrasts folder
is the Statistical Parametric Maps. If you have done your own analysis, it is nice if you
can send us the result so that the analysis done by the database can be compared with your results. The
submission interface does not require you to submit your results, but it is easier for you and for us if
you do submit them. Hence, for each contrast you should enter a file. This file can be in analyze-, minc-
or vff-format. You should also tell which standard brain you use and which distribution you have on the
images:

Figure 39: Statistical Parametric Maps table
Filter & Normalization folder
In the final folder we should give information about the spatial filter type and filter size and if
we want to use slice timing. If we want to use slice timing, we should give a suggestion of which
reference slice to use. This folder looks like this:

Figure 40: Filter & Normalization folder
Submitting
We are finally done and can submit the experiment. It is a good idea to save the experiment first. Submitting
is done from the File menu. Choose 'Send experiments to PDC...'.
It might take some minutes to contruct the list of files to submit. You cannot use the submission interface
during this time, and it might look like it is dead. You will get a progress bar when the actual submission starts.