Recent Changes - Search:

Homepage

This is the old Camino website, please visit our new page to download the code and get the latest documentation.









UCL MIG Home

UCL CS Home

UCL Home

edit SideBar

Man /

Rgbscalarimg

Content-type: text/html Manpage of rgbscalarimg

rgbscalarimg

Section: User Commands (1)
Index Return to Main Contents

 

NAME

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.

 

EXAMPLES

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 -outputfile rgb.mha

The same thing, but using precomputed scalar data.


  rgbscalarimg -scalarfile fa.nii -outputfile rgb.nii -inputfile dt_eig_sys.Bdouble

The same thing, but output the RGB map for e2, the second eigenvector


  rgbscalarimg -scalarfile fa.nii -outputfile rgb_e2.nii -inputfile dt_eig_sys.Bdouble -e2

Output an MHA image from NIfTI input (dangerous - may lead to incorrect transforms in the header)


  rgbscalarimg -scalarfile fa.nii -outputfile rgb.mha -inputfile dt_eig_sys.Bdouble

 

OPTIONS

-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).

 

AUTHORS

Philip Cook <camino@cs.ucl.ac.uk>

 

SEE ALSO

dteig(1), sfpeaks(1), pdview(1)

 

BUGS

No alpha support for VTK or MetaIO output.


 

Index

NAME
SYNOPSIS
DESCRIPTION
EXAMPLES
OPTIONS
AUTHORS
SEE ALSO
BUGS

This document was created by man2html, using the manual pages.
Time: 02:07:11 GMT, December 04, 2017

Edit - History - Print - Recent Changes - Search
Page last modified on October 26, 2009, at 03:01 PM