|
This is a preliminary version of the diffusion simulation tractography (DST) software.
DST is mainly coded in C and
utilizes several subroutines written in Fortran 77 as well.
It has been extensively tested on SUN and HP-UX machines, with gcc
and g77/f90 compilers,
but it should also work on Linux systems.
Here is the reference
that gives detailed information about the techniques
behind the DST software package.
1. Install the IDA package: IDA
This is a released software package from ACTS Collection -
SUNDIALS.
After the file is decompressed and untarred, instructions on
how to compile and install it can be found in the file
./sundials/doc/Readme.
The functions in IDA are called by the fiber tracking program
ftroi to solve the anisotropic diffusion equation.
2. The fiber tracking program: FTROI
Minor modifications need to be made in Makefile and header.h
for compiling and running the program correctly.
Makefile
Once the file is decompressed and untarred, successful compiling of the source code requires
minor modifications to Makefile, including the IDA
library location SUNDIALS_INC and SUNDIALS_LIB,
the current Fortran compiler FC, and the compiler option
CFLAG for mixed C-Fortran programming.
As on the HP-UX system with gcc and f90 I am now using,
the option is
  CFLAG = -I$(SUNDIALS_INC) -L$(SUNDIALS_LIB) -lc -lcl -lm -Wall.
As for the SUN machine I tested with gcc and g77,
the option is
  CFLAG = -I$(SUNDIALS_INC) -L$(SUNDIALS_LIB) -lg2c -lm -Wall.
header.h
Basically the program supports two types of tensor data input style.
The first is the DE style,
in which the tensor data is in one single file with
its Dxx component stored first, then Dyy,
Dzz, Dxy, Dxz, Dyz, in this order.
The second is the AU style,
where the tensor data has six files,
one for each of the independent tensor components.
The binary storage format is expected for the input tensor data, which is default.
However, ASCII plain text format is also supported by defining
the macro ASCII_DATA_FILE.
Other macro definitions that usually need to be adjusted are those specifying
the dimension and voxel size of the tensor data, and
the criteria set which controls the pathway connection and growth.
An interpolation is recommended for the tensor data
such that it gets a uniform voxel size.
ftroi
: the executable
If AU is defined in header.h,
the command-line interface will be
  ftroi <tract_basename> <6 dt_file>
<x1> <x2> <y1> <y2> <z1> <z2>
If DE is defined in header.h,
the command-line interface will be
  ftroi <tract_basename> <1 dt_file>
<x1> <x2> <y1> <y2> <z1> <z2>
The command-line arguments:
-
<tract_basename>
Base name for files of the computed tracks. Sequence number will be
automatically appended to the end of the base name, starting from 0.
Each file corresponds to one tracking start point, if there are computed tracks
from the point. There are five columns in the saved data file.
The first column contains pathway sequence number, starting from 1.
The second to fourth column stores the coordinate index of a voxel
in x, y, and z direction, respectively. The attribute value of the voxel,
fractional anistropy in the current code, is in the fifth column.
-
<6 dt_file> Six independent tensor component files,
in the order of Dxx, Dxy, Dxz,
Dyy, Dyz, Dzz.
-
<1 dt_file> A single tensor data file.
-
<x1> ... <z2>
The start and end coordinate indices of the tracking start region
in x, y, and z directions.
3. The post-processing program: FTVTK
The computed pathways are smoothed out
by using B-spline least-square approximations and then converted into
VTK data format (polydata) for visualization.
Minor modifications are expected in Makefile, including
the current Fortran compiler FC, and the compiler option
CFLAG for mixed C-Fortran programming,
which is similar to the case of ftroi.
The command-line interface of ftvtk is
  ftvtk input_file output_file dx dy dz order num_pp
The command-line arguments:
-
input_file
The computed track data file saved from running ftroi.
-
output_file
The smoothed track data file in VTK polydata format.
-
dx dy dz The voxel size.
-
order
The B-spline order.
Usually order = 3 gives satisfying results.
-
num_pp
The number of polynomial pieces.
Usually num_pp = 4 or 5 gives satisfying results.
4. Test run
Briefly, run ftroi first, then ftvtk.
A nice software tool for checking the results is
MayaVi,
a free scientific data visualizer built on VTK.
Disclaimer
This is a preliminary examination version of DST. Permission is granted
for using the software for the purpose of examination. Users are not
permitted to distribute the software. This software package comes with
no warranty. The authors are not liable for any loss/damage or
inconvenience caused in the use of this software package or any
modification thereof. You use it at your own risk.
|