Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /trunk/test/vr-lite.diderot
ViewVC logotype

Diff of /trunk/test/vr-lite.diderot

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 313, Tue Aug 17 20:38:44 2010 UTC revision 384, Tue Oct 5 21:54:33 2010 UTC
# Line 12  Line 12 
12  input vec3 rVec;                // vector between pixels vertically  input vec3 rVec;                // vector between pixels vertically
13  input real valOpacMin;          // highest value with opacity 0.0  input real valOpacMin;          // highest value with opacity 0.0
14  input real valOpacMax;          // lowest value with opacity 1.0  input real valOpacMax;          // lowest value with opacity 1.0
15    // valOpacMin,Max pairs for sample datasets:
16    // txs.nrrd 0.15, 0.35
17    // vfrhand-nohip.nhdr, for skin: 200, 500
18    // vfrhand-nohip.nhdr, for bone: 1330, 1630
19    
20  image(3)[] img = load (dataFile);  image(3)[] img = load (dataFile);
21    
# Line 32  Line 36 
36          pos = pos + stepSz*dir;          pos = pos + stepSz*dir;
37          if (inside (pos,F)) {          if (inside (pos,F)) {
38              real val = F@pos;              real val = F@pos;
39              vec3 grad = (∇ F)@pos;              vec3 grad = ∇F@pos;
40              vec3 norm = -grad/|grad|;              vec3 norm = -grad/|grad|;
41              if (val > valOpacMin) {  // we have some opacity              if (val > valOpacMin) {  // we have some opacity
42                  real opac = 0.0;     // dummy initialization                  real opac = 0.0;     // dummy initialization
# Line 47  Line 51 
51          }          }
52          if (transp < 0.01) {  // early ray termination          if (transp < 0.01) {  // early ray termination
53              transp = 0.0;              transp = 0.0;
             rgba = [gray, gray, gray, 1.0-transp];  
54              stabilize;              stabilize;
55          }          }
56          if (t > 40.0) {          if (t > 40.0) {
             // do we have a stabilize() code block?  
             rgba = [gray, gray, gray, 1.0-transp];  
57              stabilize;              stabilize;
58          }          }
59          t = t + stepSz;          t = t + stepSz;
60      }      }
61    
62         stabilize {
63            rgba = [gray, gray, gray, 1.0-transp];
64         }
65    
66      /* render: output rgba */      /* render: output rgba */
67  }  }
68    

Legend:
Removed from v.313  
changed lines
  Added in v.384

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0