Search tips
Search criteria 


Logo of nihpaAbout Author manuscriptsSubmit a manuscriptHHS Public Access; Author Manuscript; Accepted for publication in peer reviewed journal;
Neuroimage. Author manuscript; available in PMC 2011 June 1.
Published in final edited form as:
PMCID: PMC2952839

LONI MiND: Metadata in NIfTI for DWI


A wide range of computational methods have been developed for reconstructing white matter geometry from a set of diffusion-weighted images (DWIs), and many clinical studies rely on publicly-available implementations of these methods for analyzing DWI data sets. Unfortunately, the poor interoperability between DWI analysis tools often effectively restricts users to the algorithms provided by a single software suite, which may be suboptimal relative to those in other packages, or outdated given recent developments in the field. A major barrier to data portability and the interoperability between DWI analysis tools is the lack of a standard format for representing and communicating essential DWI-related metadata at various stages of post-processing. In this report, we address this issue by developing a framework for storing Metadata in NIfTI for DWI (MiND). We utilize the standard NIfTI format extension mechanism to store essential DWI metadata in an extended header for multiple commonly-encountered DWI data structures. We demonstrate the utility of this approach by implementing a full suite of tools for DWI analysis workflows which communicate solely through the MiND mechanism. We also show that the MiND framework allows for simple, direct DWI data visualization, and we illustrate its effectiveness by constructing a group atlas for 330 subjects using solely MiND-centric tools for DWI processing. Our results indicate that the MiND framework provides a practical solution to the problem of interoperability between DWI analysis tools, and it effectively expands the analysis options available to end users.

Keywords: LONI MiND, metadata, DWI, DTI, HARDI, software interoperability, data sharing

1. Introduction

Recent advances in diffusion-weighted MRI processing have provided significant insights into central nervous system white matter architecture, its development and pathology. The general concept relies on the principle that white matter nerve fibers present anisotropic barriers to spin diffusion in vivo, and each DWI provides, at every voxel, a measure of diffusion restriction in the diffusion-weighting direction (Basser et al., 1994a,b). Post-processing of a set of directionally-weighted DWIs can produce estimates of a diffusion tensor in each voxel. Assuming each voxel contains a single fiber population, the principal eigenvector of this tensor aligns with the orientation of fibers in that voxel (Basser et al., 1994a,b; Pierpaoli et al., 1996). More sophisticated DWI processing algorithms for high-angular resolution diffusion imaging (HARDI) can produce complex diffusion orientation distribution functions (ODFs) which capture the likelihood of spin diffusion in any given direction on the unit sphere, S2 (Frank, 2002; Tuch et al., 2002). Still other HARDI approaches deconvolve the signal attenuation profile to recover the underlying spherical fiber orientation distribution (FOD) (Tournier et al., 2004; Sakaie and Lowe, 2007; Patel et al., 2009).

Since a substantial computational background is necessary to implement the underlying mathematical models and perform the diffusion tensor or HARDI reconstructions, many clinical investigators rely on publicly-available software tools to carry out analyses of white matter architecture (e.g. Stadlbauer et al. (2007); Haas et al. (2009); Weaver et al. (2009)). Unfortunately, interoperability between popular software packages for DWI analysis is rather lacking. Figure 1 illustrates the current state of compatibility among six common analysis packages (Jiang et al., 2006; Smith et al., 2004; Fillard et al., 2009; Zhang et al., 2009; Cook et al., 2006; Pieper et al., 2004). Despite the fact that all of these tools compute the same mathematical objects, they each employ custom data formats for the representation of these structures. It can thus be quite difficult for an investigator to, for example, compute diffusion tensors using one tool, and do post-processing on the tensor field with another. This incompatibility leads to a state of “vendor lock-in,” in which users of certain tools are forced to continue using those tools, or else invest significant effort in data migration. Ultimately, the inability to move easily between data analysis packages limits the scientific and biological questions that can be addressed. Investigators without the ability to implement their own computational tools may be forced to rely on a single software package for data analysis, and no single suite will contain state-of-the-art algorithms for all possible DWI processing stages. For example, the MedINRIA package (Toussaint et al., 2007) implements an algorithm for diffusion tensor estimation using a log-Euclidean framework which, unlike most other methods, ensures positive semidefiniteness of the tensor (Fillard et al., 2007). A user may wish to use this advanced method for tensor estimation, but also desire the benefits of the tensor-deflection (TEND) algorithm (Lazar et al., 2003) for fiber tracking relative to the streamline approach provided in MedINRIA. A TEND implementation is provided in Camino (Cook et al., 2006), but unfortunately, due to the custom tensor data format used by MedINRIA, significant extra effort and tailored code is required to convert the log-Euclidean tensors into a Camino-supported format. Users who are unwilling or unable to decipher the formats and perform the translation will be forced to compromise between tensor estimation and fiber tracking algorithms.

Figure 1
DWI software compatibility matrix. Compatibility was tested using the diffusion tensor capabilities of each software package. Each package was used as a “Producer” to estimate diffusion tensors for a test data set. The data file produced ...

There are two potential approaches to resolving the incompatibility of file formats between among the various DWI processing tools. First, each tool might attempt to provide functions for import and export to each of the other tools. Indeed, a few of the packages listed in Figure 1 provide several conversion utilities for data interchange with other popular suites. This is a reasonable approach in a climate containing only a few analysis packages, but it rapidly becomes untenable as greater numbers of investigators implement and distribute utilities for their own DWI processing algorithms. The second option encourages all software tools to utilize a common format or framework for data storage and interchange. The unique challenge with respect to this option for DWI is that the commonly-used file formats in neuroimaging (Analyze, NIfTI, MINC) do not provide guidelines for storing the metadata descriptions that are necessary for the proper interpretation of many DWI-related data structures. Raw diffusion-weighted data sets, diffusion tensors, ODFs, and other intermediate objects in DWI processing all require important metadata descriptors, and the lack of any widely-accepted standard for storing these has contributed to the proliferation of custom formats in DWI analysis tools. There has been a prior effort to encapsulate the metadata for at least raw DWIs and diffusion tensors in the NRRD files used by 3D Slicer (Pieper et al., 2004), but adoption of this format by other tools has been minimal.

