# Presentation: 071733

## Using AFNI Interactively — More details than you want to know

- Using** ****AFNI**** **Interactively — More details than you want to know

- Start AFNI from the command line
-  **afni** reads datasets from the current directory
-  If no datasets in current directory, tries to read sub-directories 1 level deeper
-  **afni dir1 dir2** ... reads datasets from directories listed
** ****afni -R**  reads datasets from the current directory and from all directories below it
- AFNI reads the file named **.afnirc** from your home directory, if it is present
- This file is used to change many of the defaults (cf. File **README.environment**)

**AFNI controller window at startup**

**Markers control transformation to +acpc and +tlrc coordinates **

**Controls color functional overlay **

**Miscellaneous menu items **

**Switch between directories, underlay (anatomical) datasets, and overlay (functional) datasets**

**Switch to different coordinate system **

**Controls display of overlaid surfaces **

**Coordinates of current focus point**

**Control crosshairs appearance**

**Time index**

**Open images and graphs of datasets**

**Open new AFNI controller**

**Help for Buttons**

## Miscellaneous features of the AFNI controller window:
 xyz-coordinate display in upper left corner shows current focus location
By default, the coordinates are in RAI order (from the DICOM standard):
 x  =  Right (negative) to Left (positive)
 y  =  Anterior (negative) to Posterior (positive)
 z  =  Inferior (negative) to Superior (positive)
This display order can be changed to the neuroscience imaging order LPI:
 x  =  Left (negative) to Right (positive)
 y  =  Posterior (negative) to Anterior (positive)
 z  =  Inferior (negative) to Superior (positive)
 Right-click in coordinate display to change the coordinate order
The [Bhelp] button: when pressed, the cursor changes to a hand shape; use it to click on any AFNI button and you will get a small help popup
AFNI also has ‘hints’ (AKA ‘tooltips’)
Press the [New] button to open a new AFNI controller
Used to look at more than one dataset at a time
 [Define Datamode]  [Lock] can be used to lock controllers together by coordinates
All viewing windows within a controller are always locked together
Press the [Views] button to close/open the control panel at right
Button with inverted colors means that control panel or window is open

* **xyz*-coordinate display in upper left corner shows current focus location
- By default, the coordinates are in _RAI_ order (from the DICOM standard):
* **x*  =  _R_ight (negative) to Left (positive)
* **y*  =  _A_nterior (negative) to Posterior (positive)
* **z*  =  _I_nferior (negative) to Superior (positive)
- This display order can be changed to the neuroscience imaging order _LPI_:
* **x*  =  _L_eft (negative) to Right (positive)
* **y*  =  _P_osterior (negative) to Anterior (positive)
* **z*  =  _I_nferior (negative) to Superior (positive)
-  Right-click in coordinate display to change the coordinate order
- The** [**_**Bhelp**_**]** button: when pressed, the cursor changes to a hand shape; use it to click on any AFNI button and you will get a small help popup
- AFNI also has ‘hints’ (AKA ‘tooltips’)
- Press the **[**_**New**_**]** button to open a new AFNI controller
- Used to look at more than one dataset at a time
-  **[**_**Define Datamode**_**]** **** **[**_**Lock**_**]** can be used to lock controllers together by coordinates
- All viewing windows within a controller are *always* locked together
- Press the **[**_**Views**_**]** button to close/open the control panel at right
- Button with inverted colors means that control panel or window is open

## Press the [done] button twice within 5 seconds to exit AFNI
The first button press changes ‘done’ to ‘DONE’
Fail to press second time in 5 seconds: it changes back to ‘done’
Whatever you do, don’t press a mouse button in the blank square to the right of [done]
We won’t be responsible for the consequences
The [Switch] buttons let you control which datasets are being viewed
 [Switch Session] controls which directory datasets are viewable
 All datasets in same directory are assumed to be aligned in space
 Any dataset can be the underlay; any dataset can be the overlay
 [Underlay] control the background (grayscale) dataset — anatomical dataset usually goes here
Current underlay dataset determines the resolution of and 3D region covered by image viewers
 [Overlay] controls the overlay (color) dataset — functional (statistical) dataset usually goes here
Functional datasets will be interpolated — if needed — to the underlay resolution, and flipped — if needed — to that orientation
Interpolation method controlled in [Define Datamode] panel
 Current datasets are named in AFNI controller titlebar: look at it!

- The first button press changes ‘**done**’ to ‘**DONE**’
- Fail to press second time in 5 seconds: it changes back to ‘**done**’
- Whatever you do, *don’t* press a mouse button in the blank square to the right of **[**_**done**_**]**
- We won’t be responsible for the consequences
- The **[**_**Switch**_**]** buttons let you control which datasets are being viewed
-  **[**_**Switch Session**_**]** controls which directory datasets are viewable
-  All datasets in same directory are assumed to be aligned in space
-  Any dataset can be the underlay; any dataset can be the overlay
-  **[**_**Underlay**_**]** control the background (grayscale) dataset — anatomical dataset usually goes here
- Current underlay dataset determines the resolution of and 3D region covered by image viewers
-  **[**_**Overlay**_**]** controls the overlay (color) dataset — functional (statistical) dataset usually goes here
- Functional datasets will be interpolated — if needed — to the underlay resolution, and flipped — if needed — to that orientation
- Interpolation method controlled in **[**_**Define Datamode**_**]** panel
-  Current datasets are named in AFNI controller titlebar: look at it!

##  Dataset “chooser” window
 List of datasets available in the current directory
 Left column has prefix names of datasets
 Right column has a little information about each dataset
 How dataset was classified in to3d
 Number of sub-bricks

-  List of datasets available in the current directory
-  Left column has prefix names of datasets
-  Right column has a little information about each dataset
-  How dataset was classified in **to3d**
-  Number of sub-bricks

-  _To choose a dataset_
-  Click on label, or scroll with mouse scroll-wheel, or use keyboard arrows
-  Press **[**_**Apply**_**]** button to select the highlighted dataset, and also keep the chooser window open
-  Press **[**_**Set**_**]** button to select the highlighted dataset, and also close the chooser window
-  For the advanced and highly intellectual user:
-  Set environment variable **AFNI_DATASET_BROWSE** to **YES** to have AFNI switch to that dataset immediately upon selection (don’t need to use **[**_**Apply**_**]** or **[**_**Set**_**]**)
-  Environment variables can be set in your **.afnirc** file, or by using the **[**_**Edit Environment**_**]** control panel (cf. **[**_**Define Datamode**_**]** **** **[**_**Misc**_**]**)

## The [RescanTh] button checks the session (data directory) that you are currently working in for new datasets
Use this feature when when you create a new dataset using a command line program (like 3dcalc) outside of the AFNI interface, and then want to see it
 [RescanTh] same as [Define Datamode]  [Rescan This]
