
Main /
User Guide and InstallationCamino is a fullyfeatured toolkit for Diffusion MR processing and reconstruction, including diffusion tensor techniques, tractography and advanced algorithms for resolving nonGaussian diffusion profiles, the socalled fibrecrossing problem. Camino is written entirely in Java, and is an open source development project, meaning that anyone can contribute to the project. This document is a brief introduction to the Camino toolkit, the philosophy behind it and a jumpingoff point for starting to use Camino in your own projects. We start by discussing the installation of Camino, including installation under Windows using Cygwin, and then discuss building and testing the toolkit and conclude with some simple ways to use Camino. Here we assume no prior knowledge of the systems side of things at all and (hopefully) will explain enough so that the remainder of the casestudies included on this website will be readily accessible for more complicated uses of Camino. Installing CaminoCamino can be installed under Linux/Unix, Mac OS X and Windows. For more detailed instructions and requirements, click on the links below: Setting the memory allocationIt's often necessary to increase the amount of RAM Camino can use from the defaults. To do this, set the environment variable CAMINO_HEAP_SIZE to the number of megabytes of RAM you want to allow Camino to allocate, which must be less than your available physical RAM (a bit less than the total because some RAM is used by the system). For example, if you have 2Gb of RAM, you should safely be able to set CAMINO_HEAP_SIZE to 1800 or so. The exact procedure will depend upon your shell. Type echo $SHELL
to tell what you have. If it's sh / bash, then type export CAMINO_HEAP_SIZE=1800
If your shell is csh / tcsh, then type setenv CAMINO_HEAP_SIZE 1800
You can set these values in your configuration files so that they remain in effect  please see the documentation for your particular shell for instructions on how to do this. Getting started using CaminoCamino works by assembling processing "pipelines" by stringing sequences of commands together to perform complex tasks. In essence, this involves sending data into one end, and outputting one or more files at the other end. Pipelines are constructed by using the shell "pipe" operator, which takes the output of one command and uses it as the input to another. The default input and output or commands are referred to as "standard input" and "standard output". The pipe operator is the "" character (a vertical line, on UK keyboards it is usually shiftbackslash) and is placed between the commands whose input and output is connected together: command1  command2 In this way, any number of pipes can be used to form a sequence of commands, each performing one stage in a processing pipeline. In the Camino documentation you will also find several other standard shell commands and operators that are commonly used. The most important of these is the cat myData1.Bfloat myData2.Bfloat > allData.Bfloat \\
In essence, a typical Camino pipeline has the following constituents: cat myData.Bfloat  formatting command  reconstruction command  analysis command(s) > myResults.Bdouble \\
As an example, we might take scannerorder data, send it through a command that shuffles it into voxelorder, send those voxels to a command that fits diffusion tensors, and then the fitted tensors to a command that calculates the fractional anisotropy in each voxel and sends those fractional anisotropies to a data file. By adding an analyze format header using an additional command we could then visualise this FA image using MRIcro, or similar program. An example command pipeline for finding FA would be cat data.Bfloat  bin/dtfit  A.scheme  bin/fa > fa.Bdouble \\
The best place to look in order to get started with constructing Camino pipelines is the Camino man page. Man (short for manual) pages are a form of documentation accessible from the shell commandline. Man pages are accessed using the man camino \\
Man pages for the other commands can be accessed in the same way, substituting the name of the command in question for " Another good source of information is the Camino website. Several tutorials are included, which include stepbystep explanations of how to perform the studies described, and the pipelines involved in performing the analysis. Hopefully you are now in a position to jump in and have a go with using Camino to perform an analysis. We hope you find the toolkit useful, and welcome suggestions and comments (email caminoatcs.ucl.ac.uk) as well as bug reports and code submissions. We will always try to address queries and problems as quickly as possible  Camino is under constant development and though we try to keep bugs to a minimum, inevitably some slip through the net! Finally, if you use Camino in published work, please cite the following reference: P. A. Cook, Y. Bai, S. NedjatiGilani, K. K. Seunarine, M. G. Hall, G. J. Parker, D. C. Alexander, "Camino: OpenSource DiffusionMRI Reconstruction and Processing", International Society for Magnetic Resonance in Medicine, Seattle, WA, USA, p. 2759, May 2006 Command ReferenceBelow a list of some of the tools in Camino with a short description of what they do and some example command lines that run them. The man page for each tool contains a full description of how to use the program and a list of the commandline options. cpstatsDoes statistics on connection probability maps. For example, after tracking with the command:
The cpstats command finds the maximum connection probability to each voxel voxel from any of the seed points in the first ROI defined in the file roi.img. The output is an image maxroicp.{hdr, img}. As well as the maximum, cpstats computes the mean, minimum, or median. datasynthCreates synthetic diffusion MRI data from simple test functions or MonteCarlo simulation.
creates ten independent sets of synthetic measurements using the acquisition scheme detailed in A.scheme (see FILE FORMATS) assuming a zeromean Gaussian model of particle displacements with diffusion tensor diag(17, 2, 2) * 10^10 m^2 s^{1} and signal to noise 16 in measurements with diffusion weighted factor b = 0.
is similar to the first command above, but uses a mixture of Gaussians to model the particle displacement density, see datasynth man page. Datasynth can also be used to run MonteCarlo simulations of spins in a chosen diffusion environment. The command
will perform a montecarlo simulation of 100000 spins over 1000 updates. spins are initally uniformly distributed over the diffusion environment and their motion impeded by the presense of hexagonally packed cylinders parallel to the zaxis. Signals will be acquired in the directions given in the file A.scheme, but the q and b values in the schemefile will be overridden by the delta, DELTA and G values given on the command line. Output will be redirected to the file mc.bfloat. dtfitFits the diffusion tensor to diffusion MRI data.
fits the diffusion tensor to every voxel in the diffusion MRI data file SubjectA.Bfloat, which comes from the acquisition scheme detailed in A.scheme, and stores the diffusion tensors in DiffTensorA.Bdouble.
fits the diffusion tensor to ten independent sets of synthetic measurements. The script dteigComputes the eigenvalues and eigenvectors of diffusiontensor data.
computes the eigenvalues and eigenvectors from each diffusion tensor in DiffTensorA.Bdouble.
computes the eigensystem of the diffusion tensor fitted to ten independent sets of synthetic measurements. Note that dteig also works on output of twotenfit or threetenfit. dtlutgenCalibrates the PDFs for PICo probabilistic tractography. This program needs to be run once for every acquisition scheme. It outputs a lookup table that is used by the dtpicoparams program to find PICo PDF parameters for an image. The default single tensor LUT contains parameters of the Bingham distribution and is generated by supplying a scheme file and an estimated signal to noise in white matter regions of the (q=0) image. The default inversion is linear (inversion index 1).
Advanced users can control several options, including the extent and resolution of the LUT, the inversion index, and the type of PDF. See dtpicoparamsUses a lookup table to associate PDF parameters with each voxel. The input is the tensor eigen system (the output of dteig). The eigenvalues are used to index the LUT. Given tensor data SubjectA.Inv1.Bdouble, dteig calculates the eigen system in each voxel, which is piped to dtpicoparams.
faComputes the fractional anisotropy of diffusiontensor data.
computes the fractional anisotropy of each diffusion tensor in DiffTensorA.Bdouble.
computes the fractional anisotropy of the diffusion tensor fitted to ten independent sets of synthetic measurements. Note that fa also works on output of twotenfit or threetenfit. linreconPerforms a voxelwise linear reconstruction on diffusion MRI measurements. The script reads in a matrix with which to perform a linear transformation on the data in each voxel. The transformation can operate on the raw measurements, the log measurements or the normalized measurements with zero measurements removed. linrecon can be used to perform various common reconstruction methods, such as fitting the diffusion tensor, qball reconstruction, linear PASMRI, linear spherical deconvolution. The linear transformation matrices for some of these methods must be computed outside camino, however, in matlab for example. modelfitGeneral modelfitting program that includes various options for fitting single or multiple diffusion tensors and other models to diffusion MRI data. See multitenfitFits different tensor models to the data in each input voxel according to a precomputed voxel classification, such as the output of voxelclassify. picopdfsConstructs a spherical PDF in each voxel for probabilistic tractography. scanner2voxelConverts scannerorder data to voxel order.
converts scannerorder data file ScannerOrder.img, for which the measurement volume has size 128x128x60 (=983040) and the acquisition scheme acquires 6 measurements with b=0 and 54 diffusionweighted measurements (total of 60 measurements), to voxel order (see File Formats). sfpeaksComputes peak directions from spherical functions, such as the output of PASMRI, MESD, QBall, etc. sfplotCreates images of spherical functions, such as the output of PASMRI, MESD, QBall, etc, in each voxel. For visualization of results. shanisComputes the anisotropy of spherical harmonic models of diffusion MRI data. shfitFits the spherical harmonic series to diffusion MRI data. voxelclassifyUses the spherical harmonic analysis in Alexander, Barker and Arridge (MRM 48 2002) to produce a classification of the diffusion propagator in each voxel as isotropic, anisotropic Gaussian or nonGaussian. trackOne of the tools for tractography. Does streamline tractography (deterministic or probabilistic). See the man page track(1) for detailed information on this tool. Streamline tracts can be computed directly from the output of dtfit. For a data file A.Bfloat:
where the seedfile option specifies a Analyze hdr/img pair containing regions of interest. Any voxels within the seed image with an intensity value > 0 are considered seed points for streamlines. Voxels with the same nonzero intensity are part of a single ROI. Nontensor reconstruction data can also be used to compute streamlines. See the Probabilistic tracking requires a calibration step for each acquisition scheme. See track(1) and dtlutgen(1) for more information. A probability density function of the fibre orientation in each voxel of an image is created using the picopdfs program. See threetenfitFits a threetensor model to diffusion MRI data.
fits the threetensor model to every voxel in the diffusion MRI data file
fits the threetensor model to ten independent sets of synthetic measurements. trdComputes the trace of the diffusion tensor.
computes the trace of each diffusion tensor in
computes the trace of the diffusion tensor fitted to ten independent sets of synthetic measurements. Note that trd also works on output of twotenfit or threetenfit. twotenfitFits a twotensor model to diffusion MRI data.
fits the twotensor model to every voxel in the diffusion MRI data file
fits the twotensor model to ten independent sets of synthetic measurements. voxel2scannerConverts voxelorder data to scanner order.
converts voxelorder data file VoxelOrder.Bfloat, for which the measurement volume has size 128x128x60 (=983040) and the acquisition scheme acquires 6 measurements with b=0 and 54 diffusionweighted measurements (total of 60 measurements), to scanner order (see File Formats). NotationThe Camino documentation uses various symbols consistently. N  The number of measurements excluding those with b=0. Often the number of gradient directions. M  The number of measurements with b=0. q  The wavenumber. A*(q)  The measurement acquired with wavenumber q. A(q)  The normalized measurement with wavenumber q; A(q) = A*(q)/A*(0). File formatsCamino uses various file formats consistently. Scheme filesThe scheme file specifies the acquisition sequence used to acquire diffusion MRI data, which is usually required for reconstruction. There are now two scheme file formats that Camino commands understand. Version 0 is the original format that contains the diffusion time and a list of wavevectors (q_i). Version 1 contains more information, such as pulse widths, separations, etc, for more advanced techniques. The version 0 scheme file contains the diffusion time and wave vectors for each measurement in the order the measurements are stored in the data file. The first value in the file is the diffusion time, usually in seconds although changing units will generally just affect the units of the output. The second value is the total number of measurements (including measurements with no diffusion weighting). Then the wavenumber, usually in m^1, of the measurements are listed one by one; the xcomponent comes first, then the ycomponent, then the zcomponent. Every value is on a separate line, so the file looks like this: diffusion time If you are doing diffusiontensor reconstruction, and you know only the "bvalue", then choose an approximate diffusion time (e.g. t = 5.0 x 10^{2} s) and set q such that b = q^2 t. Camino users who scan with the twicerefocused spinecho sequence of Reese et al (Magn Reson Med, 49(1), 17782, 2003) typically set delta to the sum of the first two pulse durations, and DELTA to the time between the start of the first pulse and the start of the third pulse. The handedness of the coordinate system used by the scanner may not agree with that used within Camino. A simple way to check for this is to fit the diffusion tensors and visualize the principal directions with the If the schemefile contains the diffusion time and wavenumbers in the default units (s and m^1, respectively) then the fitted diffusion tensor has units m^2 s^1. If the schemefile uses other units, the diffusion tensor is scaled accordingly. For example, if the diffusion time has units milliseconds and the wavenumbers have units millimeters^1, the diffusion tensor has units mm^2 ms^1. Reconstruction programs such as dtfit do not need to know the units. The PICo calibration programs, including Version 1 schemefiles have the following format:
VERSION: 1 nx_1 ny_1 nz_1 G_1 DELTA_1 delta_1 TE_1 camino/PointSets/OldSchemeToNew is a script that converts version 0 schemefiles to version 1. See camino/test/bmx7_ED.scheme1 for an example of a version 1 schemefile. Data filesBasic DTI processing can be done using Analyze data files and a scheme file. Please see the man page for Camino uses bigendian data files with voxel ordering. Voxelorder data files store all of the measurements for the first voxel followed by all the measurements for the second voxel followed by all measurements for subsequent voxels. Scannerorder datafiles store the whole volume of the first measurement followed by the whole volume of the second measurement followed by the whole volume of subsequent measurements. Analyze format diffusion MRI data files are commonly in scanner order. Such files must be converted to voxel order, using scanner2voxel, before inputting to the Camino tools. By convention in Camino, we use the filename extension to indicate the data type in data files. The first letter is either "B" or "L" to indicate bigendian or littleendian data, respectively. The remainder of the extension is one of "byte" (8 bit, signed), "char" (8 bit, unsigned), "short" (16 bit, signed), "int" (32 bit, signed), "long" (64 bit, signed), "float" (32 bit, signed) or "double" (64 bit, signed). Thus the extension ".Bfloat" indicates that the data file contains bigendian fourbyte floating point data; ".Lint" indicates littleendian fourbyte integer data. Camino supports GZIP input of files ending in ".gz". GZIP output is supported by most programs, add the gzip option to compress output. 