3.1.1 Optimize Configfile
How to optimize your Configfile
The default configfile as shown in section 3.1 Configuration File contains only the minimum tags required for proper functioning of DIFF_CALC. Do not remove any of the default tags, or the program may give you errors. However, there are a number of other tags that can be copied and pasted into your configfile in order to set some default settings to suit your needs. Some extra descriptions for the tags which are not self-explanatory is included below. Please copy and paste the tags and comments that you desire exactly as they appear below. Do not include the extra descriptions, only the comments surrounded by <!-- -->.
Usage Options
The default working directory is set as your home directory. However, if you have a location where your data is stored, you may wish to set your curdir appropriately. See the example below:
<!-- this tag defines the initial working directory. This should be where your data is contained -->
<!-- the default working directory is your home directory -->
<curdir>/home_directory/my_data_directory</curdir>
Tensor Fitting Options
The default tensor fitting option is weighted linear fitting. The user can set their desired fitting algorithm with this tag:
<!-- Default tensor fitting option: 0 = linear, 1 = non-linear -->
<diff_par_a>1</diff_par_a>
To set robust fitting default options use the following. The software's default is non-robust.
<!-- Use a robust tensor fitting algorithm? 0 = non-robust 1 = robust -->
<robust_par_a>0</robust_par_a>
A histogram of the residuals for each slice is displayed by default during the tensor fitting. Use this tag if you would like to turn off this histogram. Note that the residuals can clearly show if there are any problems with your data, and so can be very helpful.
<!-- Display residuals? 0 = yes, 1 = no -->
<residue_par_a>0</residue_par_a>
For the non-linear tensor fitting method, a cumulative histogram of the residuals is displayed by default. Use this if you do not want to display the residuals. See the above discussions for reasons to display the histogram. In a few cases, with very very large data sets (256 x 256 x 150 x 120 directions for example) IDL may run out of memory. If this happens, set the value of this tag to 0.
<!-- Display residual histogram? 0 = no, 1 = yes -->
<residual_stat_flag>1</residual_stat_flag>
This option will allow you to save the cumulative histogram. Please heed the warning included in the tag description. Having this tag set to 1 has caused IDL to run out of memory, as it can be a very large array. The default for this tag is don't save.
<!-- save the residual histogram as an IDL array. WARNING! This array can be huge -->
<!-- 1 = save. Note: this is only effective if residual_stat_flag = 1 -->
<!-- 0 = don't save -->
<save_global_residual_array_flag>0</save_global_residual_array_flag>
Occasionally, DWI data can contain zero values. This is problematic for the tensor estimation. There are 3 ways that TORTOISE can handle this situation using the following flag. If the user sets the flag to 1, then any voxel which contains a zero value in any of the DWI images will be masked out, and no tensor fitting will be performed on that voxel location. If the user sets the flag to 0, then zero value voxels will be removed from the tensor fitting, and the fit will be based on all remaining voxels. If the user sets the flag to 2 (this is the default option) then the zero point is replaced using a median filter of the surrounding tissue. Warning: if the flag is set to 0, and there are a large number of 0 values in your DWI dataset, then it is possible that too many points will be removed, and the tensor fitting will fail with an error message will report a "singular matrix." If this happens, please change the flag to 1 or 2 so that zero value points will either be masked out or replaced by the median filtering.
<!-- mask zero values from tensor fitting? 0 = exclude zero points from fitting, 1 = mask out zero points -->
<!-- 12 = use median filter -->
<mask_zero_point>2</mask_zero_point>
Other Options
When masking the data, one can choose either to use bet21 or a simple threshold. Default is to use bet2.
<!-- 0 = simple thresholding, 1 = bet -->
<mask_par_a=1>1</mask_par_a=1>
Saving Options
<!-- if this keyword is set processed tensor data are masked before being saved -->
<!-- in addition, when exporting raw images, it masks the raw images being exported if a mask is defined -->
<!-- set to 1, or comment out -->
<mask_save_data>1</mask_save_data>
References
- S.M. Smith, Fast robust automated brain extraction, HBM 17(3):143-155, Nov. 2002. Abstract