This duplicate button added 02 Feb 2007 in response to AFNI workshop users from Princeton University
If you set AFNI_RESCAN_AT_SWITCH to YES, then [RescanTh] is done whenever you press [Underlay] or [Underlay]
The [NIML+PO] button tells AFNI to start listening for TCP/IP (network socket) connections from external programs
SUMA = SUrface MApper
Can exchange data with AFNI for two-way interactive display of data on cortical surface models in SUMA and in 3D volumes in AFNI
plugout_drive
Program can send commands to AFNI that act like button presses in the AFNI controller windows
Example: You can write a script (a list of commands) to make AFNI open image windows, and save an image window to a JPEG file
You can write your own program to connect to AFNI and send data and send commands (if you are a programmer, that is)
 [NIML+PO] duplicates buttons on [Define Datamode]  [Misc] menu — also added on 02 Feb 2007

- Use this feature when when you create a new dataset using a command line program (like** ****3dcalc**) outside of the AFNI interface, and then want to see it
-  **[**_**RescanTh**_**]** same as **[**_**Define Datamode**_**]**** ******** ****[**_**Rescan This**_**]**
- This duplicate button added 02 Feb 2007 in response to AFNI workshop users from Princeton University
- If you set **AFNI_RESCAN_AT_SWITCH** to **YES**, then **[**_**RescanTh**_**]** is done whenever you press **[**_**Underlay**_**]** or **[**_**Underlay**_**]**
- The **[**_**NIML+PO**_**]** button tells AFNI to start listening for TCP/IP (network socket) connections from external programs
**SUMA** = SUrface MApper
- Can exchange data with AFNI for two-way interactive display of data on cortical surface models in SUMA and in 3D volumes in AFNI
**plugout_drive**
- Program can send commands to AFNI that act like button presses in the AFNI controller windows
- Example: You can write a _script_ (a list of commands) to make AFNI open image windows, and save an image window to a JPEG file
- You can write your own program to connect to AFNI and send data and send commands (if you are a programmer, that is)
-  **[**_**NIML+PO**_**]** duplicates buttons on **[**_**Define Datamode**_**]**** ******** ****[**_**Misc**_**]**** **menu — also added on 02 Feb 2007

## The Define Datamode Control Panel

- The **Define Datamode** Control Panel

- How to get data
- from 3D array to
- 2D image slices
- for display

- Write copies of
- datasets to disk

- Re-read sessions
- (directories) to look
- for new dataset files

- Lock AFNI controller
- viewpoints together
- (in space and time)

- Menu of AFNI
- plugins

- Menu of
- miscellaneous commands

- 3D-to-2D
- interpolation
- methods

## Lock Menu

**Lock** Menu

**Misc** Menu

- Show dataset info

- Save AFNI
- GUI setup

- Popup hints?

- Settings for AFNI GUI

- Which AFNI controllers are locked together
- in *xyz* coordinates

- Lock Time Index also?

- Debugging

- Show some
- informational
- messages

- Clear datasets
- from RAM

**N.B.**: There is only one lock

**N.B.**: Most menus can be “torn off”

## Touring the Image Viewer

- Image viewer window                      **Disp**      and    **Mont** control panels

## Crosshairs in image window show current focus location (=xyz in AFNI controller)
Also show the cut planes for the other image viewers
When using image montage, other viewers show multiple crosshairs
Can control crosshair color and gap size from main AFNI controller
Slider below image lets you move between slices
Left-click and drag ‘thumb’ to move past many slices
Left-click ahead or behind thumb to move 1 image at a time
Hold button click down to scroll continuously through slices
Middle-click in ‘trough’ to jump quickly to a given location
Mouse scroll-wheel action when cursor is over image also changes slices
Vertical intensity bar to right of image shows mapping from numbers stored in image to colors shown on screen
Bottom of intensity bar corresponds to smallest numbers displayed
Top corresponds to largest numbers displayed (popup hint shows numerical range)
Smallest-to-largest display range is selected from [Disp] control panel
or from hidden right-click popup menu on intensity bar
All image viewers from all AFNI controllers use the same intensity bar
so when you change intensity scale in one viewer, all others viewers change
unless AFNI is started with the -uniq command line option, in which case each AFNI controller’s viewers have independent intensity bars
but all image viewers from same controller always share same intensity bar
Mouse scroll-wheel action when cursor is over intensity bar changes contrast

- Also show the cut planes for the other image viewers
- When using image montage, other viewers show multiple crosshairs
- Can control crosshair color and gap size from main AFNI controller
- Slider below image lets you move between slices
- Left-click and drag ‘thumb’ to move past many slices
- Left-click ahead or behind thumb to move 1 image at a time
- Hold button click down to scroll continuously through slices
- Middle-click in ‘trough’ to jump quickly to a given location
- Mouse scroll-wheel action *when cursor is over image* also changes slices
- Vertical intensity bar to right of image shows mapping from numbers stored in image to colors shown on screen
- Bottom of intensity bar corresponds to smallest numbers displayed
- Top corresponds to largest numbers displayed (popup hint shows numerical range)
- Smallest-to-largest display range is selected from **[**_**Disp**_**]**** **control panel
- or from hidden right-click popup menu on intensity bar
- All image viewers from all AFNI controllers use the same intensity bar
- so when you change intensity scale in one viewer, all others viewers change
- unless AFNI is started with the **-uniq** command line option, in which case each AFNI controller’s viewers have independent intensity bars
- but all image viewers from same controller always share same intensity bar
- Mouse scroll-wheel action *when cursor is over intensity bar* changes contrast

## Buttons at right of image viewer window
 [Colr] changes grayscale to color spectrum, and back (fun & useless)
 [Swap] swaps top of intensity bar with bottom
 [Norm] returns the intensity bar to normal (after you mess it up)
 [c] controls contrast
 [b] controls brightness
Useful combination  [c]  2-3 times,  [b]  2-3 times
 [R] rotates the intensity bar (also fun & useless)
 [g] changes the gamma factor (nonlinearity) for the intensity bar
 [i] changes the size of the image in the window
 [9] changes the opacity of the color overlay
This control only present for X11 TrueColor displays
 [z] zooms out and in
 [pan] lets you pan around when zoomed in
 [crop] lets you crop the image viewing area
At bottom right, the arrowpad controls the crosshairs
Arrows move 1 pixel in that direction for that window
Sagittal  is same as Axial  
Central button closes and opens crosshair gap (for fine control of where the crosshairs are)
Items on AFNI controller (below xyz display) also alter crosshairs
Can change color, gap size, ...

