User Tools

Site Tools


uint322colcode

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

uint322colcode [2010/06/22 05:22] (current)
jochen created
Line 1: Line 1:
 +====== uint322colcode (reference only) ======
 +<​file> ​ 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</​file>​
  
 +===== 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