User Tools

Site Tools


colcode2uint32
no way to compare when less than two revisions

Differences

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


colcode2uint32 [2010/06/22 03:21] (current) – created jochen
Line 1: Line 1:
 +====== colcode2uint32 (reference only) ======
 +<file>  colcode2uint32  - convert from colcode to uint32 array
 + 
 +  FORMAT:       outarray = colcode2uint32(inarray)
 + 
 +  Input fields:
 + 
 +        inarray     Nx4 input array of type colcolde
 +                    (n, 1) = color index or NaN
 +                    (n, 2) = red component (0...255)
 +                    (n, 3) = green component (0...255)
 +                    (n, 4) = blue component (0...255)
 + 
 +  Output fields:
 + 
 +        outarray    Nx1 uint32 array
 + 
 +  See also uint322colcode</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).
colcode2uint32.txt · Last modified: 2010/06/22 03:21 by jochen