-  **[**_**Colr**_**]** changes grayscale to color spectrum, and back (fun & useless)
-  **[**_**Swap**_**]** swaps top of intensity bar with bottom
-  **[**_**Norm**_**]** returns the intensity bar to normal (after you mess it up)
-  **[**_**c**_**]** controls contrast
-  **[**_**b**_**]** controls brightness
- Useful combination  **[**_**c**_**]**  2-3 times,  **[**_**b**_**]**  2-3 times
-  **[**_**R**_**]** rotates the intensity bar (also fun & useless)
-  **[**_**g**_**]** changes the gamma factor (nonlinearity) for the intensity bar
-  **[**_**i**_**]** changes the size of the image in the window
-  **[**_**9**_**]** changes the opacity of the color overlay
- This control only present for X11 TrueColor displays
-  **[**_**z**_**]** zooms out and in
-  **[**_**pan**_**]** lets you pan around when zoomed in
-  **[**_**crop**_**]** lets you crop the image viewing area
- At bottom right, the arrowpad controls the crosshairs
- Arrows move 1 pixel in that direction _for that window_
- Sagittal  is same as Axial 
- Central button closes and opens crosshair gap (for fine control of where the crosshairs are)
- Items on AFNI controller (below *xyz* display) also alter crosshairs
- Can change color, gap size, ...

## Buttons along bottom of image viewer window provide various services
 [Disp] controls the way images are displayed and saved
Pops up its own control window: most controls change image immediately
 Orientation controls at top allow you to flip image around
 [No Overlay ] lets you turn color overlays off (crosshairs; function)
 [Min-to-Max]  intensity bar is data min-to-max
 [2%-to-98%]    intensity bar is smallest 2% of data to largest 98%
Avoids having a few very bright voxels dominate intensity scaling
 [Free Aspect] lets you distort image shape freely
Otherwise, AFNI tries to keep image shape “true” as you stretch/shrink window
 [Save panel] controls how images are saved to disk:
 All buttons off   saved image file contains slice raw data (not what you want)
 [Nsize Save]  same, but images are 2N in size
 [PNM Save]  images are saved in PPM/PGM format (color/gray)
 [Save to .xxx(s)]  saves image(s) to specified format
 [Save One]  for saving montage
 [Tran 0D] lets you transform voxel values before display
 [Log10] and [SSqrt] useful for images with extreme values
 [Tran 2D] provides some 2D image filters (underlay only)
 [Median 9] smoothing can be useful for printing images
 [Rowgraphs] lets you graph the voxel values from image rows
 If you want columns, flip the image with [CCW 90]
 [Surfgraph] lets you graph the voxel values in a surface graph

-  **[**_**Disp**_**]** controls the way images are displayed and saved
- Pops up its own control window: most controls change image immediately
-  Orientation controls at top allow you to flip image around
-  **[**_**No Overlay**_ **]** lets you turn color overlays off (crosshairs; function)
-  **[**_**Min-to-Max**_**]**  intensity bar is data min-to-max
-  **[**_**2%-to-98%**_**]**    intensity bar is smallest 2% of data to largest 98%
- Avoids having a few very bright voxels dominate intensity scaling
-  **[**_**Free Aspect**_**]** lets you distort image shape freely
- Otherwise, AFNI tries to keep image shape “true” as you stretch/shrink window
-  **[**_**Save panel**_**]** controls how images are saved to disk:
-  All buttons off   saved image file contains slice raw data (not what you want)
-  **[**_**Nsize Save**_**]**  same, but images are 2*N* in size
-  **[**_**PNM Save**_**]**  images are saved in PPM/PGM format (color/gray)
-  **[**_**Save to .xxx(s)**_**]**  saves image(s) to specified format
-  **[**_**Save One**_**]**  for saving montage
-  **[**_**Tran 0D**_**]** lets you transform voxel values before display
-  **[**_**Log10**_**]** and [_**SSqrt**_**]** useful for images with extreme values
-  **[**_**Tran 2D**_**]** provides some 2D image filters (underlay only)
-  **[**_**Median 9**_**]** smoothing can be useful for printing images
-  **[**_**Rowgraphs**_**]**** **lets you graph the voxel values from image rows
-  If you want columns, flip the image with **[**_**CCW 90**_**]**
-  **[**_**Surfgraph**_**]** lets you graph the voxel values in a surface graph

## Three extra imaging processing filters are provided at the bottom
 [Sharpen] is sometimes useful for deblurring images
 [Reset] sets controls back to what they were when you opened [Disp]
 [Done] closes this control window
 [Save] lets you save images from viewer to disk files
Warning: Images are saved as sent to the viewer, not as displayed
Means that aspect ratio of saved image may be wrong (non-square pixels)
Can fix this with [Define Datamode]  [Warp Anat on Demand]
Or by setting AFNI_IMAGE_SAVESQUARE to YES
 [Save:bkg] means it will save the background image data itself, whatever the format it may be in (bytes, shorts, floats, complex numbers, RGB byte triples)
 [Save:pnm] means it will save the displayed image in PNM format
PPM for color, PGM for gray-only images
You might have to convert this to some other format
See AFNI FAQ #57 for instructions on image format conversion
 [Sav1:xxx] means it will save the entire Montage in format “xxx”
This is the only way to save a Montage layout (within AFNI)
 [Save] options will only save single slice images (one or more)
 [Save.xxx] means it will save image in the “xxx” format
 You can also set this using the hidden right-click popup on the [Save] Button itself (so you don’t need to open & close [Disp] just for this)
Format list depend on presence of image conversion programs on your system

-  **[**_**Sharpen**_**]** is sometimes useful for deblurring images
-  **[**_**Reset**_**]** sets controls back to what they were when you opened **[**_**Disp**_**]**
-  **[**_**Done**_**]** closes this control window
-  **[**_**Save**_**]** lets you save images from viewer to disk files
- _Warning_: Images are saved as sent to the viewer, _not_ as displayed
- Means that aspect ratio of saved image may be wrong (non-square pixels)
- Can fix this with **[**_**Define Datamode**_**]** **** **[**_**Warp Anat on Demand**_**]**
- Or by setting **AFNI_IMAGE_SAVESQUARE** to **YES**
-  **[**_**Save:bkg**_**]** means it will save the background image data itself, whatever the format it may be in (bytes, shorts, floats, complex numbers, RGB byte triples)
-  **[**_**Save:pnm**_**]** means it will save the displayed image in PNM format
- PPM for color, PGM for gray-only images
- You might have to convert this to some other format
- See AFNI FAQ #57 for instructions on image format conversion
-  **[**_**Sav1:xxx**_**]** means it will save the entire Montage in format “xxx”
- This is the _only_ way to save a Montage layout (within AFNI)
** ****[**_**Save**_**]** options will only save single slice images (one or more)
-  **[**_**Save.xxx**_**]** means it will save image in the “**xxx**” format
-  You can also set this using the hidden right-click popup on the **[**_**Save**_**]** Button itself (so you don’t need to open & close **[**_**Disp**_**]** just for this)
- Format list depend on presence of image conversion programs on your system

## After you press [Save], then it asks for a filename prefix
Except for [Sav1.xxx], it then asks for ‘from’ and ‘to’ slice indexes
 You can save many images this way
 Filenames are like are like prefix.0037.ppm, for slice #37, ppm format
 [Sav1.xxx] immediately saves its one file after prefix is entered
 [Mont] lets you display a rectangular layout of images (i.e., montage)
