xjView version 3 user's guide

about this program
update
download and system requirement
usage
Q & A
related: xBrain.org
for HNL

about this program

With xjView version 3 you can:

  • Easily change p-Value by sliding a scroll bar and display the resulted supra-threshold voxels instantly.
  • Display multiple images at the same time and find the common regions.
  • Pick up one or more clusters and save them as a mask image for future ROI analysis.
  • Find out the anatomical name of the selected voxel or cluster(s).
  • Search the selected brain regions in databases (xBrain(See Q/A), google scholar and pubmed) and find out what the function is.
  • Display the images in glass view, section view and 3-D render view.
  • Display a T-test image with positive T coded by hot color and negative T coded by cold color.
  • NEW: Overlay a known structure (e.g. Brodamnn 10) to the current hot spot.
  • NEW: Find and display only the common region(s) of several image files.
  • Bug (corrected): when you click 'volume', xjview now asks you to input the SPM.mat which generates the current T/F image.
  • And more ...
  • xjView was written by Xu Cui and Jian Li at Human Neuroimaging Lab at Baylor College of Medicine. The database used in xjView is from MNI Space Utility written by Sergey Pakhomov.

    For bugs or comments, please leave a message to cuixu at hnl.bcm.tmc.edu

    update

  • 2005-05-15: add a "common region" push button. By clicking it xjview will display the common (supra-threshold) regions only.
  • 2005-05-11: add overlay function, where you can overlay a general anatomical structure to your current active region. For example, type cingulate and press enter (or click overlay button) to see what happens. To overlay only the left side of a region, type (for example) cingulate   _L; for right side, _R. You can also select a structure from the list.
  • 2005-05-10: fixed the distortion of the saved ps files.
  • 2005-05-07: major update from version 2 to version 3.
  • previous version

    download and system requirement
    xjView works under MatLab 6.5 (and 7.0) and SPM2 both in Windows XP Service Pack 2 and Red Hat Linux 7.3.

    Download xjview.m and TDdatabase.mat at http://people.hnl.bcm.tmc.edu/cuixu/xjView/xjview3

    xjView doesn't work under MatLab 6.1 or below.

    usage

    There are 4 ways you can start xjView in MatLab command window (type help xjview):

    After you start xjView with no argument, you will find the main window like the figure below (click to view larger figure):

    Then click menu File|Open Images... to load one or multiple images. Alternatively, double-click any blank space in the window to load image(s). The image files are usually T-test or F-test result image (For example, spmT_0002.img).

    After you load an image file (for example, example2.img), the window is like below (click to view larger figure):

    You may then slide the p-Values, search the selected region in online database, select, pick clusters/view cluster information (by clicking select or pick cluster button) and save mask (File|Save Current Images...), list the displayed clusters (by clicking volume button), and display 3D render view (by checking the render view), etc. Note: displaying render view takes considerably longer time than glass view and section view and thus you might want to check the render view only when necessary.

    If you clicked pick cluster/info button, a window will pop out to show the information of this cluster: total number of voxels and how many of them are in different regions.

    To open/save image or result files, or to get help, use the menu. Note: in Linux, both .ps and .pdf files are saved; in Windows, only .ps file is saved.

    If multiple images are loaded, then they are coded in different colors in section view. You can easily find the common region by the intermediate color.

    Q & A

    Q I have a mask file (mymask.img) and I want to know where the masked region is. What should I do?
    type xjview mymask.img in the command window of MatLab. Then put the cursor in glass view (or section view) to the displayed region.
    Q I have a 23x3 matrix (called A) with each row the MNI coordinate of a voxel. How do I know where the region is?
    type xjview(A) in the command window of MatLab. Then put the cursor in glass view (or section view) to the displayed region.
    Q I have a image file which is the result of a glm contrast. I want to make a mask of the activated region. How can I do it?
    load the image file, change p-value (and cluster size threshold), put the cursor to a region of interest, click "Pick cluster/Info" and save the image by clicking menu File|Save Current Image....
    Q How many image files can I load at the same time?
    100. But we only have 6 different colors to code them. So it is advisable to load 6 images at the most.
    Q I loaded multiple images, can I change p-Values?
    Yes. xjview will display the supra-threshold voxels for each image.
    Q Can I load a T test image, an F test image, a mask image, and another image file from an unknown source at the same time?
    Yes. But don't confuse yourself before confusing xjview.
    Q There is an error when I choose some target images in the section view (such as ch2, ch2bet, aal and brodmann). What happened?
    Those images are not provided by SPM. You may want to check out MRIcro. Copy the corresponding image files (unzipped, with header files) to your spm canonical directory.
    Q Are the coordinates in xjview MNI or TAL coordinates?
    MNI.
    Q What is xBrain?
    xBrain (http://www.xBrain.org) is a brain mapping database where you can search a brain region and find out what the function is. Everybody can contribute the database by adding entries.

    for HNL

    xjView can also do (1) preprocess, (2) glm estimation and (3) ROI analysis. These functions are highly dependent on the hardware of HNL so people outside HNL might not find them useful. Even HNL people might have to make some minor changes to fit their own projects. The functions in file xjview.m you might need to change are CallBack_preprocess, CallBack_process, and CallBack_SPMProcess. You also need to download extra files.
    To use these functions, click the menu "Analyze" and choose a job you want to perform.

    For preprocessing, process, and SPM process, xjView will automatically submit your jobs to HNL clusters to speed the analysis. xjView will create a temporary directory "xjviewtmp" under your current directory. You will find the status of your jobs there. For other functions such as contrast and ROI, a single CPU is fast enough.

    The difference between "process" and "SPM process" is that, "process" do GLM estimation on the detrended relative BOLD signal directly, while "SPM process" uses standard SPM procedure to do GLM, which includes some transformation of the image data. Their results are almost identical.

    preprocess

    Select (or type) the variable (in the base workspace) whose content is the directory of each subject. This variable is usually obtained by using spm_get. This variable is a string array, with each row the directory name of each subject. For example:
    P =
    /mnt/nfs/proj/timing/subjects/AC081704
    /mnt/nfs/proj/timing/subjects/BD071304
    Please note: xjView assumes that you have a "data" directory, which contains the raw DICOM files, under each subject's directory. xjView will automatically create a directory "preprocessing" under each subject's directory to hold the preprocessed image files. xjView will also save the headmovement mat file and the 4-D image data matrix(s) (for example, 0003.mat. The name of these files are session number.) to preprocessing directory. These mat files will be frequently used in ROI analysis. You may want to copy these mat files into a single directory later.

    process -- do GLM on detrended relative BOLD signal directly

    Select (or type) the 3 variables (P,E,M, for example) whose contents are the mat file names of the image data (resulted from preprocess), the event onset time, and the modeulator (or regressor, you may call it), respectively. The third variable is optional. If you don't have modulator, leave the field blank. For example:
    P =
    /mnt/nfs/proj/timing/s001.mat
    /mnt/nfs/proj/timing/s002.mat
    E =
    /mnt/nfs/proj/timing/e001.mat
    /mnt/nfs/proj/timing/e002.mat
    M =
    /mnt/nfs/proj/timing/m001.mat
    /mnt/nfs/proj/timing/m002.mat
    By loading s001.mat, you will get a 4-D matrix of a subject's BOLD data, or a string matrix with each row an imaging file (e.g. swafAB021204_1.img), loading these imaging files will also get a 4D matrix. The first three dimensions are spatial and the last one is temporal. By loading e001.mat, you will get a structure; each component is the onset times of a type of event ( For example, E.flash=[0 23 44 67 13 89]', E.press=[22 54 99]'. In this example, you have two types of events (flash and press), event flash has onset time 0, 23, etc.). The onset time should be in the unit of second. By loading m001.mat, you will get a structure, each component is again a structure. For example
    M.flash.brightness = [56 45 25 14 69 87]
    M.flash.size = [5 5 2 4 6 7]
    M.press.lefthand = [1 0 0]
    Now you see, the first order component of M has to be the same with the event type. The size of each modulator should be the same as the size of event onset times.
    If you don't have a modulator for event flash (for example), then don't specify it in M: M.press.lefthand = [1 0 0].
    Then select the directory where you want to put the result beta files.
    The output of "process" is beta value in imaging files (for example, beta_flash_XC080404.img) for each subject.
    At this moment xjView only handles pulse-like event. For events with non-zero durations, do it yourself.

    SPM process

    Almost the same with "process", except the image files variable (P for example), should be
    P =
    /mnt/nfs/proj/timing/P001.mat
    /mnt/nfs/proj/timing/P002.mat
    By loading P001.mat, you will get a string array with each row an preprocessed image name such as
    /mnt/nfs/proj/timing/subjects/ss082104/swafss082104-0003-00001.img
    These files will be used by SPM.
    The output of "SPM process" is a directory called FixedEffect1 in each subject's directory. In FixedEffect1 are beta images. (If FixedEffect1 already exist, xjView will create FixedEffect2 and put beta images there. And so on.).

    contrast

    Select (or type) the 2 variables (P and c, for example) whose contents are the beta files and contrast vector, respectively.

    P is a cell array, with each component a list of beta files: e.g.
    P{1}=
    /mnt/nfs/proj/gang/tce/betas2/beta_disptime_sAB091305.img
    /mnt/nfs/proj/gang/tce/betas2/beta_disptime_sCD091205.img
    /mnt/nfs/proj/gang/tce/betas2/beta_disptime_sEF091205.img
    /mnt/nfs/proj/gang/tce/betas2/beta_disptime_sGH100705.img
    /mnt/nfs/proj/gang/tce/betas2/beta_disptime_sIJ091205.img
    /mnt/nfs/proj/gang/tce/betas2/beta_disptime_sKK090905.img
    /mnt/nfs/proj/gang/tce/betas2/beta_disptime_sLL091205.img
    c is a vector: e.g.
    c = [1 0 0 0 -1 0 0 0]
    The length of P and c should be the same. In the above example, a T test will be done on the difference of P{1} and P{5}.
    Then xjView asks you where to save the resulted T-test image. After you are done, xjView automatically loads the T-test images.
    If you want to do a lot of contrasts, use SPMonesampleT.m instead.

    ROI: retrieve signal

    Almost the same with "process", except that you don't input modulator, but input correlator. (Indeed modulator and correlator are the same.) This correlator is also optional. Note, signal from the current displayed voxels will be retrieved.

    ROI: plot

    Select the mat file produced by "ROI: retrieve signal" and plot time series of ROI.

    ROI: correlation

    Select the mat file(s) produced by "ROI: retrieve signal" and plot correlation between different regions. If only 1 mat file is selected, plot auto correlation.