rgbscalarimg - Create an RGB image from diffusion peak directions, modulated by a scalar
image (eg, anisotropy).
SYNOPSIS
rgbscalarimg
[options]
DESCRIPTION
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 image header, the voxel and data
dimensions are read from the header and the -voxeldims and -datadims
arguments can be omitted.
The output is either in NIfTI, MetaImage (ITK) or VTK format. The output may be
visualized in ITK SNAP.
Because of inconsistent RGB support in various programs (notably Paraview, which won't
read RGB NIfTI), you may output the image in a different format from the input image, and
for this reason you should specify -outputfile and not the usual -outputroot.
If you change formats, there is no guarantee that the voxel to physical transform of the
image will be properly translated.
-datadims <x> <y> <z>
The dimensions of the image, in voxels.
-voxeldims <x> <y> <z>
The x, y, and z dimension of each voxel, in millimetres.
-inputmodel <model>
Either "dteig" (tensor eigen systems, default), "pds" (spherical function peaks) or
"pico"(output of picopdfs).
-scalarfile <file>
Either an Analyze / ITK / NIFTI-1 header file or a binary file. If an image header is
specified, the -datadims and -voxeldims arguments are not necessary and are
ignored.
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).
-scalarrange <min> <max>
The minimum and maximum range of scalar values to display as different grey levels. Any
voxels below the min will be black, those above the max will be white. By default, this
range is calculated from the data (the smallest and largest 0.5% of scalars are excluded
from the calculation so that outliers do not reduce the contrast).
-maxcomponents <max tensors per voxel>
Maximum number of tensor components in each voxel, for dteig data. The default is 1.
-numpds <max PDs per voxel>
Maximum number of spherical function peaks in each voxel, for pd or PICo data. The
default is 3 for pd data and 1 for PICo data.
-outputfile <file>
Output file, extension determines type.
-gsgamma <g>
Gamma correction for the scalar image. The scalars are mapped between 0 and 1. Then
I(out) = I(in)^g. Default is 1.0.
-rgbgamma <g>
Gamma correction for the RGB image. [r|g|b](out) = [r|g|b](in)^g. Default is 1.0. Set
this to 0.0 to get a greyscale image.
-pdf <bingham | watson | acg>
PDF type of PICo data. The default is "bingham".
-e1
Used only for tensor or pico data. Uses the first eigenvector to construct the RGB image,
corresponding to the largest eigenvalue of the tensor. This is the default.
-e2
Used only for tensor or pico data. Uses the second eigenvector to construct the RGB
image.
-e3
Used only for tensor or pico data. Uses the third eigenvector to construct the RGB image,
corresponding to the smallest eigenvalue of the tensor.
-bgmask <brainmask>
Used for NIfTI image output only; uses the brain mask to set transparency (background
voxels are transparent). Has no effect on VTK or MHA data. If this option is used, NIfTI
output has type RGBA (32-bit) rather than the usual RGB (24-bit).