Pops up its own little control window
Controls at top do nothing until an action is selected on bottom row
 [Across] and [Down] determine number of sub-images shown
 [Spacing] determines how far apart the selected slices are
Every nth slice, for n = 1, 2, ...
Multiple crosshairs in other image viewers will show montage slices
 [Border] lets you put some blank pixels between sub-images
 [Color] lets you choose the color of the border pixels
At bottom row, the action buttons cause something to happen:
 [Quit] closes the Montage control window
 [1x1] changes Across and Down back to 1
 [Draw] actually causes the montage to be drawn
 [Set]  [Draw] then [Quit]

- Except for **[**_**Sav1.xxx**_**]**, it then asks for ‘**from**’ and ‘**to**’ slice indexes
-  You can save many images this way
-  Filenames are like are like **prefix.0037.ppm**, for slice #37, ppm format
-  **[**_**Sav1.xxx**_**]** immediately saves its one file after prefix is entered
-  **[**_**Mont**_**]** lets you display a rectangular layout of images (i.e., montage)
- Pops up its own little control window
- Controls at top do nothing until an action is selected on bottom row
-  **[**_**Across**_**]** and **[**_**Down**_**]** determine number of sub-images shown
-  **[**_**Spacing**_**]** determines how far apart the selected slices are
- Every *n*th slice, for *n = 1, 2, ...*
- Multiple crosshairs in other image viewers will show montage slices
-  **[**_**Border**_**]** lets you put some blank pixels between sub-images
-  **[**_**Color**_**]** lets you choose the color of the border pixels
- At bottom row, the action buttons cause something to happen:
-  **[**_**Quit**_**]** closes the Montage control window
-  **[**_**1x1**_**]** changes Across and Down back to 1
-  **[**_**Draw**_**]** actually causes the montage to be drawn
-  **[**_**Set**_**]** **** **[**_**Draw**_**]** then **[**_**Quit**_**]**

##  [Rec] lets you record images for later Save-ing
So you can build a sequence of images using any set of AFNI controls
Change color maps, functional thresholds, datasets, ...
Then save them to disk for animation, etc.
If Unix programs whirlgif and/or gifsicle are installed on your system, AFNI can write GIF animations directly (e.g., for fun Web pages)
If program mpeg_encode is installed, AFNI can write MPEG-1 animations
Source code for these free programs is included with AFNI source code
 [Rec] button pops down a menu that sets the record mode
 [Off]  recording is off
 [Next One]  next image displayed is recorded, then back to [Off]
 [Stay On]  record each image when displayed
Controls below the line determine where in the
   recording sequence the saved images will be
   stored as they are created
Recorded images go into a special new image viewer
 Slider moves between recorded images
 [Kill] deletes 1 image from recorded sequence
 [Save] will save record images
Right-click on [Save] for format menu
 [Done] to close the recorded image viewer

- So you can build a sequence of images using any set of AFNI controls
- Change color maps, functional thresholds, datasets, ...
- Then save them to disk for animation, etc.
- If Unix programs **whirlgif** and/or **gifsicle** are installed on your system, AFNI can write GIF animations directly (e.g., for fun Web pages)
- If program **mpeg_encode** is installed, AFNI can write MPEG-1 animations
- Source code for these free programs is included with AFNI source code
-  **[**_**Rec**_**]** button pops down a menu that sets the record mode
-  **[**_**Off**_**]**  recording is off
-  **[**_**Next One**_**]**  next image displayed is recorded, then back to **[**_**Off**_**]**
-  **[**_**Stay On**_**]**  record each image when displayed
- Controls below the line determine where in the
-    recording sequence the saved images will be
-    stored as they are created
- Recorded images go into a special new image viewer
-  Slider moves between recorded images
-  **[**_**Kill**_**]** deletes 1 image from recorded sequence
-  **[**_**Save**_**]** will save record images
- Right-click on **[**_**Save**_**]** for format menu
-  **[**_**Done**_**]** to close the recorded image viewer

## Hidden image popup menu (using Button 3 or right-click)
 [Jumpback] lets you jump the focus position back to its last place
For when you click in the wrong place and get lost
 [Jump to (xyz)] lets you enter xyz-coordinates (in mm), and then the focus position will jump there
External program 3dclust can generate xyz coordinates of interest
Once you have +tlrc dataset, can jump to regions from Talairach atlas
 [Jump to (ijk)] lets you jump to a particular voxel index location
 [Image display] lets you turn control widgets on and off
Can unclutter screen a little; useful if you want to make a screenshot
 Other items bring up controls that are discussed in other presentations
Hidden intensity bar popup menu
 [Choose Display Range] lets you pick the exact range of numbers that are mapped to intensity bar colors
Normally, each slice image is mapped to colors separately when it is displayed
Using Min-to-Max or 2%-to-98% from [Disp]
If you want each image to be mapped the same way, then must give bottom-to-top values via this menu item (separate them with spaces)
If you set third (optional) input ‘ztop’ to 1, values above ‘top’ are set to 0
To restore normal auto-mapping, set ‘bot’ and ‘top’ both to 0

-  **[**_**Jumpback**_**]** lets you jump the focus position back to its last place
- For when you click in the wrong place and get lost
-  **[**_**Jump to (xyz)**_**]** lets you enter *xyz*-coordinates (in mm), and then the focus position will jump there
- External program 3dclust can generate *xyz* coordinates of interest
- Once you have **+tlrc** dataset, can jump to regions from Talairach atlas
-  **[**_**Jump to (ijk)**_**]** lets you jump to a particular voxel index location
-  **[**_**Image display**_**]** lets you turn control widgets on and off
- Can unclutter screen a little; useful if you want to make a screenshot
-  Other items bring up controls that are discussed in other presentations
- Hidden intensity bar popup menu
-  **[**_**Choose Display Range**_**]** lets you pick the exact range of numbers that are mapped to intensity bar colors
- Normally, each slice image is mapped to colors separately when it is displayed
- Using **Min-to-Max** or **2%-to-98%** from **[**_**Disp**_**]**
- If you want each image to be mapped the same way, then must give bottom-to-top values via this menu item (separate them with spaces)
- If you set third (optional) input ‘**ztop**’ to 1, values above ‘**top**’ are set to 0
- To restore normal auto-mapping, set ‘**bot**’ and ‘**top**’ both to 0

##  [Choose Zero Color] lets you choose the color that is displayed for voxel values that are exactly 0
Can be useful for filling in regions that were set to 0 by some program
For example, values below ‘bot’ from Choose Display Range (and above ‘top’ if ‘ztop’ was set to 1)
Choose the ‘none’ color to return to normal display
 [Choose Flatten Range] is used to control the Flatten filter from the [Disp] control window
This is almost useless — don’t bother to try it
 [Choose Sharpen Factor] is used to control the Sharpen filter from the [Disp] control window