In this report, we address the need for a common method of DWI-related metadata representation by introducing a framework for storing Metadata in NIfTI for DWI (MiND). We rely on the standardized extension mechanism of the popular NIfTI file format (Cox et al., 2004) to include the metadata required for full interpretation of raw diffusion-weighted data sets, diffusion tensor reconstructions, and intravoxel spherical functions (such as ODFs, FODs, etc.) defined both at discrete locations on S2, and continuously over the spherical domain. We outline the NIfTI extension mechanism and construction of MiND extended headers for these various data structures below. We then demonstrate the suitability of this framework as a means for data sharing and interchange by developing a set of software tools, each of which relies only on metadata extracted from the MiND extended header to interpret the data and perform its stage of DWI processing. We also show that the DWI metadata in the MiND extended headers is sufficient for direct visualization by implementing an interactive, 3D viewing utility capable of rendering any NIfTI file constructed according to the MiND framework. Finally, we illustrate that the MiND framework provides a viable solution for typical neuroimaging tasks by demonstrating its use in constructing DWI group atlases from 330 individuals.

2. Materials and Methods

The primary goal in developing the MiND framework was to facilitate and streamline the process of DWI data exchange both between research groups and between computational tools. To this end, we have developed four new NIfTI header extensions to describe the most common DWI-related data structures. We begin with a brief review of the NIfTI extension mechanism, and then we provide the details of the MiND extensions for representing diffusion MRI data. For brevity, we will often refer to a NIfTI file containing an extended header adhering to the MiND framework as a “MiND file,” but we stress that all such files are indeed specially-constructed, valid NIfTI files.

2.1. NIfTI-1.1 Standard Header and Extension Mechanism

The NIfTI-1.1 format specification includes a provision for extending the standard header to include additional image metadata. NIfTI-1.1 defines both dual- file ( .hdr + .img) and monolithic ( .nii) formats; in this report, for clarity, we focus exclusively on the latter. As the .nii form is essentially a concatenation of the dual- file form (with minor changes), the methods and results we present here can be applied in a straightforward manner to either case. Figure 2 provides a high-level overview of the organization of a monolithic NIfTI-1.1 file with a MiND header extension.

Figure 2
Organization of a monolithic NIfTI-1.1 file containing an extended MiND header. The file begins with the standard NIfTI header (348 bytes + 4 extension bytes). The extended header containing MiND-formatted image metadata then follows. Finally, the voxel ...

The standard NIfTI-1.1 header is 348 bytes long (numbered 0–347), and provides for the representation of important image-associated metadata. A comprehensive review of all the standard header fields is beyond the scope of this document, but we highlight a select few which are essential to the construction and understanding of MiND-extended NIfTI files. The dimensionality of the image volume is stored in an array of 8 short integers, from bytes 40–55. The first of these (i.e. dim[0]) indicates the number of dimensions (up to 7) over which the data set is defined. The remaining 7 short integers indicate the size of each dimension. The NIfTI specification reserves the first 4 of these ( dim[1]dim[4]) for x, y, z, and time, respectively—vector-valued data sets require a 5th dimension to store the vector length. NIfTI-1.1 also requires that bytes 68–69 contain a short integer representing the “intent code” of the data. A complementary field beginning at byte 328 allows for an “intent name” as an array of up to 16 characters. Finally, a floating point value stored at byte 108 gives the byte offset in a monolithic .nii file at which the voxel data block begins; this field is ignored for dual format files.

The NIfTI-1.1 extension mechanism provides a systematic means for storing metadata in addition to that contained in the standard header, if necessary. Following the 348-byte standard header are 4 additional “extension” bytes which serve to indicate the presence of an extended header. A non-zero value in the first of these bytes (byte 348) signifies that an extended header follows; the remaining three bytes are currently unused. The extended header then begins at byte 352 and takes the form of a series of fields. Each field begins with two integers: the first ( esize) indicates the total size, in bytes, of the field, and the second ( ecode) is a coded value which indicates the format and contents of the remaining data in the field. NIfTI-1.1 requires that esize be a multiple of 16. Note also that the value of esize includes the 8 bytes required to store the esize and ecode integers themselves. This extension mechanism provides a unique advantage with regard to interoperability in that existing NIfTI-supporting tools which are not MiND-aware will, according to specification, ignore the information that they do not understand; i.e., the inclusion of MiND metadata should pose no adverse burden to existing software, but will benefit packages that recognize the MiND structures.

All MiND-extended volumes are vector-valued structures arranged on a 3-dimensional voxel lattice; a NIfTI file containing such a data structure must take on specific values for the standard NIfTI header fields mentioned above. For example, as required by the NIfTI-1.1 specification, these vector-valued data sets are represented as 5-dimensional ( dim[0] = 5). The length of the vector stored in each voxel resides in dim[5]; this value is determined by the specific data structure being represented (see Sections 2.3–2.7). Furthermore, as a vector-valued data set, the intent code for all MiND files is 1007, the NIfTI code for vector representations. In addition, the intent name of the volume should be set to “MiND” for identification as a MiND-extended file. For monolithic files, the offset field must account for the size of the extended MiND header, and the first extension byte must obviously be non-zero as MiND files, by definition, carry an extended header. Figure 3 summarizes these important requirements for MiND-formatted volumes. MiND-aware software will recognize these values in the standard header to identify valid NIfTI files containing MiND-formatted data. For files passing this sanity check, the MiND extended header and voxel data block will then be parsed using one or more of the schemata presented in the following sections.

