Content-type: text/html
This program provides a command line method to get an RGB color-coded image similar to the one displayed in pdview. The RGB color triplet for each pixel comes from the absolute value of the specified eigenvector (for tensor eigensystem or PICo data) or the spherical function peak direction (for PAS / QBall data), so:
|x| = r
|y| = g
|z| = b
Each color channel is scaled by a scalar value. For tensor data, the default scalar is fractional anisotropy, so the scaling is naturally between 0 and 1. If another scalar image is used, the intensities are normalized and then used to scale the RGB data. When reading the output of sfpeaks, the default scalar is the trace of the Hessian of the strongest peak. The user may pass any scalar image that has identical dimensions to the diffusion data. The scalar multiplication is applied after the RGB is calculated and RGB gamma correction is applied, thus if you pass -rgbgamma 0.0 the output is greyscale and the contrast is the same as the scalar image.
If the scalar file passed to the program is an Analyze header, the voxel and data dimensions are read from the Analyze header and the -voxeldims and -datadims arguments can be omitted.
The output is either in MetaImage (ITK) or VTK format. The output may be visualized in ITK SNAP.
Get the RGB map modulated by FA from tensor data.
dteig < tensors.Bdouble | rgbscalarimg -datadims 128 128 60 -voxeldims 1.7 1.7 2.3 -outputroot rgb
The same thing, but using precomputed scalar data.
rgbscalarimg -scalarfile fa.hdr -outputroot rgb -inputfile dt_eig_sys.Bdouble
The same thing, but output the RGB map for e2, the second eigenvector
rgbscalarimg -scalarfile fa.hdr -outputroot rgb_e2 -inputfile dt_eig_sys.Bdouble -e2
A greyscale FA image with integer values between 0 and 255.
rgbscalarimg -scalarfile fa.hdr -outputroot fa.Bchar -inputfile dt_eig_sys.Bdouble -rgbgamma 0.0
-datadims <x> <y> <z> The dimensions of the image, in voxels.
If a binary file is specified, then the data type should be the same as the input data, which is double unless otherwise specified with the (-inputdatatype) option.
Whichever kind of scalar file is used, it should be defined in the same space as the diffusion data.
If no scalar file is given, the default is fractional anisotropy (tensor eigen system data) or Hessian trace (spherical function peaks).
Analyze output is not supported; Matlab, ITK and MRIcro all fail to read Analyze RGB images correctly. Please notify the Camino team if you require Analyze RGB images, and what program you intend to use them with.
The MetaImage specification defines the anatomical orientation used by Camino as R[ight]A[nterior]S[uperior], since the origin is left posterior inferior. ITK SNAP defines the orientation as the point of origin; ie Camino data is LPI, because voxel (0,0,0) is the left posterior inferior point of the image. Camino uses LPI in Meta headers.