Welcome to scan:STAT!
In this online documentation, you will find:
- A general description, list of features, and system requirements
- A description of each menu item
- A walkthrough, demonstrating some of the various features of scan:STAT.
- A troubleshooting guide
- Information about the sample images included with this release
- Credits and contact information
There is a website devoted to scanSTAT, which includes the most recent version of the documentation and download information. You can find it at:
Section 1: General description
scanSTAT is a data analysis and viewing software tool for medical imaging. It is intended to be a stand-alone application, able to perform tasks from simple image viewing to full statistical image analysis and presentation. In addition, scanSTAT is able to perform these tasks either on data already acquired and stored on disk or in real-time, as the data is acquired.
- Review medical images
- Convert medical images between file types
- Read and view images in GE (.MR), ANMR (.irp/.img), Mayo Clinic Analyze (.img), and MGH (.bshort, .bfloat, .buchar) formats
- Perform statistical analysis of functional MR images using a variety of statistical tests, including Student's t-test and Pearson correlation
- Offline analysis of images already collected
- Real-time analysis of images as they are collected from the scanner
- Record subject responses during imaging sessions
- Use subject responses during imaging to guide real-time statistical analysis
- Display customizable color overlay maps of derived statistics
- Display pixel intensity over time in a user-selected region of interest
- Adjust image brightness and contrast with interactive slider controls
- Identify common scanner artifacts during data acquisition
- Track subject motion, identify excessive movement, and provide feedback to subject or experimenter via an easy-to-understand display
Soon, scanSTAT will be able to:
- Save images in proprietary format for later review
- Save images in standard Macintosh file formats for display and editing with other applications
- Open image files from Siemens MR scanners, as well as other PET and CT scanners
- Open images from remote scanners available over the internet
- Display and summarize summary, demographic, and acquisition information from scans.
- Macintosh Computer with a PowerPC processor
- System 7.1 or Higher (only tested with system 7.6 and higher)
- 256 Color Video and monitor
- Hard Disk
- 8 MB of RAM available to the application (32 MByte recommended for more image processing power)
- Real-Time Imaging also requires:
- ANMR/General Electric MR Imaging Magnet
- TCP/IP network connection to the scanner
- The demos may be run without the imaging system.
Note: When you install scanSTAT, you must also place the file "scanSTAT Prefs" in the Preferences folder in your System Folder. scanSTAT will not run without this file. It is distributed along with the program.
Please don't give away copies of this program to other users. While we do intend it to be freely distributable, we'd like to keep track of who out there likes our work. Please refer any interested parties to the main scanSTAT web page, where they can download copies.
|This is a development copy of the program and it may be very unstable. Not all menu items are functional, and the program cannot save images. We strongly recommend quitting all open applications and saving files before starting scanSTAT (it will crash). To date, we have not suffered any secondary data loss, such as damage to closed disk files.
Section 2: Menu Reference
The program has a very simple five menu structure: File, Edit, Statistics, Display, and Help.
The Apple Menu:
The only localized component of the Apple menu is the About box
- This option selects between real-time and offline processing modes.
- Process From File
- This is the offline processing mode. When in this mode, the "Open Time Data..." function is used to select from saved MR files.
- In the real-time mode, when the user selects "Open Scanner for Data..." the program opens a socket connection to the MR scanner and begins importing live MR data as it is acquired. Obviously, this option cannot be enabled in demonstration versions of the code, as it requires the presence of a properly configured scanner. Configuration, however, is pretty easy. A small unix application on the scanner looks for the connection traffic and sends the images as needed.
Open Time Data...
- This option opens up a Macintosh file selector dialog. Use this option to select a time-series of data for statistical processing (as opposed to just image review). Only when a file is opened with this selection can it be processed to seek areas of activation.
Select Base Image...
- (not yet available) This option will allow you to import an arbitrary image onto which to overlay the statistical images that you create.
- In order to perform statistical processing, you must have a paradigm reference vector. This defines the weighting to be given each image in the time series when creating any derivative statistics. scanSTAT supports the definition of the paradigm file in three ways:
- Create by Key Press
- (Not available in this version) In interactive real-time mode, the preferred way to create a pardigm file is by allowing the user (or subject) to indicate their state by pressing a button. We look at the Macintosh ADB port and track key presses on it. If "Use Key Press" is selected, the Key Press Prefs... dialog appears (see below).
- Create with CProto
- At this writing, Cproto, a paradigm file creator, exists standalone, rather than under this menu. You can run it by double clicking that application. CProto does the magic of computing the estimated brain response functions based on the paradigm timing. Use this option to create paradigm files offline.
- Use File...
- This opens the standard Macintosh File dialog. Here you can select a pre-existing paradigm file, typically created by CProto.
- Key Press Prefs...
- (not available in this version) In the interactive Real-time mode, it is necessary to specify a few user preferences, including the scan TR (so that the impulse response convolution selects the appropriate time base), and how to handle the keys. It will also prompt you to save the record of the subject's key presses. The save format is identical to the save format for the general paradigm files: a text list of the weights applied to each image.
- View Image
- This menu item is used to open images for simple review (as opposed to statistical processing). We presently support the import of analyze format, GE ".MR" format, and the MGH standards (bfloat, bshort, buchar). For the MGH style images, it may be necessary to change the byte swap flag (the last character in the header file) to manage these properly. We treat the value of "1" to mean "LittleEndian" and the value of "0" to mean BigEndian. Using this option on a data time-series brings up the first image in the series.
- Once the data time series has been opened and the paradigm chosen, this option starts the actual calculation of time series statistics.
- Close the frontmost window
- (not yet available) This will save the image in the active window in our local standard format, which allows for retrospective review of the overlays. The time series will not be saved.
- This is to be our image export function. It will be possible to save files as PICT, TIFF and for simple image files, GE and Analyze format. I will only add the MGH formats if truly pushed, as the header is too thin to make much use of it.
- This will also allow image exporting in the abovementioned file formats.
- Undo the last saved changes, reverting the file to its previous state.
- These are to be the usual printing dialogs.
- Exit the program. A bug seems to keep us from quitting if no windows are open. You may experience this bug. If so, open any image file (using View Image, or Open Time Series...) and then quit.
This menu contains the usual complement of cut copy and paste, mostly to support desk accessories at this time. In this version, the edit menu items are not useful, and will very likely cause the program to crash if used.
This menu allows you to determine various aspects of the statistical tests to be performed on a data time series.
- Selects which of the tests listed below will be applied to the data time series.
- Student's t-test
- (not yet available) This test expects a paradigm file whose vector sum is 0. The two group t-test assumes that negative weightings are assigned to one group and positive weightings are assigned to the other. A special value (1234.5) describes images that are to be ignored in the analyses.
- Form maps of the correlation between the time history of intensity for each pixel and the reference vector. This is the primary output of fMRI Grinder.
- (not yet available) This non-parametric statistic is used by some groups to find areas of activation. We don't use it at UCLA, but we will implement it in this program. Probably, though, not as a real-time statistic.
- When this option is selected, each image will first be normalized to have the same mean intensity as the first image in the series. This is reputed to correct for some problems of scanner drift.
Save Ratio File...
- (not yet available) If using Global Normalization, this will save a text file showing the correction applied to each image.
- This brings up a dialog to select various prospective statistical options (those that require recalculation of the image series in order to see). These include Gaussian smoothing, the selected noise threshold, and the artifact detection options (see the tutorial section on artifact detection below ).
The display menu refers to changes in the way that images are displayed, but does not affect statistical calculations.
- Always selected in this release. In a future version this will allow a toggle to a paged view in which each slice location fills a whole window (similar to NIH Image stacks)
Enable/Disable While-Calc Display
- When selected, the color overlay indicating the results of the statistical calculations will be updated as each timepoint is added. This is the essence of the real-time imaging mode. However, it can also be used in offline processing, to observe how the statistical map evolves over time.
- Magnification or minification of the image, from 1/4 size to eight times size. There are some bugs in this option--use with caution.
Show/Hide Color/Gray Bar
- Places or removes a calibrated color or gray bar to the right of the currently displayed image. This indicates the values associated with each color or shade in the statistical overlay.
- This item opens a time-intensity graph showing the timecourse of behavior in selected pixels. By default, it will show the activity in all pixels whose statistical values are above those selected below with "Overlay Options...". You may also select those pixels whose behavior will be plotted by clicking and dragging. See the walkthrough section on pixel selection and intensity for more information.
Show Range in T-I Graph
- When selected, this option modifies the graph of intensity behavior over time to include the ranges of intensity of the selected pixels.
Show Artifact Data Graph
- This option brings up a window displaying the data from the automated artifact detection routines. The details of the window are described in the walkthrough section on artifact detection.
- This is the window and level (Brightness and contrast) control for the gray scale images, which may be the entire contents of the window (if opened with View Image...) or the base image (in Overlay mode). You may also change the default interpolation mode for these images between bilinear and pixel replication. The sliders may or may not be operational in this version.
- From here you have control over the appearance of the composite statistical and anatomical images. You may display either the raw statistic, the probability (actually the -log10 of the probability) or the slope (a parametric assessment of the magnitude of the MR signal change) or the slope thresholded by the statistical maps. You may also adjust the interpolation of the statistical images. Pixel interpolation is prefered, because it does not show the "statistics" for the imaginary interpolated pixels. You may find the view less pleasing, though. We can display only the positive, only the negative, or both the positive and negative statistical values. By definition, negative values all refer to pixels whose signal decreases when the reference paradigm increases.
Show Displacements( toggles to Show Pixel Increase/Decrease)
- Selecting this menu option will change the bottom section of the Artifact Data Graph to the desired option. If you select Show Displacements, the window will show the pixel displacements for both cumulative and sequential traces. If you select Show Pixel Increase/Decrease, the graph will show the Increase/Decrease ratio, which gives somewhat different information. Both of these options are explained in the walkthrough section on artifact detection.
Show Motion Bullseye
- This brings up the Motion Bullseye display, which can be used to track subject motion by plotting displacements in a center-of-mass calculation. The ranges of the display are set in the Statistical Options... menu item under Displacement. The functioning of this item is described in detail in a special subsection of the walkthrough section on artifact detection.
This menu supports access to the Header editing tools and will soon allow the creation of noise simulations.
Section 3: Walkthrough Demonstration
This version of scanSTAT is being distributed on a Macintosh-formatted CD with a number of sample data files. To install the program, just double click the compacted file to create a folder containing the primary application and a second folder containing the sample images. No INIT's, CDEV's or any changes at all are made within the system folder. However, a file called "scanSTAT Prefs" will appear along with the application. For the program to work, this file must be moved into the Preferences folder in your System Folder.
Each of the following sections is designed to illustrate a different feature set of scanSTAT. We recommend, however, that you do all of them sequentially in one sitting for maximum efficiency, as they are designed to work together.
Walkthrough Section 1: Viewing Images
Walkthrough Section 2: Processing an fMRI Time Series
Walkthrough Section 3: Changing Prospective Signal Parameters
Walkthrough Section 4: Adjusting the Statistical Overlay
Walkthrough Section 5: Selecting Pixels and Pixel Behavior
Walkthrough Section 6: Artifact Detection and Handling
Waljthrough Section 6B: Real-world artifacts
Walkthrough Section 7: Interactive Paradigm Creation
|Background: Functional MRI
When magnetic resonance images (MRI's) of the brain are acquired in rapid succession they will show small differences in signal intensity in positions corresponding to focal areas of activation. These signal changes result from small differences in the magnetic resonance signal caused by variations in the oxygenation state of the venous vasculature. Using this non-invasive functional MRI (fMRI) method it is possible to localize functional brain activation in normal individuals with an accuracy of millimeters and a temporal resolution of seconds. Though numerous technical challenges remain, fMRI is increasingly becoming a key method in understanding the topographical organization of the human brain.
Generally, these activation maps are created by comparing the signal intensity fluctuations that occur in each pixel in a series of MR images, to a description of the behavioral activity or stimulus conditions. Following the terminology used at MGH, we call such desrciptions "Paradigm Vectors" or "Paradigm Files". The statistics describing the correlation of the brain signal and the paradigm file become the functional maps and are generally superimposed in color onto anatomical maps.
For more background information, you could check out a paper by Dr. Mark Cohen.
Section 4: Troubleshooting
Notes and Perversions:
- Make sure that the scanSTAT Prefs file is in your Preferences folder. scanSTAT will not run if this file is not where it should be.
- Remember that this is an alpha release and known to be extremely crash-prone. Before running this program, be sure that you have saved any work in other programs. scanSTAT will crash if you run it long enough.
- One known bug is that the program will sometimes refuse to quit if no windows are open. This one is innocuous--just open a window of any sort (using View Image..., for example), and then select Quit.
- The MGH .bshort, .buchar, .bfloat file format does not give a great deal of information about the images. The header contains only the following data:
ysize xsize zsize swap
Further, byte ordering is officially handled in an unusual way. Specifically, the "swap" field is treated as a Boolean describing the images as having "same" or "different" byte order from the receiving program. Since the receiving program does not receive any information as to the file's creator, this is an ambiguous approach. Instead, we have adopted the convention that if swap=1, the byte order is "little Endian" (as used in Sun and Macintosh). If swap=0, we assume that data to be bigEndian (as in DEC alpha computer systems).
If you have been using bshort, or bfloat files on a Sun system, you will want to edit the headers and change the last character to 1!
- Unfortunately, the windows are not scrollable. If there are more images than comfortably fit in a multi-format display, you will need to review them in paging mode. Since paging mode hasn't been added, we recommend that you not try to use scanSTAT to display more than 16 slices at once.
- Images from the ANMR APD2 console have file names longer than the Macintosh 32 character maximum. In order to read these images into fMRI grinder, they must first have the names shortened. Note that the headers must end in .irp, whereas the images must end in _xxx.img, where xxx is a three digit number.
If you have comments or questions, I would love to hear from you.
Section 5: About the Sample Images
The images are organized by file type, to demonstrate the program's ability to read a variety of formats. They are all found in the folder called "Standard Sample Data"
- This is a 128*128 matrix multi-slice echo-planar image
- Here you will find "small.bshort" a 75 image time series collected during visual stimulation. The file, "small.C.p" can be used as a paradigm file to calculate statistics
- This 16 slice file shows activity during hand ("hand.p" and language "lang.p" tasks in a patient with a large brain tumor. The file "tongue.p" describes the activity in a different collection series and should thus be largely uncorrelated.
Signa Genesis format
These images demonstrate the program's ability to import from this interchange format. Our scanner produces a special format that is compressed in one direction (as a speed enhancement measure). The file "120597-165728.img" is in this special format. The image aspect ratio is automatically corrected by scanSTAT.
Section 6: Credits and Contact Info
scanSTAT was (and is being) written by Mark S. Cohen and William L. Scheding at UCLA's Brain mapping center. They can be reached at:
firstname.lastname@example.org (Mark Cohen) or email@example.com (William Scheding)
This documentation was created using GoLive CyberStudio 2.0.2 by Dr. Cohen and Richard DuBois.