An SPM8 toolbox for automating MRIs to FEA models for TTFields
Takes a DICOM MRI directory as input and outpus binarized image masks for use in FEA mesh generation.
A more complete background and characterization of the workflow can be found at: Timmons, J.J. et al 2017 Phys. Med. Biol. 62 8264.
- Download the repo (Clone or download > Download ZIP) and unzip into SPM8/toolbox (or elsewhere)
- In MATLAB, add the SPM8 path
- Add the path and subpaths of TTFields-Workflow
- Type and enter "TTFs" in the MATLAB console
- Within the prompt, navigate to a DICOM directory for segmentation and select all images; ctrl-A then Enter then click "Done"
addpath('C:\spm8')
addpath(genpath('C:\spm8\toolbox\TTfields-Workflow-master'))
TTFspyScanIPScript and batScript, uncommented, can be used to generate ScanIP post-processing and initialization scripts, respectively. We use them for speed/convenience
Most dependencies have been included, but they are listed below along with their sources
Required but not included. Please see Mathworks.com
Y. Huang, J.P. Dmochowski, Y. Su, A. Datta, C. Rorden, L.C. Parra, Automated MRI Segmentation for Individualized Modeling of Current Flow in the Human Head, Journal of Neural Engineering, 10(6):066004, 2013.
Tools for NIfTI and ANALYZE image by Jimmy Shen
Cylinder generation function by Wei Pan
k-nearest neighbors search by Yi Cao
normal vector algo by Jered Wells
