This chapter demonstrates three SPHARM-MAT utilities.
Exercise 7.1 Import shows how to import (1) binary images stored as nifti and analyze files and (2) surface objects stored as stl and Amira matlab files.
Exercise 7.2 Average Objects shows how to create an average surface, which can be used as the atlas in group analysis. In a typical study, you can select a set of control objects and run this utility to create an atlas that represents an average normal surface. This utility implements the following steps: (1) let the atlas be the first model; (2) align each model to the atlas using SHREC; (3) let the atlas be the mean of all the data; and (4) repeat (2) and (3) until the atlas converges. See Surface Visualization (icosa4) for an example atlas. Once the atlas is created, you can use SHREC to register all the individual objects to the atlas (instead of using an individual object as the template, which was used in Exercise 5.2 SHREC Alignment).
Exercise 7.3 Scale Objects shows how to scale a set of SPHARM objects. The scaling factors need to be pre-computed by users and provided as a csv file as an input file.
This exercise was tested on a WinXP machine (3GHz CPU, 3.25G RAM) running Matlab 7.7.0 (R2008b). It took a few minutes to finish.
Major Steps
Task
Import surface meshes and binary objects of various different formats
Input
SpharmMatDir/data/Ex0701/hip00_org/*_surf.m: Amira matlab surface mesh
SpharmMatDir/data/Ex0701/hip00_org/*_bim.*: Analyze binary objects
SpharmMatDir/data/Ex0701/hip00_org/*_surf.stl: STL surface mesh
Output
SpharmMatDir/data/Ex0701/hip01_res/*_obj.mat: Surface meshes
SpharmMatDir/data/Ex0701/hip01_res/*_bim.mat: Binary objects
Steps
Make an output directory SpharmMatDir/data/Ex0701/hip01_res
Run SPHARM_MAT.m under Matlab
Click Import button
In the right panel, let ResampleFactor be 1
In the right panel, select SpharmMatDir/data/Ex0701/hip01_res as OutDirectory
Be sure to run this experiment three times by selecting the following files as input files
- *_surf.m files under SpharmMatDir/data/Ex0701/hip00_org
- *_bim.hdr files under SpharmMatDir/data/Ex0701/hip00_org
- *_surf.stl files under SpharmMatDir/data/Ex0701/hip00_org
Click OK button (See Screen Capture for Import)
Task
Visualize binary objects or surface meshes
Input
SpharmMatDir/data/Ex0701/hip01_res/*.mat
Output
SpharmMatDir/data/Ex0701/hip01_res/PNG/*.png
Steps
Notes
Useful Tips
This exercise was tested on a WinXP machine (3GHz CPU, 3.25G RAM) running Matlab 7.7.0 (R2008b). It took a few minutes to finish.
Major Steps
Task
Create an average by iteratively aligning all the individual objects together
Input
SpharmMatDir/data/Ex0702/hip05_prm/*_prm.mat: This folder is a subset of SpharmMatDir/data/Ex0501/hip05_reg/alignParam/*_prm.mat, where only right hippocampi of controls are included.
Output
SpharmMatDir/data/Ex0702/hip06_reg/*.*: atlas.mat is the average, *_als.mat files are individuals registered to the atlas.
Steps
Task
Visualize SPHARM reconstructions in the object space
Input
SpharmMatDir/data/Ex0702/hip06_reg/*_alt.mat
Output
SpharmMatDir/data/Ex0702/hip06_reg/PNG/*.png
Steps
Notes
Useful Tips
This exercise was tested on a WinXP machine (3GHz CPU, 3.25G RAM) running Matlab 7.7.0 (R2008b). It took a few minutes to finish.
Major Steps
Task
Scale objects using user-specified scaling information
Input
SpharmMatDir/data/Ex0703/hip04_des/*_des.mat: This folder is a copy of SpharmMatDir/data/Ex0401/hip04_des/*_des.mat.
SpharmMatDir/data/Ex0703/hip05_scl/volume_sf.csv: User-specified scaling factors
Output
SpharmMatDir/data/Ex0703/hip05_scl/*_scl_des.mat
Steps
Task
Visualize original surface and SPHARM reconstructions in the object space
Input
SpharmMatDir/data/Ex0703/hip04_des/*_des.mat: before scaling
SpharmMatDir/data/Ex0703/hip05_scl/*_scl_des.mat: after scaling
Output
SpharmMatDir/data/Ex0703/hip04_des/PNG/*.png
SpharmMatDir/data/Ex0703/hip05_scl/PNG/*.png
Steps
Select DisplayObjs under the Utils pop-up menu (bottom-left corner)
Be sure to run this experiments four times by setting different configurations in the right panel as follows
- Run 1 and Run 3: let Space be object, Mesh be orig, Shade be both, Overlay be adc_paramap, Export be png, Degree be empty
- Run 2 and Run 4: let Space be object, Mesh be icosa4, Shade be both, Overlay be adc_paramap, Export be png, Degree be empty
In the right panel, click ..... button next to Select Input, and select the following files in four different runs respectively
- Run 1 and Run 2: SpharmMatDir/data/Ex0703/hip04_des/*_des.mat
- Run 3 and Run 4: SpharmMatDir/data/Ex0703/hip05_scl/*_scl_des.mat
Click OK button (See Screen Capture for Surface Visualization (orig, icosa4))
Notes
Useful Tips