User Tools

Site Tools


uint322colcode

uint322colcode (reference only)

  uint322colcode  - convert from uint32 to colcode array
 
  FORMAT:       outarray = uint322colcode(inarray)
 
  Input fields:
 
        inarray     Nx1 (or 1xN) input array of type uint32
 
  Output fields:
 
        outarray    Nx4 double array
                    (n, 1) = color index or NaN
                    (n, 2) = red component (0...255)
                    (n, 3) = green component (0...255)
                    (n, 4) = blue component (0...255)
 
  See also colcode2uint32

Notes

For performance reasons, BrainVoyager supports both index based coloring (e.g. two-color curvature information, or for painting/cutting during flattening) *and* RGB coloring. To store both kinds of information in a separable way, 3 bytes per vertex would not have been sufficient.

Internally, any RGB colored vertex is stored with hexadecimal 0x3f prefix (which resembles single-precision floating point numbers in the range between 0.5 and 2). Index based colors are stored with a prefix of 0x00. Currently, alpha information is not supported (per vertex).

uint322colcode.txt · Last modified: 2010/06/22 05:22 by jochen