Figure 3
Summary of standard header field values for MiND-extended files. MiND files are vector-valued NIfTI data sets with an intent name of “MiND” and an extended header. The values shown in the rightmost column should appear in the standard ...

2.2. LONI MiND Extended Header Codes for DWI

The MiND extensions to the NIfTI-1.1 header provide a standard specification for data sharing and interchange for diffusion-weighted MRI data sets at various stages of processing. These representations have been enabled by the assignment of several LONI MiND ecode values by the NIfTI Data Format Working Group. Each of these codes indicates how the subsequent data in the extended header field is to be interpreted. We briefly explain the meaning of each of these ecodes before describing how these coded header fields are assembled to provide metadata representations for common DWI data structures.

  • NIFTI_ECODE_MIND_IDENT = 18: The contents of a MIND_IDENT field are character data which serve to identify the type of DWI data structure represented by the MiND-extended header fields which follow.
  • NIFTI_ECODE_B_VALUE = 20: A B_VALUE field contains a single floating point value representing a diffusion-weighting b-value in units of s/mm2.
  • NIFTI_ECODE_SPHERICAL_DIRECTION = 22: A SPHERICAL_DIRECTION field contains two floating point values which represent a direction in spherical coordinates. The azimuthal angle is specified first, in radians, followed by the zenith (polar, or elevation) angle. In the mathematics convention, this ordering is denoted (θ, [var phi]); in the physics convention, the notation is reversed, ([var phi], θ). A radial coordinate is omitted as this field specifies direction only, not position.
  • NIFTI_ECODE_DT_COMPONENT = 24: The contents of a DT_COMPONENT field are a set of 32-bit integers which specify the indices of a single diffusion tensor component. The number of integers corresponds to the order of the tensor: e.g. a 2nd order tensor component Dij has 2 integer indices, while a 4th order tensor component Dijkl has 4 indices. The integers are given in the indexing order: i.e. i before j before k before l, etc. Furthermore, the indices are 1-based, so that D11 represents the upper-left element of a 2nd order diffusion tensor.
  • NIFTI_ECODE_SHC_DEGREEORDER = 26: The SHC_DEGREEORDER field specifies the degree (l) and order (m) of a spherical harmonic basis function ( Ylm) as a pair of 32-bit integers, with the degree preceding the order.

These five MiND ecode values provide fields which can be assembled to provide full metadata representations for four of the most common data structures encountered in diffusion MRI: raw diffusion-weighted data sets, diffusion tensor reconstructions, spherical reconstructions (ODFs, FODs) defined discretely, and spherical reconstructions defined continuously. The unique details of the MiND representation for each of these data structures are provided in the subsections which follow.

2.3. Raw Diffusion-Weighted Data

A typical diffusion-weighted MR experiment for white matter architecture reconstruction involves the acquisition of multiple full-brain DWIs, each measured with the diffusion-weighting gradient applied along a different direction and possibly also with a different b-factor, which is related to the magnitude of the diffusion wavevector, q (Le Bihan et al., 2001; Tuch, 2004). Knowledge of the gradient direction and b-value is essential for proper interpretation of each DWI, but most neuroimaging file formats do not specify a method for storing this data. Moreover, while the DICOM specification does recommend tags for the gradient direction and b-value (Digital Imaging and Communications in Medicine Standards Committee, 2002), in practice, the location of this information in the DICOM header is dependent on the scanner manufacturer and model. Due to the unavailability of a standardized method for storing this metadata, current software tools either develop custom formats or require the user to provide a “gradient table” or “b matrix” maintained independently from the DWI data set it describes.

The MiND specification provides a standardized manner for storing this important metadata in direct association with the DWIs themselves. A sample MiND header for a DWI data set is depicted in Figure 4. We first set the length of the vector stored in each voxel, dim[5] , equal to the number of images acquired. In forming the MiND extended header, we begin with a MIND_IDENT field ( ecode value 18) containing the string “RAWDWI” to indicate that a description of a raw DWI data set follows. We then specify alternating B_VALUE ( ecode 20) and SPHERICAL_DIRECTION ( ecode 22) fields to indicate the b-value and gradient direction for each volume acquired during the experiment. Each pair of fields describes a single DWI volume, and they are provided in the same order as the vector elements in the voxel data block. Thus, the first B_VALUE/SPHERICAL_DIRECTION pair in the MiND header describes the first vector element (DWI) at each voxel, and so on. This scheme consolidates all of the data from an entire DWI scanning session into a single NIfTI file. Note that this schema enables the representation of studies with multiple b-values, as required, for example, in diffusion spectrum imaging (Wedeen et al., 2005).

Figure 4
MiND extended header for storing raw diffusion-weighted data. The MiND specification (top) begins with a “RAWDWI” identifier field and then continues with alternating fields describing the b-value and gradient direction for each DWI. A ...

2.4. Diffusion Tensor Reconstruction

From a set of six or more DWIs, each acquired with a different diffusion-weighting gradient direction, it is possible to estimate a 2nd order symmetric diffusion tensor at each voxel (Basser et al., 1994a,b; Pierpaoli et al., 1996). Acquiring a greater number of DWIs enables the reconstruction of higher-order tensors (Ozarslan and Mareci, 2003; Liu et al., 2004). The NIfTI specification provides an intent code for storing a 2nd order tensor Dij as a symmetric matrix in upper-triangular-packed form. Several existing software tools make use of this mechanism, although not all respect the tensor component ordering as specified in the NIfTI standard. NIfTI currently has no provision for representing higher-order tensor components which require more than two indices for unique identification, e.g. Dijkl.