Larger values mean more sharpening (and more image graininess)
 [Plot Overlay Plots] turns overlay graphs on and off
Among other things, controls overlay of cortical surface geometry sent to AFNI from the SUMA program
 [Label] and [Size] control display of slice coordinate overlay plot
 [Tick Div] controls tick marks plotted around the outside of image

- Can be useful for filling in regions that were set to 0 by some program
- For example, values below ‘**bot**’ from Choose Display Range (and above ‘**top**’ if ‘**ztop**’ was set to 1)
- Choose the ‘none’ color to return to normal display
-  **[**_**Choose Flatten Range**_**]** is used to control the Flatten filter from the **[**_**Disp**_**]** control window
- This is almost useless — don’t bother to try it
-  **[**_**Choose Sharpen Factor**_**]** is used to control the Sharpen filter from the **[**_**Disp**_**]** control window
- Larger values mean more sharpening (and more image graininess)
-  **[**_**Plot Overlay Plots**_**]** turns overlay graphs on and off
- Among other things, controls overlay of cortical surface geometry sent to AFNI from the SUMA program
-  **[**_**Label**_**]** and** ****[**_**Size**_**]** control display of slice coordinate overlay plot
-  **[**_**Tick Div**_**]** controls tick marks plotted around the outside of image

## Keyboard shortcuts while cursor is in the image window
 q = quit = close the viewer window
 v or V = video = move through slices automatically
 r or R = rebound video
 z or Z = zoom out or in
 p = turn panning on or off (when zoomed in)
 c = turn cropping rectangle on or off
 i or I = change image fraction down or up
 m = switch between Min-to-Max and 2%-to-98% scaling
 a = fix image aspect ratio (if it gets deranged by windowing system)
 D = open Disp window
 M = open Mont window (N.B.: Disp and Mont are mutually exclusive!)
 S = open Save window
 o = turn color overlay display on and off (like [See Overlay] in AFNI GUI)
 u = switch the overlay dataset to be the underlay dataset temporarily
 keyboard arrow keys = move cursor one voxel (like arrowpad)
 PageUp and PageDown = change slice
 Delete = ROI drawing plugin ‘Undo’
 F2 = Change to ‘pencil’ mode when using the ROI drawing plugin

-  **q** = quit = close the viewer window
-  **v** or **V** = video = move through slices automatically
-  **r** or **R** = rebound video
-  **z** or **Z** = zoom out or in
-  **p** = turn panning on or off (when zoomed in)
-  **c** = turn cropping rectangle on or off
-  **i** or **I** = change image fraction down or up
-  **m** = switch between Min-to-Max and 2%-to-98% scaling
-  **a** = fix image aspect ratio (if it gets deranged by windowing system)
-  **D** = open **Disp** window
-  **M** = open **Mont** window (N.B.: **Disp** and **Mont** are mutually exclusive!)
-  **S** = open **Save** window
-  **o** = turn color overlay display on and off (like **[**_**See Overlay**_**]** in AFNI GUI)
-  **u** = switch the overlay dataset to be the underlay dataset temporarily
-  keyboard arrow keys = move cursor one voxel (like arrowpad)
-  **PageUp** and **PageDown** = change slice
-  **Delete** = ROI drawing plugin ‘Undo’
-  **F2** = Change to ‘pencil’ mode when using the ROI drawing plugin

## Mousing shortcuts in the image viewer
 Click down Button 1 (left button) in the image window and hold it down, then drag around while holding
 Changes contrast and brightness
 With a little practice, becomes an easy way to adjust images to your liking
 Click-and-release in the same spot just causes crosshairs to move
 You must move cursor a small distance while doing click-and-hold before the contrast/brightness change starts
 As mentioned earlier, scroll-wheel in the image window moves through slices
 Keyboard ALT (option on Macintosh) while using scroll-wheel in the image window will change the functional overlay threshold slider in the main AFNI GUI window
 This action affects all image viewers in the current AFNI controller
 Shift+scroll and Control+scroll are special on the Macintosh, and so are not used in AFNI
 As mentioned earlier, scroll-wheel in the intensity bar changes contrast
 ALT or option plus scroll-wheel in intensity bar changes brightness

-  Click down Button 1 (left button) in the image window and ***hold it down***, then drag around while holding
-  Changes contrast and brightness
-  With a little practice, becomes an easy way to adjust images to your liking
-  Click-and-release in the same spot just causes crosshairs to move
-  You must move cursor a small distance while doing click-and-hold before the contrast/brightness change starts
-  As mentioned earlier, scroll-wheel in the image window moves through slices
-  Keyboard **ALT** (**option** on Macintosh) while using scroll-wheel in the image window will change the functional overlay threshold slider in the main AFNI GUI window
-  This action affects all image viewers in the current AFNI controller
-  Shift+scroll and Control+scroll are special on the Macintosh, and so are not used in AFNI
-  As mentioned earlier, scroll-wheel in the intensity bar changes contrast
-  **ALT** or **option** plus scroll-wheel in intensity bar changes brightness

## Touring the Graph Viewer

**Graph Viewer with data (black) and reference waveforms (****red****)**

## Graph viewer takes voxel values from same dataset as image viewer
If dataset has only 1 sub-brick, graph viewer only shows numbers
 Not very useful unless you are an MRI physics type, perhaps
To look at images from one dataset locked to graphs from another dataset, must use 2 AFNI controllers and [Define Datamode]  [Lock] on AFNI control panel
If graph and image viewer in same slice orientation are both open, crosshairs in image window change to show a box containing dataset voxels being graphed
Central sub-graph (current focus location) is outlined in yellow
Current time index is marked with small red diamond on data graph
Left-clicking in a non-central sub-graph moves that location to focus
Left-clicking in central sub-graph moves time index to nearest point
Can also use [Index] control in AFNI controller to change time
Right-clicking in any sub-graph pops up some statistics of its data
Left-clicking in icon (lower left corner) causes icon and menu buttons to disappear
Useful if you want to do a screenshot to save AFNI window(s)
Left-clicking in same place will bring icon and buttons back

- If dataset has only 1 sub-brick, graph viewer only shows numbers
-  Not very useful unless you are an MRI physics type, perhaps
- To look at images from one dataset locked to graphs from another dataset, must use **2** AFNI controllers and **[**_**Define Datamode**_**]** ****** [**_**Lock**_**]** on AFNI control panel
- If graph and image viewer in same slice orientation are both open, crosshairs in image window change to show a box containing dataset voxels being graphed
- Central sub-graph (current focus location) is outlined in yellow
- Current time index is marked with small red diamond on data graph
- Left-clicking in a non-central sub-graph moves that location to focus
- Left-clicking in central sub-graph moves time index to nearest point
- Can also use **[**_**Index**_**]** control in AFNI controller to change time
- Right-clicking in any sub-graph pops up some statistics of its data
- Left-clicking in icon (lower left corner) causes icon and menu buttons to disappear
- Useful if you want to do a screenshot to save AFNI window(s)
- Left-clicking in same place will bring icon and buttons back

