Eigen file (.eig) to NIfTI converter
eig2nifti converts .eig.nii.gz files saved by BrainSuite Diffusion Pipeline (BDP) to standard NIfTI-1 format. It takes .eig.nii.gz file as input and writes out corresponding eigenvector and eigenvalue files in standard NIfTI-1 format.
where, input_eig_file is a character array of input filename (.eig.nii.gz) and output_base is character array of file-prefix for output filenames. Following example shows eig2nifti in action and explains the output files:
>> eig2nifti('2467264c.dwi.RAS.correct.eig.nii.gz', '2467264c.tensor') Reading eig file...Done Saving files... Saved V1 file: 2467264c.tensor.V1.nii.gz Saved V2 file: 2467264c.tensor.V2.nii.gz Saved V3 file: 2467264c.tensor.V3.nii.gz Saved L1 file: 2467264c.tensor.L1.nii.gz Saved L2 file: 2467264c.tensor.L2.nii.gz Saved L3 file: 2467264c.tensor.L3.nii.gz
where L1 file contains the largest eigenvalues with corresponding eigenvector saved in V1 file. Similarly, L2 file contains the second largest eigenvalues with corresponding eigenvector saved in V2 file followed by L3 file and V3 file. All eigenvalue files (L1,L2,L3) are 3D volume while eigenvector files (V1,V2,V3) are 4D volume with last dimension containing the eigenvectors.
eig2nifti depends on several other functions which are included along with the download zip. All files should be added to the MATLAB path. See included sample_eig2nifti.m for another example of running eig2nifti.
Last Modified: Oct 9, 2013
Authors: Chitresh Bhushan