The MiND representation for diffusion tensors has been designed to address these shortcomings. The length of the vector in each voxel is set to the number of diffusion tensor components specified—for a symmetric 2nd order tensor, dim[5] = 6; for a full 4th order tensor, dim[5]= 81, etc. Rather than attempt to dictate a tensor element packing and risk the possibility of certain implementations breaking the standard, the MiND representation for diffusion tensors requires applications to explicitly specify the tensor component ordering. The MiND extended header begins with a MIND_IDENTfield ( ecode18) containing the string “DTENSOR” to signal the upcoming tensor component fields. Each tensor component is then represented by a DT_COMPONENT field containing as many integer indices as necessary to specify a unique component, i.e. the number of indices is equal to the order of the tensor. The components are given in the same order as the vector elements at each voxel; the first DT_COMPONENT specifies the tensor element which is stored in the first vector position at each voxel, etc. The order of the tensor stored in such a file can be determined by reading all the DT_COMPONENT fields and finding the deepest index to take a non-zero value. If a full tensor is not specified (e.g. not all 81 elements are provided for what appears to be a 4th order tensor), then the missing elements are considered to be implied by symmetry, as this is a widely-employed assumption about the structure of diffusion tensors. Figure 5 summarizes the MiND schema for diffusion tensor representation.

Figure 5
MiND extended header for storing diffusion tensor data. The MiND extended header summary shown (top) represents a 2nd order diffusion tensor (bottom). The “DTENSOR” identifier field is followed by DT_COMPONENT fields which specify the ...

2.5. Discrete Spherical Functions

A great number of reconstruction schemes for HARDI result in the estimation of a spherical function. These include ODFs (Tuch, 2004), FODs (Patel et al., 2009), persistent angular structure (Jansons and Alexander, 2003), and others which are often computed for discrete locations on a dense spherical mesh. To correctly represent such a reconstruction, it is important to store not only the value of the function at the mesh vertices, but also the locations of the mesh vertices themselves. None of the commonly-used neuroimaging file formats provide a mechanism for the representation of such data.

The MiND extensions add to the NIfTI format the ability to represent spherical mesh vertex positions alongside the values of functions at those locations. The length of the vector at each voxel is specified as the number of mesh vertices at which the spherical function of interest has been computed. The MiND extended header starts with a MIND_IDENT field ( ecode 18) containing “DISCSPH-FUNC” to indicate that the remaining MiND fields represent the mesh vertices for a discretely-specified spherical function. The remaining MiND header fields are of the SPHERICAL_DIRECTIONtype, specifying the location of a vertex on the unit sphere, S2. These fields are listed in the same order that the vector elements are specified; thus, the first element in the vector at each voxel gives the value of the spherical function at the vertex located at the first SPHERICAL_DIRECTION. Figure 6 summarizes the MiND extension for representing discretely-defined spherical functions.

Figure 6
MiND extended header for representing discrete spherical functions. The MiND header (top) begins with a “DISCSPHFUNC” identifier and then provides the locations of the vertices of a spherical mesh at which the spherical function is defined. ...

2.6. Continuous Spherical Functions

HARDI reconstruction methods have also been developed for estimation of continuous, real-valued spherical functions (Alexander et al., 2002; Frank, 2002; Tournier et al., 2004; Hess et al., 2006; Descoteaux et al., 2007). These rely on the frequency domain representation of the ODF or FOD, i.e. they estimate a finite number of spherical harmonic coefficients. The spherical harmonic basis functions ( Ylm) are uniquely identified by a degree (l) and order (m). In order to represent a continuous spherical function using the frequency domain, it is thus necessary to store not only the values of the spherical harmonic coefficients, but also the degree and order which identify the particular basis function corresponding to each coefficient. Such a representation is unavailable in standard neuroimaging formats.

The MiND extended header for continuous spherical functions provides for the storage of both the degree and order of a spherical harmonic basis function. The length of the vector at each voxel ( dim[5]) is the total number of spherical harmonic coefficients which have been calculated. The initial MIND_IDENT field ( ecode 18) is assigned “REALSPHARMCOEFFS” to indicate that the data in the following MiND fields specify degree and order of the real-valued modified spherical harmonic basis commonly adopted in DWI post-processing (Descoteaux et al., 2007):


The remaining extended header fields are of type SHC_DEGREEORDER, and specify the degree and order of a set of spherical harmonic bases. These are provided in the same order as the vector elements at each voxel such that the first element in the vector at each voxel is the coefficient of the first spherical harmonic basis in the list of SHC_DEGREEORDERs. Figure 7 summarizes the MiND schema for the representation of continuous spherical data.

Figure 7
MiND extended header for representing continuous spherical functions. The MiND extended header (top) is identified with “REALSPHARMCOEFFS” and provides the degree and order of the spherical harmonic basis functions for which coefficients ...

2.7. Multi-MiND

In the previous sections, we have outlined the construction of MiND extended headers for several types of DWI-related data structures. In each case, the MiND header begins with a MIND_IDENT text field indicating which specific MiND schema follows. This organization makes it straightforward to store multiple representations in a single NIfTI file. The extended headers for such “multi-MiND” files are comprised of multiple concatenated MiND headers as described in Sections 2.3–2.6, with the only difference being that the length of the vector in each voxel, dim[5], is set to the sum of the elements required by each of the individual MiND-described structures. For example, a multi-MiND file containing 7 raw diffusion-weighted images and the corresponding 2nd order symmetric diffusion tensor reconstruction would contain a “RAWDWI” extended header followed by 7 pairs of B_VALUE/ SPHERICAL_DIRECTION fields, then a “DTEN-SOR” header followed by 6 DT_COMPONENT fields. The vector at each voxel would be of length 13, with the first 7 elements representing the diffusion-weighted measurements and the last 6 giving the independent components of the diffusion tensor. The multi-MiND scheme is useful primarily for storing multiple stages of DWI post-processing from a single scanning session; moreover, when used in this manner, it provides an inherent mechanism for maintaining data provenance (MacKenzie-Graham et al., 2008).

3. Results