##  [Opt] menu buttons let you control how graphs appear
Many items have keyboard shortcuts
Make sure you are typing into the correct window!
 [Scale] changes scale of graphs
Mapping from voxel values to screen pixels
 Down [ - ] shrinks graphs vertically; Up [ + ] expands them
 Auto [ a ] makes AFNI pick a nice scale factor
 [Choose] lets you pick exact scale factor
Positive values (pix/datum) or negative (datum/pix)
pix/datum = number of y screen pixels for each change of 1 in data
or datum/pix = size of change in data to get 1 y screen pixel
Current scale factor is shown below graphs
Scale factor does not change when you resize graph,change matrix, etc. 
You usually have to auto-scale [ a ] afterwards
 [Matrix] changes number of sub-graphs
 Down [ m ] and Up [ M ] decrease and increase number
 [Choose] lets you pick number exactly
Alternative: keyboard [ N ], type number, then [ Enter ] key
Range of allowable matrix size is 1..21

- Many items have _**keyboard**_ shortcuts
- Make sure you are typing into the correct window!
-  **[**_**Scale**_**]** changes scale of graphs
- Mapping from voxel values to screen pixels
-  **Down** **[**** **_**-**_ **]** shrinks graphs vertically; **Up** **[**** **_**+**_ **]** expands them
-  **Auto** **[** _**a**_ **]** makes AFNI pick a nice scale factor
-  **[**_**Choose**_**]** lets you pick exact scale factor
- Positive values (pix/datum) or negative (datum/pix)
**pix/datum** = number of *y* screen pixels for each change of 1 in data
- or **datum/pix** = size of change in data to get 1 *y* screen pixel
- Current scale factor is shown below graphs
- Scale factor does *not* change when you resize graph,change matrix, etc.
- You usually have to auto-scale **[** _**a**_ **]** afterwards
-  **[**_**Matrix**_**]** changes number of sub-graphs
-  **Down** **[** _**m**_ **]** and **Up** **[** _**M**_ **]** decrease and increase number
-  **[**_**Choose**_**]** lets you pick number exactly
- Alternative: keyboard **[** _**N**_ **]**, type number, then **[** _**Enter**_ **]** key
- Range of allowable matrix size is 1..21

##  [Grid] lets you change spacing of vertical grid lines
 Useful for showing regular timing interval (e.g., block timings)
 Down [ g ] and Up [ G ] decrease and increase spacing
 [Choose] lets you pick number exactly
 Current grid spacing is shown below graphs
 [Index Pin] lets you pick the horizontal length of the sub-graph
Default Top is number of sub-bricks in dataset
Make it longer  graphs end before window
Make it shorter  graphs are truncated
Useful when switching between datasets of different lengths
Set Bot and Top to 0 to get back to default operation
Current number of time points is shown below graphs
 HorZ [ h ] will put in a dashed line at the y = 0 level in sub-graphs
Only useful if data range spans negative and positive values!
 [Slice] lets you change slices
 Down [ z ] and Up [ Z ] move one slice
 Can also choose slice directly from menu
 Current voxel indexes are shown below graphs
Corresponds to [Voxel Coords?] Display in AFNI controller (from Define Datamode  Misc menu)

-  Useful for showing regular timing interval (e.g., block timings)
-  **Down** **[** _**g**_ **]** and **Up** **[** _**G**_ **]** decrease and increase spacing
-  **[**_**Choose**_**]** lets you pick number exactly
-  Current grid spacing is shown below graphs
-  **[**_**Index Pin**_**]** lets you pick the horizontal length of the sub-graph
- Default **Top** is number of sub-bricks in dataset
- Make it longer  graphs end before window
- Make it shorter  graphs are truncated
- Useful when switching between datasets of different lengths
- Set **Bot** and **Top** to 0 to get back to default operation
- Current number of time points is shown below graphs
-  **HorZ** **[** _**h**_ **]** will put in a dashed line at the *y *= 0 level in sub-graphs
- Only useful if data range spans negative and positive values!
-  **[**_**Slice**_**]** lets you change slices
-  **Down** **[** _**z**_ **]** and **Up** **[** _**Z**_ **]** move one slice
-  Can also choose slice directly from menu
-  Current voxel indexes are shown below graphs
- Corresponds to **[**_**Voxel Coords?**_**]** Display in AFNI controller (from **Define Datamode**** ******** ****Misc** menu)

##  [Colors, Etc.] lets you alter the colors/lines used for drawing
Lines used for sub-graph frame boxes, grid lines, data graphs, FIM orts/ideals, and double plots can have color changes and be made thicker
Grid color is also used to highlight central sub-graph
Can choose to graph curves as lines, points, or both together
Can change color of background and text
Can change gap between sub-graph boxes
 Baseline [ b ] changes how the sub-graphs are plotted
All sub-graphs have same scale factor, to convert values into vertical pixels
Baseline is value that gets plotted to bottom of sub-graph
Individual: all sub-graphs have different baselines
Baseline = smallest value in each displayed time series
This can be confusing; same vertical location doesn’t mean same value
Shown below graphs as Base: separate
Common: all sub-graphs shown at any one time get same baseline
Baseline = smallest value in all displayed time series
Shown below graphs as Base: common
Usually need to rescale [ a ] after changing baseline
Global: all sub-graphs get same baseline even when spatial position changes
Set from [Baseline]  [Set Global] menu item
Default global level is smallest value in entire dataset

- Lines used for sub-graph frame boxes, grid lines, data graphs, FIM orts/ideals, and double plots can have color changes and be made thicker
- Grid color is also used to highlight central sub-graph
- Can choose to graph curves as lines, points, or both together
- Can change color of background and text
- Can change gap between sub-graph boxes
-  **Baseline** **[** _**b**_** ****]** changes how the sub-graphs are plotted
- All sub-graphs have same scale factor, to convert values into vertical pixels
- Baseline is value that gets plotted to bottom of sub-graph
- _Individual_: all sub-graphs have different baselines
- Baseline = smallest value in each displayed time series
- This can be confusing; same vertical location *doesn’t* mean same value
- Shown below graphs as Base: separate
- _Common_: all sub-graphs shown at any one time get same baseline
- Baseline = smallest value in all displayed time series
- Shown below graphs as Base: common
- Usually need to rescale **[** _**a**_ **]** after changing baseline
- _Global_: all sub-graphs get same baseline even when spatial position changes
- Set from **[**_**Baseline**_**]** **** **[**_**Set Global**_**]** menu item
- Default global level is smallest value in entire dataset

## Range of central sub-graph is shown at left of graph region
Central sub-graph bottom (baseline) value is shown at lower left
Upper left shows value at top of central sub-graph box
Number in [brackets] shows data range of one sub-graph box’s height
If baselines are separate, bot/top values only apply to central sub-graph
 Show text? [ t ] allows you to see text display of values instead of graphs
 Save PNM [ S ] lets you save a snapshot of window to a PNM image file
