MatrixUser v2.1 User Guide

Fang Liu
(leoliuf@gmail.com)

February 4, 2014

Contents

 1 What is MatrixUser
 2 Installing and Running MatrixUser
 3 Data Import
 4 Window Layout
 5 Function Library

1 What is MatrixUser

Most of the medical images (e.g. CT, MRI, PET, etc.) comprises multiple frames which represent slices, phases, timing etc. from the same imaging object. With the powerful support of multidimensional data representation, those images can be saved as multidimensional matrices in Matlab. However, within Matlab, most of image manipulation functions are limited or tailored for two-dimensional matrix. The MatrixUser is a matrix analysis software package which features functions designed and optimized specifically for manipulating multidimensional real or complex data matrix. Within a nice graphical representation, image analysis including multidimensional matrix display, matrix (image stack) processing and rendering can be conveniently accomplished with minimum efforts.

The current MatrixUser version (v2.1) is made available at SourceForge website. MatrixUser is released as a free software. This means that you are free to use and modify this software as your needs, as long as you acknowledge the original author in any future work. If you find MatrixUser useful for the publication of any scientific results, including a line in your acknowledgments section referencing to MatrixUser and this belowing address is requested.

MatrixUser downloading address:

https://sourceforge.net/projects/matrixuser/

2 Installing and Running MatrixUser

To run MatrixUser, a Matlab installment is required. The current MatrixUser version has been tested under the following Matlab versions:

Installing and running MatrixUser is easy, you just need to download MatrixUser source code which is distributed as a compressed file, then extract the MatrixUser root folder, put the folder to any location in you computer. To run MatrixUser, start Matlab, then simply run the ‘Main.m’ script under the MatrixUser root folder.

The MatrixUser main window (Figure 1) works as a matrix manager.


pict

Figure 1: MatrixUser Main Window


3 Data Import

Current MatrixUser version supports displaying any valid Matlab multi-dimensional matrix and Matlab structure variable. By default, MatrixUser reads Matlab base workspace, scans existing matrices in the Matlab session, then creates a matrix list for tracking matrix content. Once those matrices are updated by the user, MatrixUser will also update the matrix list. Moreover, there are several different approaches to import data from outside Matlab into MatrixUser. The imported matrices will be saved into Matlab base workspace. The import functions are located under ‘Load’ menu, including:

4 Window Layout

To activate MatrixUser display window, press ‘MatrixUser’ button. If the selected matrix contains complex value, four options are available for displaying magnitude, phase, real and imaginary of the matrix. Figure 4 demonstrates an overview of the window layout of the MatrixUser display window. The window consists of


pict

Figure 4: MatrixUser Display Window


  1. Matlab Default Toolbar

    Matlab toolbar provides basic interactive functions for displaying matrix. These functions include:

  2. MatrixUser Function Library

    Most of the matrix analysis functions are represented on function bench panel. MatrixUser groups these functions into categories and dynamically loads them according to the dimension size and compatibility of current display matrix. A multi-tab is used to contain individual function button associated with each function. The tabs under the multi-tab are used to switch between function categories, which include

  3. Matrix Calculator

    The matrix calculator consists of three control items, including a matrix expression editbox, an execution button ( pict ) and a matrix saving button ( pict ). Valid matrix calculation expression can be executed in the calculator and updated in the display window, serving as a convenient way to analyze matrix calculation result. Matrix concatenation and recombination can also be done in the calculator, for example, to side-by-side compare multiple 3D matrices (Figure 5). Some valid calculation examples are, but not limited to:


    pict
    Figure 5: MatrixUser Concatenation Example


    where A, B, C and D are multi-dimensional matrices with proper matrix size. Also note that the source matrices have to stay in the base workspace for being referenced. Pressing the execution button will perform the calculation and save the result as a temporary matrix. The user can also save the temporary matrix into workspace by pressing matrix saving button. The saved temporary matrix will have a ‘_tmp’ suffix by default.

  4. Matrix Display Axes

    The display axes renders an image for one slice of current matrix. The user can use mouse cursor to inspect the coordinate and value of any voxel. Moving mouse wheel back and forth moves the slice location along current dimension and updates the display axes.

  5. Matrix Color Control Group

    The matrix color control group provides a set of sliders, editboxes and popup menu which help control image color scheme and contrast. This group consists of

  6. Matrix Dimension Control Group

    MatrixUser measures the dimension size of the display matrix and assigns one slider and editbox for each dimension that is above 2 (i.e. no slider and editbox for the first and second dimension). These control items are located in individual dimension tab and can be used to switch among slices in current active dimension.

5 Function Library

  1. Display

    Matrix display functions are listed under this tab.

  2. QuickMath

    This function category performs quick math calculation for current matrix. A few commonly used math calculation are provided under this tab. Instead, complex calculation can be performed using matrix calculator as mentioned above.

  3. Transform

    This function category performs spatial transformation or fast Fourier transform (FFT) to current matrix.

  4. Process

    This function category performs basic matrix processing functions.

  5. ROI

    MatrixUser provides a set of function buttons for performing Region-of-Interest (ROI) analysis (Figure 14). To create a ROI, the user needs to click ROI button first, then draw a ROI on the image axes. The statistical measures (i.e. mean, standard deviation and relative standard deviation) for voxels in delineated ROI is calculated and updated with moving ROI position or changing ROI shape. The ROI function buttons consists of


    pict
    Figure 14: Draw Multiple ROIs and Redraw on A Second Image. The source ROIs are in green, copied ROIs are in red.



    pict
    Figure 15: Histogram for One Image Slice


  6. Segment

    MatrixUser supports functions for performing multi-slice manual segmentation. To create a segmentation, click segmentation button, then draw a region on the image axes. The user can modify the region location and shape prior to confirming segmentation with double click. The segmentation buttons consists of


    pict
    Figure 16: Editing Segmentation


    To edit segmented region (Figure 16), press pict to open a segmentation manager. The manager records the type and location for existing segmented regions. The user can click any region item to inspect the location of the region. To edit chosen region, click ‘Edit’ button to activate the region outline. Both the shape and mask flag are editable for segmented region. After editing, click ‘Update’ to conform modification. The user can press pict to save current segmentation into a MAT file which contains a mask matrix and a cell array storing segmentation location information. The user can also press pict to save the mask matrix into workspace. Pressing pict can load previous segmented regions from a saved MAT file. Notice that the user can press pict to remove segmentation from overlapping with background matrix.

  7. Surface

    This function category generates surface or mesh plot for current image.

  8. Matlab

    Matlab default image tools (Figure 17) are tailored for MatrixUser and included in this category.


    pict
    Figure 17: Matlab Tools


  9. More

    Uncategorized functions are categorized under this tab.


    pict
    Figure 20: Reslice 3D Matrix. An example of 3D reslicing generates a new stack of images in the oblique plane from an axial human knee MRI image stack. Note that the resliced images are extracted from the plane perpendicular to the indicating line on the left window.