To verify and demonstrate the utility of the MiND framework for DWI, we set out to develop a set of software tools and utilities for interacting with these files. We then attempted to utilize these MiND-centric software tools to develop a full DWI analysis suite, relying solely on the MiND schemata for data interchange between the individual processing components. In addition, we explored the potential for the MiND framework to simplify the visualization of DWI data sets at various stages of processing. Finally, we examined the capabilities of these MiND-aware tools in a high-throughput workflow in which we performed a group analysis of 330 individual DWI data sets.

3.1. User and Developer Tools

To facilitate integration of the MiND framework with new and existing tools for DWI analysis, and to aid users working with MiND files, we have developed software tools and input/output (I/O) libraries which can be downloaded from LONI MiND web site at A MiNDHeader program is provided for inspection of MiND-extended NIfTI files. Using the MiNDHeader tool, users can obtain details and summaries of the MiND metadata contained in any validly-constructed MiND file. We have also developed a MiND-aware NIfTI I/O library for the Java language, which we have utilized to implement our own MiND-centric DWI analysis suite (Section 3.2). Use of this I/O library greatly simplifies the process of reading and writing valid MiND-formatted data. We further provide a DWIDataPacker tool which simplifies the process of converting raw DWI data sets into the MiND format for subsequent processing with MiND-aware tools. The LONI MiND web site also contains supporting documentation and implementation details for the various ecodes and schemata presented in Section 2.

3.2. Diffusion Imaging Reconstruction and Analysis Collection

We have developed a suite of DWI processing tools built upon the MiND framework. The Diffusion Imaging Reconstruction and Analysis Collection (DIRAC) contains programs for diffusion tensor calculation and processing, as well as HARDI analysis tools including several for ODF estimation and FOD reconstruction. All of the tools within the suite rely on MiND-extended NIfTI files to provide metadata crucial to proper interpretation and processing of diffusion-weighted data sets, and any software package recognizing the MiND framework can seamlessly interoperate and exchange data with the DIRAC suite. The DWITensorCalculator tool, for example, determines the b-values and gradient directions for a raw diffusion-weighted data set using the MiND header as described in Section 2.3. After computing the tensor components, it writes the result to a NIfTI file using the diffusion tensor schema of Section 2.4. The DWITensorStatistician tool (or any other MiND-aware software) can then read this file, determine the component ordering correctly using the MiND header, and then compute various diffusion tensor metrics like fractional anisotropy, volume fraction, or mean diffusivity.