But: if filename ends in “.jpg”, will actually write a JPEG image file!
 Write Center [ w ] lets you write data from central sub-graph to a file
File is in ASCII format  can be imported into other programs
Filename is of form xxx_yyy_zzz.suffix.1D (using voxel indexes)
Suffix is chosen using [Set ‘w’ suffix] button
 [Tran 0D] and [Tran 1D] let you transform the data before it is graphed
 [Log10] and [SSqrt] useful for images with extreme values
 [Median3] and [OSfilt3] are for are for smoothing time series
 Other choices are functions controlled by/from plugins
 [Double Plot] lets you plot output of [Tran 1D] and original data together
 Color of transformed data from [Dplot] on the [Colors, Etc.] menu
 [Dataset#2] transformation lets you plot two datasets together
 [Dataset#N] lets you plot multiple datasets as overlay

- Central sub-graph bottom (baseline) value is shown at lower left
- Upper left shows value at top of central sub-graph box
- Number in [brackets] shows data range of one sub-graph box’s height
- If baselines are separate, bot/top values only apply to *central* sub-graph
-  **Show text?** **[** _**t**_ **]** allows you to see text display of values instead of graphs
-  **Save PNM** **[** _**S**_ **]** lets you save a snapshot of window to a PNM image file
**But**: if filename ends in “.jpg”, will actually write a JPEG image file!
-  Write Center **[** _**w**_ **]** lets you write data from central sub-graph to a file
- File is in ASCII format  can be imported into other programs
- Filename is of form xxx_yyy_zzz.suffix.1D (using voxel indexes)
- Suffix is chosen using **[**_**Set ‘w’ suffix**_**]** button
-  **[**_**Tran 0D]**_ and **[**_**Tran 1D**_**]** let you transform the data before it is graphed
-  **[**_**Log10]**_ and **[**_**SSqrt**_**]** useful for images with extreme values
-  **[**_**Median3**_**]** and **[**_**OSfilt3**_**]** are for are for smoothing time series
-  Other choices are functions controlled by/from plugins
-  **[**_**Double Plot**_**]** lets you plot output of **[**_**Tran 1D**_**]** and original data together
-  Color of transformed data from **[**_**Dplot**_**]** on the **[**_**Colors, Etc.**_**]** menu
-  **[**_**Dataset#2**_**]** transformation lets you plot two datasets together
-  **[**_**Dataset#N**_**]** lets you plot multiple datasets as overlay

##  [X-axis] menu lets you  choose how graph x-axis is chosen
Default: x is linear in time
Can instead choose x from a .1D format file from disk
Useful only in very limited circumstances!
 Done [ q ] closes the graph viewer window
 Keystrokes in graphs that have no menu items are:
 [ < ]  or left-arrow key moves time index down by 1
 [ > ] or right-arrow key moves time index up by 1
 [ 1 ] moves time index to beginning (time index = 0)
 [ l ] moves time index to end
 [ L ] turns off/on the AFNI logo in the corner
 [ v V r R ] are video mode operations, like in the image viewer
 Moving through time index, rather than slice index
 An easy way to animate an EPI time series, to look for subject motion
 [FIM] menu controls interactive functional image calculations
Not documented here
See ‘Educational materials’ pages at AFNI Web site (maybe)

- _Default_: *x* is linear in time
- Can instead choose *x* from a .1D format file from disk
- Useful only in very limited circumstances!
-  **Done** **[** **q** **]** closes the graph viewer window
-  **Keystrokes** in graphs that have no menu items are:
-  **[** **<** **]**  or left-arrow key moves time index down by 1
-  **[** **>** **]** or right-arrow key moves time index up by 1
-  **[** **1** **]** moves time index to beginning (time index = 0)
-  **[** **l** **]** moves time index to end
-  **[** **L** **]** turns off/on the AFNI logo in the corner
-  **[** **v V r R** **]** are video mode operations, like in the image viewer
-  Moving through time index, rather than slice index
-  An easy way to animate an EPI time series, to look for subject motion
-  **[**_**FIM**_**]** menu controls interactive functional image calculations
- Not documented here
- See ‘Educational materials’ pages at AFNI Web site (maybe)

## Brief Tour of the Functional Color Overlay Controls
Open with [Define Overlay] button on AFNI controller

_**Brief**__** Tour of the Functional Color Overlay Controls**_
- Open with **[**_**Define Overlay**_**]** button on AFNI controller

**Color map**

**Hidden popup menu here**

**Choose which dataset makes the underlay image**

**Choose which sub-brick from Underlay dataset to display (usually Anat – has only 1 sub-brick)**

**Choose which sub-brick of functional dataset makes the color**

**Choose which sub-brick of functional dataset is  the Threshold**

**Shows ranges of data in Underlay and Overlay dataset sub-bricks**

**Shows automatic range for color scaling**

**Rotates color map**

**Lets you choose range for color scaling**

**Threshold slider**

**Nominal***** p*****-value of current threshold**

**Choose range of threshold slider, in powers of 10**

**Positive-only or both signs of function?**

**Number of panes in color map**

**Shows voxel values at focus**

## AFNI Plugins

- Plugins are modules (programs) that attach themselves to AFNI when AFNI starts and add some interactive capabilities to the GUI program
- There is a (somewhat old) manual for writing plugins
- Useful plugins:
-  **3D Registration**:
- 		Provides a GUI control for time series registration (same as 3dvolreg)
-  **Dataset Copy**:
- 		Copy a dataset (useful as a start for ROI drawing)
-  **Dataset NOTES**:
-  		Add arbitrary text notes to a dataset header
-  **Draw Dataset**, **Gyrus Finder**:
- 	Draw regions-of-interest (ROIs) on 2D slices
-  **Histogram**:
- 	Graph the histogram of a sub-brick, or some parts of it
-  **Deconvolution**, **Nlfit & Nlerr**:
- 	Do linear and nonlinear regression interactively on the dataset time series  being displayed in a graph viewer

## Plugins Menu

**Plugins** Menu

- Colors of plugin buttons can
- be set in your **.afnirc** file

## Render Dataset:  Volume rendering with functional overlays

**Range of values to render**

**Histogram of values in underlay dataset**

**Maximum voxel opacity**

**Menu to control scripting (control rendering from a file)**

**Render new image immediately when a control is changed**

**Accumulate a history of rendered images (can later save to an animation)**

**Open color overlay controls**

**Sub-brick to display**

**Name of underlay dataset**

**Pick new underlay dataset**

**Range of values in underlay**

**Change mapping from values in dataset to brightness in image **

**Mapping from values to opacity **

**Cutout parts of 3D volume**

**Control viewing angles**

**Detailed instructions**

**Force a new image to be rendered**

**Reload values from the dataset**

**Close all rendering windows**

**Being close to your FMRI data doesn’t get any better than this!  **

**Show 2D crosshairs**

**Compute many images in a row**

## Using AFNI in Batch Mode

- Batch mode programs are run by typing commands directly to the computer, or by putting these commands into text files (*scripts*) and later executing them
- Advantages of batch mode (over graphical user interface)
- Can process new datasets exactly the same way as previous ones
- Can link together a series of programs to produce custom results
- Programs that take a long time to operate are easier to ‘fire and forget’ from a script than if they had a GUI
- It’s easier to write a batch mode program
- Disadvantages of batch mode
- Requires typing, rather than pointing-and-clicking
- Requires learning/remembering how a program works all at once, rather than (re)discovering it through a kinder gentler interface
- Many younger (born after 1970) researchers have virtually no experience with a command line interface, or anything like it
- Many significant AFNI capabilities are only available in batch mode programs
- This is especially true of functions that combine data from multiple datasets to produce new datasets

## The 3d* series of programs (generally) take as input one or more AFNI datasets, and produce as output one (or more) new AFNI datasets

Time series activation analysis programs:
3dfim, 3dfim+, 3ddelay
	Variations on ‘classical’ correlation analysis of each voxel’s time series with a single reference (ideal) waveform
3dDeconvolve:
	Multiple linear regression and/or linear deconvolution to fit each voxel’s time series to a multi-dimensional signal model (similar models are found in SPM)
3dNLfim:
	Nonlinear regression to fit each voxel’s time series to an arbitrary functional model provided by the user
Time series utility programs:
3dFourier:
	Fourier domain filtering voxels time series
3dTcorrelate:
	Compute correlation coefficient of 2 datasets, voxel-by-voxel
3dTsmooth:
	Smooth voxel time series

- _Time series activation analysis programs_:
**3dfim**, **3dfim+**, **3ddelay**
- 	Variations on ‘classical’ correlation analysis of each voxel’s time series with a single reference (ideal) waveform
**3dDeconvolve**:
- 	Multiple linear regression and/or linear deconvolution to fit each voxel’s time series to a multi-dimensional signal model (similar models are found in SPM)
**3dNLfim**:
- 	Nonlinear regression to fit each voxel’s time series to an arbitrary functional model provided by the user
- _Time series utility programs_:
**3dFourier**:
- 	Fourier domain filtering voxels time series
**3dTcorrelate**:
- 	Compute correlation coefficient of 2 datasets, voxel-by-voxel
**3dTsmooth**:
- 	Smooth voxel time series

## 3dTqual, 3dToutcount:
	Examine voxel time series for statistical ‘outliers’
3dTcat:
	Shift voxel time series to a common temporal region
3dTstat:
	Basic statistics on voxel time series
3dvolreg:
	Volume registration to suppress motion artifacts, and to align same-subject data from different scanning sessions

Multi-dataset statistical operations:
3dttest:
	Voxel-by-voxel t-tests
3dANOVA, 3dANOVA2, 3dANOVA3:
	1-, 2-, and 3-way voxel-by-voxel ANOVAs, including random effects and nested models
3dFriedman:
	Voxel-by-voxel nonparametric statistical tests analogous to ANOVAs
3dRegAna:
	General linear regression models and tests derived therefrom

- 	Examine voxel time series for statistical ‘outliers’
**3dTcat**:
- 	Shift voxel time series to a common temporal region
**3dTstat**:
- 	Basic statistics on voxel time series
**3dvolreg**:
- 	Volume registration to suppress motion artifacts, and to align same-subject data from different scanning sessions
- _Multi-dataset statistical operations_:
**3dttest**:
- 	Voxel-by-voxel t-tests
**3dANOVA**, **3dANOVA2**, **3dANOVA3**:
- 	1-, 2-, and 3-way voxel-by-voxel ANOVAs, including random effects and nested models
**3dFriedman**:
- 	Voxel-by-voxel nonparametric statistical tests analogous to ANOVAs
**3dRegAna**:
- 	General linear regression models and tests derived therefrom

## Miscellaneous operations on datasets:
3dAnatNudge:
	Try to align high-resolution anatomical volume with low-resolution EPI volume
3dClipLevel:
	Find the voxel value to threshold EPI volume so as to remove most of the non-brain tissue
3dIntracranial:
	Strip the scalp and other non-brain tissue from a high-resolution T1-weighted anatomical volume
3dMean:
	Compute the mean of a collection of datasets, voxel-by-voxel
3dmaskdump, 3dmaskave, 3dROIstats:
	Extract values from datasets and write to ASCII files
3dUndump:
	Take values from ASCII files and write into a dataset
3dmerge:
	Lots of options to edit datasets and combine them in multifarious and nefarious ways
3dZeropad, 3dZcutup, 3dZcat, 3dZregrid:
	Utilities to add/subtract/resample datasets in the slice (z) direction

**3dAnatNudge**:
- 	Try to align high-resolution anatomical volume with low-resolution EPI volume
**3dClipLevel**:
- 	Find the voxel value to threshold EPI volume so as to remove most of the non-brain tissue
**3dIntracranial**:
- 	Strip the scalp and other non-brain tissue from a high-resolution T1-weighted anatomical volume
**3dMean**:
- 	Compute the mean of a collection of datasets, voxel-by-voxel
**3dmaskdump**, **3dmaskave**, **3dROIstats**:
- 	Extract values from datasets and write to ASCII files
**3dUndump**:
- 	Take values from ASCII files and write into a dataset
**3dmerge**:
- 	Lots of options to edit datasets and combine them in multifarious and nefarious ways
**3dZeropad**, **3dZcutup**, **3dZcat**, **3dZregrid**:
- 	Utilities to add/subtract/resample datasets in the slice (z) direction

## 3daxialize:
	Re-write a dataset in a new slice direction
3dcalc:
	General purpose voxel-by-voxel dataset calculator
3dresample, 3dfractionize:
	Resample a binary mask dataset from one resolution to another
3drotate:
	Rotate a dataset to a new orientation in space
3dpc:
	Extract principal components from a collection of datasets
3dWinsor:
	Spatially filter a T1-weighted anatomical dataset to reduce noise and make the gray-white matter boundary a little more distinct
3dclust:
	Find clusters of activated voxels and print out statistics about them
3dExtrema:
	Find local extrema (maxima or minima) in a dataset --- intended for functional activation maps

- 	Re-write a dataset in a new slice direction
**3dcalc**:
- 	General purpose voxel-by-voxel dataset calculator
**3dresample**, **3dfractionize**:
- 	Resample a binary mask dataset from one resolution to another
**3drotate**:
- 	Rotate a dataset to a new orientation in space
**3dpc**:
- 	Extract principal components from a collection of datasets
**3dWinsor**:
- 	Spatially filter a T1-weighted anatomical dataset to reduce noise and make the gray-white matter boundary a little more distinct
**3dclust**:
- 	Find clusters of activated voxels and print out statistics about them
**3dExtrema**:
- 	Find local extrema (maxima or minima) in a dataset --- intended for functional activation maps