The DIRAC software is available as modules within the LONI Pipeline environment (Rex et al., 2003; Dinov et al., 2009). The Pipeline (available at provides a simple, user-friendly front end for parallelized neuroimage processing. In the Pipeline, computational tasks are represented graphically as “modules” which are connected to form “workflows.” Pipeline workflows are executed on a compute cluster comprised of more than 800 2.4 GHz CPUs. The MiND framework enables the DIRAC modules to be assembled into simple workflows suitable for batch processing of large numbers of subjects. Figure 8 presents a sample Pipeline workflow which implements the example given in the preceding paragraph. We note the paucity of input parameters (depicted as small filled circles) which need to be user-specified for each module—the MiND extended header eliminates the need for accessory metadata-containing input files by providing full descriptions of DWI-related data structures.

Figure 8
A sample LONI Pipeline workflow utilizing the DIRAC modules for DWI processing. The DIRAC tools rely on the MiND metadata in the input files to interpret the data structure contained therein. In this workflow, a MiND-formatted raw diffusion weighted data ...

3.3. Diffusion Imaging Visualization Application

We further assessed the ability of the LONI MiND extensions to simplify DWI-related data interchange by implementing a 3D viewer for MiND-extended NIfTI files. DWI data processing requires complex mathematical operations and often the simplest method of verifying accuracy of reconstruction is through visualization. The custom file formats currently implemented by many diffusion MRI software packages make it difficult for users to evaluate their data outside of those tools. Moreover, it forces all tool developers to maintain their own viewer implementations. Producing output in the standard MiND format has the potential both to improve software interoperability and simplify development.

Our Diffusion Imaging Visualization Application (DIVA) requires only a MiND-extended NIfTI file as data input. Using the MiND header, DIVA is able to determine the type of input that has been provided, e.g. a diffusion tensor field, or a discrete or continuous representation of spherical functions. Based on this assessment, DIVA selects and constructs an appropriate 3D glyph geometry (ellipsoid, ODF, etc.) and builds an interactive scene on-the-fly, relying solely on the MiND-formatted data itself. For more precise control of the rendering, the user may specify several optional viewing parameters or alternate glyphs, but the data itself is fully described by the MiND header. Figure 9 shows several sample DIVA visualizations. As DIVA requires only a MiND-extended NIfTI file, output from any software package which adheres to the MiND specification can be visualized in this manner. This fact underscores the potential of a standardized file format for DWI processing to simplify data exchange and analysis.

Figure 9
Sample DIVA visualizations generated directly from MiND-formatted data. DIVA relies exclusively on information in the MiND extended header to determine and render appropriate 3D geometry for visualizing DWI data sets. Left: perspective view of an axial ...

3.4. Atlas Construction

To further examine the practical utility of the MiND framework, we generated a “study-specific atlas” for a group of 330 DWI data sets, performing all DWI-related operations exclusively with MiND-aware software tools. Data between multiple stages in the atlas creation protocol was described solely by the MiND extended header to verify the framework’s practicality for typical neuroimaging tasks.

The data sets were acquired at the Centre for Magnetic Resonance (University of Queensland, Brisbane) using a 4 Tesla Bruker Medspec scanner (Bruker Medical, Ettingen) with a transverse electromagnetic headcoil. Diffusion-weighted scans utilized a single-shot echo planar technique with a twice-refocused spin echo sequence to minimize eddy-current induced distortions. A total of 105 scans were acquired per subject—94 diffusion-sensitized gradient directions plus 11 baseline images with no diffusion-sensitization. Imaging parameters were: b-value = 1159 s/mm2, TE/TR = 92.3/8259 ms, FOV = 230 mm × 230 mm, 55 × 2 mm contiguous slices. The reconstruction matrix was 128 × 128, yielding 1.8 mm × 1.8 mm in-plane resolution. Total acquisition time was 14.5 min.

The unweighted (b0) scans were averaged for each subject and registered to a mean deformation template (MDT) calculated following fluid alignment (Christensen et al., 1996) of each of the 330 volumes to a single randomly-chosen subject. Registration to the MDT was performed in affine (9-parameter) mode using FSL’s flirt tool (Jenkinson et al., 2002). Each subject’s b0 registration transform was also applied to the 94 diffusion-weighted images, and the DWI gradient directions and diffusion-weighting b-values were adjusted accordingly. These registered raw DWIs were then stored as MiND-formatted raw DWI data sets.

DIRAC tools were then used to compute the 2nd order diffusion tensor and a 6th degree spherical harmonic ODF reconstruction from each data set. Additional DIRAC modules computed the fractional anisotropy (FA) and volume fraction (VF) from the diffusion tensor data file (Basser and Pierpaoli, 1996; Pierpaoli and Basser, 1996), and the generalized fractional anisotropy (GFA) (Tuch, 2004) from the MiND file containing the spherical harmonic representation of the the ODFs. The mean and standard deviation for these standard scalar-valued maps were computed across subjects using conventional images processing tools; in this case, we used FSL’s fslmaths utility (Smith et al., 2004). Finally, we averaged the spherical harmonic coefficients in each voxel across all subjects to obtain a mean ODF volume. Alternative methods may also be used for averaging ODF fields, using the centroid with respect to metrics on the ODF manifold, such as the Fisher-Rao metric, or other information-theoretic distances on probability distributions (Chiang et al., 2007, 2008; Goh et al., 2009). The complete processing Pipeline workflow is depicted in Figure 10.

Figure 10
Study-specific atlas creation for 330 subjects using MiND-aware tools. All connections labeled “MiND” rely on the framework presented in this paper for data description. The registered raw diffusion-weighted data sets are stored in the ...

Atlas results are shown in Figure 11. All three mean scalar anisotropy maps—FA, VF, and GFA—highlight known conserved white matter regions. In addition, we observe that the standard deviation maps emphasize the edges of these white matter areas indicating the variability in the borders of these fiber pathways. Furthermore, we note that the mean ODF map contains accurately oriented and shaped ODFs in the genu and splenium of the corpus callosum, fornix, cingulum bundles, and internal and external capsules. These accurate reproductions of known anatomy confirm that the MiND framework provides suffficient metadata descriptors for appropriate interpretation and processing of diffusion-weighted images. Furthermore, as the process of atlas creation involves many of the computational steps required for group and population studies of white matter development and pathology, the results and workflow we present here can be directly extended to studies of this nature.

Figure 11
Study-specific atlas for 330 subjects calculated and visualized using MiND-aware tools. Top: Group mean (above) and standard deviation (below) maps of fractional anisotropy (left), volume fraction (center), and generalized fractional anisotropy (right). ...

4. Discussion

We have presented a flexible method for storage of essential DWI-related metadata in the NIfTI header. The LONI MiND extensions to the NIfTI header provide for fully self-contained representations of raw diffusion-weighted data sets, diffusion tensor reconstructions, and intravoxel spherical functions defined both on a discrete mesh, and continuously via the frequency domain. To ease its incorporation into existing software packages and promote software interoperability, the MiND framework adopts the standard NIfTI-1.1 header extension mechanism to store the metadata required for appropriate interpretation of these data structures. We have shown, by implementing a suite of DWI processing tools, that the MiND headers provide a complete representation of necessary DWI metadata at multiple stages in typical postprocessing protocols. In addition, we have demonstrated the potential for the MiND extended header data to provide a common DWI data format from which direct visualization is possible in a straightforward manner. We have also successfully constructed atlases from a large number of data sets, using exclusively MiND-centric tools for the DWI analysis.

DWI processing is a broad field of very active research, and we recognize that the data structures we have presented here may not meet the specific needs of investigators developing novel processing paradigms or conducting low-level mathematical analyses. The four schemata we have outlined in this report have been designed to satisfy the requirements of the vast majority of clinical investigators and end users of software packages like those mentioned in Section 1. By codifying formats for these common data structures, the MiND framework leverages the modular, sequential nature of most DWI post-processing protocols to allow users to optimize each stage of their analysis. The MiND extensions are flexible, however, and can be easily expanded with additional ecode and MIND_IDENT values. As novel processing algorithms and DWI-related data structures become more widely-used, the MiND framework can grow to support them. While these initial representations have been developed largely through discussions with our collaborators, for future enhancements, we welcome and encourage contributions from the global community of investigators and software developers. The open discussion system at will serve as a hub for MiND-related suggestions and development.

Notably absent from the data structures we have schematized is any means for representing tractography results. The reasons for this are two-fold. First, the structure of tractography data is highly dependent on the particular algorithm used to produce them. The data structure required to store results from streamline tractography, for example, is very different from that required to represent results obtained by probabilistic methods; therefore, generalized representation of tractography results would likely require the definition of several different schemata. More significantly, the NIfTI format is inherently designed to store data which resides on a voxel grid (although certain intent codes can force other interpretations). Tractography results require complex geometric specification which cannot be accurately discretized onto the voxel lattice structure common in neuroimaging. For these reasons, we relegate the problem of tractography representation to a file format more suitable for storage of lines, network graphs, and probabilistic clouds or surfaces with some associated measures of anisotropy or connectivity. A promising option appears to be the GIfTI standard which is often used for the specification of 3D models of cortical surfaces.

We also note that MiND-formatted data files can often become rather large (multiple gigabytes). The largest sizes are typically observed for dense discrete spherical mesh reconstructions on high-spatial-resolution data or with multi-MiND files. The total amount of data, of course, is not significantly affected by adopting the MiND framework; rather it is a property of the data itself and the analysis parameters specified by the user. We note though, that large file sizes can be a concern when attempting to read an entire MiND-extended NIfTI file into memory. Current commodity workstations contain more than enough memory to obviate this problem; however, older machines may have difficulty handling such large files. A practical solution for those who experience this difficulty involves creating I/O functions that allow for random file access and, at the expense of speed, load only the part of the file which is currently being requested.

We hope that adoption of the MiND format for DWI metadata will diminish the software interoperability barriers which currently restrict the field. Future work in this direction will be aimed at developing I/O libraries in additional programming languages to encourage adoption. We also plan to expand the MiND schemata to maintain pace with new developments in DWI post-processing, and we intend to further explore possibilities for more complex representations including non-linear spatial transformations and tractography structures.


This work was supported in part by the National Institutes of Health through the NIH Roadmap for Medical Research, Center for Computational Biology Grant 1U54RR021813-01, the Medical Scientist Training Program Grant 5T32GM008042-25, NIH/NCRR 5 P41 RR013642 and NIH/NIMH 5 R01 MH71940. P.T. is also funded by NIH grants EB008432, EB008281, EB007813, HD050735. We are grateful to our colleagues at the Queensland Centre for Magnetic Resonance, Brisbane, for providing some of the test data for this project.


Publisher's Disclaimer: This is a PDF file of an unedited manuscript that has been accepted for publication. As a service to our customers we are providing this early version of the manuscript. The manuscript will undergo copyediting, typesetting, and review of the resulting proof before it is published in its final citable form. Please note that during the production process errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain.


  • Alexander DC, Barker GJ, Arridge SR. Detection and modeling of non-gaussian apparent diffusion coefficient profiles in human brain data. Magn Reson Med. 2002 Aug;48 (2):331–40. [PubMed]
  • Basser PJ, Mattiello J, LeBihan D. Estimation of the effective self-diffusion tensor from the NMR spin echo. J Magn Reson B. 1994a Mar;103 (3):247–54. [PubMed]
  • Basser PJ, Mattiello J, LeBihan D. MR diffusion tensor spectroscopy and imaging. Biophys J. 1994b Jan;66 (1):259–67. [PubMed]
  • Basser PJ, Pierpaoli C. Microstructural and physiological features of tissues elucidated by quantitative-diffusion-tensor mri. J Magn Reson B. 1996 Jun;111 (3):209–219. [PubMed]
  • Chiang M-C, Barysheva M, Lee A, Madsen S, Klunder A, Toga A, McMahon K, de Zubicaray G, Meredith M, Wright M, Srivastava A, Balov N, Thompson P. Mapping genetic influences on brain fiber architecture with high angular resolution diffusion imaging (HARDI). IEEE International Symposium on Biomedical Imaging; Nano to Macro. 2008; 2008. ISBI’08.
  • Chiang MC, Klunder AD, McMahon K, de Zubicaray GI, Wright MJ, Toga AW, Thompson PM. Information-theoretic analysis of brain white matter fiber orientation distribution functions. Inf Process Med Imaging. 2007;20:172–182. [PMC free article] [PubMed]
  • Christensen G, Rabbitt R, Miller M. Deformable templates using large deformation kinematics. IEEE Transactions on Image Processing. 1996 Oct;5 (10):1435–1447. [PubMed]
  • Cook PA, Bai Y, Nedjati-Gilani S, Seunarine KK, Hall MG, Parker GJ, Alexander DC. Camino: Open-source diffusion-MRI reconstruction and processing. 14th Scientific Meeting of the International Society for Magnetic Resonance in Medicine; May, 2006. p. 2759.
  • Cox RW, Ashburner J, Breman H, Fissell K, Haselgrove C, Holmes CJ, Lancaster JL, Rex DE, Smith SM, Woodward JB, Strother SC. A (sort of) new image data format standard: NIfTI-1. 10th Annual Meeting of the Organization for Human Brain Mapping.2004.
  • Descoteaux M, Angelino E, Fitzgibbons S, Deriche R. Regularized, fast, and robust analytical q-ball imaging. Magn Reson Med. 2007 Sep;58 (3):497–510. [PubMed]
  • Digital Imaging and Communications in Medicine Standards Committee. DICOM Supplement 49: Enhanced MR Image Storage SOP Class. National Electrical Manufacturers Association; Rosslyn, VA: 2002.
  • Dinov ID, Van Horn JD, Lozev KM, Magsipoc R, Petrosyan P, Liu Z, Mackenzie-Graham A, Eggert P, Parker DS, Toga AW. Efficient, distributed and interactive neuroimaging data analysis using the LONI Pipeline. Front Neuroinformatics. 2009;3:22. [PMC free article] [PubMed]
  • Fillard P, Pennec X, Arsigny V, Ayache N. Clinical DT-MRI estimation, smoothing, and fiber tracking with log-Euclidean metrics. IEEE Trans Med Imaging. 2007;26 (11):1472–1482. [PubMed]
  • Fillard P, Souplet J-C, Toussaint N. Medical image navigation and research tool by INRIA (MedINRIA) 2009. URL
  • Frank LR. Characterization of anisotropy in high angular resolution diffusion-weighted MRI. Magn Reson Med. 2002 Jun;47 (6):1083–99. [PubMed]
  • Goh A, Lenglet C, Thompson P, Vidal R. A nonparametric riemannian framework for processing high angular resolution diffusion images (HARDI). Computer Vision and Pattern Recognition, IEEE Computer Society Conference on 0; 2009. pp. 2496–2503.
  • Haas BW, Barnea-Goraly N, Lightbody AA, Patnaik SS, Hoeft F, Hazlett H, Piven J, Reiss AL. Early white-matter abnormalities of the ventral frontostriatal pathway in fragile x syndrome. Dev Med Child Neurol. 2009 Aug;51 (8):593–599. [PMC free article] [PubMed]
  • Hess CP, Mukherjee P, Han ET, Xu D, Vigneron DB. Q-ball reconstruction of multimodal fiber orientations using the spherical harmonic basis. Magn Reson Med. 2006 Jul;56 (1):104–17. [PubMed]
  • Jansons KM, Alexander DC. Persistent angular structure: new insights from diffusion MRI data. Inf Process Med Imaging. 2003 Jul;18:672–83. [PubMed]
  • Jenkinson M, Bannister P, Brady M, Smith S. Improved optimization for the robust and accurate linear registration and motion correction of brain images. NeuroImage. 2002 October;17 (2):825–841. [PubMed]
  • Jiang H, van Zijl PCM, Kim J, Pearlson GD, Mori S. DtiStudio: resource program for diffusion tensor computation and fiber bundle tracking. Comput Methods Programs Biomed. 2006 Feb;81 (2):106–116. [PubMed]
  • Lazar M, Weinstein DM, Tsuruda JS, Hasan KM, Arfanakis K, Meyerand ME, Badie B, Rowley HA, Haughton V, Field A, Alexander AL. White matter tractography using diffusion tensor deflection. Hum Brain Mapp. 2003 Apr;18 (4):306–321. [PubMed]
  • Le Bihan D, Mangin JF, Poupon C, Clark CA, Pappata S, Molko N, Chabriat H. Diffusion tensor imaging: concepts and applications. J Magn Reson Imaging. 2001 Apr;13 (4):534–546. [PubMed]
  • Liu C, Bammer R, Acar B, Moseley ME. Characterizing non-gaussian diffusion by using generalized diffusion tensors. Magn Reson Med. 2004 May;51 (5):924–937. [PubMed]
  • MacKenzie-Graham AJ, van Horn JD, Woods RP, Crawford KL, Toga AW. Provenance in neuroimaging. Neuroimage. 2008 Aug;42 (1):178–195. [PMC free article] [PubMed]
  • Ozarslan E, Mareci TH. Generalized diffusion tensor imaging and analytical relationships between diffusion tensor imaging and high angular resolution diffusion imaging. Magn Reson Med. 2003 Nov;50 (5):955–965. [PubMed]
  • Patel V, Shi Y, Thompson P, Toga A. Mesh-based spherical deconvolution for physically valid fiber orientation reconstruction from diffusion-weighted MRI. IEEE International Symposium on Biomedical Imaging; Nano to Macro. 2009; 2009. ISBI’09.
  • Pieper S, Halle M, Kikinis R. 04 2004. 3d slicer. IEEE International Symposium on Biomedical Imaging; ISBI 2004.
  • Pierpaoli C, Basser PJ. Toward a quantitative assessment of diffusion anisotropy. Magn Reson Med. 1996 Dec;36 (6):893–906. [PubMed]
  • Pierpaoli C, Jezzard P, Basser PJ, Barnett A, Chiro GD. Diffusion tensor MR imaging of the human brain. Radiology. 1996 Dec;201 (3):637–648. [PubMed]
  • Rex DE, Ma JQ, Toga AW. The LONI Pipeline processing environment. Neuroimage. 2003 Jul;19 (3):1033–48. [PubMed]
  • Sakaie KE, Lowe MJ. An objective method for regularization of fiber orientation distributions derived from diffusion-weighted MRI. Neuroimage. 2007 Jan;34 (1):169–76. [PubMed]
  • Smith SM, Jenkinson M, Woolrich MW, Beckmann CF, Behrens TE, Berg JH, Bannister PR, De Luca M, Drobnjak I, Flitney DE, Niazy RK, Saunders J, Vickers J, Zhang Y, De Stefano N, Brady JM, Matthews PM. Advances in functional and structural MR image analysis and implementation as FSL. Neuroimage. 2004;23(Suppl 1) [PubMed]
  • Stadlbauer A, Nimsky C, Buslei R, Salomonowitz E, Hammen T, Buchfelder M, Moser E, Ernst-Stecken A, Ganslandt O. Diffusion tensor imaging and optimized fiber tracking in glioma patients: Histopathologic evaluation of tumor-invaded white matter structures. Neuroimage. 2007 Feb;34 (3):949–956. [PubMed]
  • Tournier JD, Calamante F, Gadian DG, Connelly A. Direct estimation of the fiber orientation density function from diffusion-weighted MRI data using spherical deconvolution. Neuroimage. 2004 Nov;23 (3):1176–85. [PubMed]
  • Toussaint N, Souplet J, Fillard P. MedINRIA: Medical image navigation and research tool by INRIA. Proc. of MIC-CAI’07 Workshop on Interaction in medical image analysis and visualization; Brisbane, Australia. 2007.
  • Tuch DS. Q-ball imaging. Magn Reson Med. 2004 Dec;52 (6):1358–72. [PubMed]
  • Tuch DS, Reese TG, Wiegell MR, Makris N, Belliveau JW, Wedeen VJ. High angular resolution diffusion imaging reveals intravoxel white matter fiber heterogeneity. Magn Reson Med. 2002 Oct;48 (4):577–82. [PubMed]
  • Weaver KE, Richards TL, Liang O, Laurino MY, Sami A, Aylward EH. Longitudinal diffusion tensor imaging in Huntington’s Disease. Exp Neurol. 2009 Jan;216 (2):525–529. [PubMed]
  • Wedeen VJ, Hagmann P, Tseng WYI, Reese TG, Weisskoff RM. Mapping complex tissue architecture with diffusion spectrum magnetic resonance imaging. Magn Reson Med. 2005 Dec;54 (6):1377–86. [PubMed]
  • Zhang H, Yushkevich PA, Gee JC. DTI toolkit: A spatial normalization and atlas construction toolkit optimized for examining white matter morphometry using DTI data. 2009. URL