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

SCM Repository

[diderot] Diff of /branches/pure-cfg/test/vr-MIP-test.diderot
ViewVC logotype

Diff of /branches/pure-cfg/test/vr-MIP-test.diderot

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

revision 631, Thu Mar 17 00:31:24 2011 UTC revision 776, Thu Apr 7 21:50:30 2011 UTC
# Line 3  Line 3 
3  // test version of maximum intensity projection in Diderot  // test version of maximum intensity projection in Diderot
4  //  //
5    
6  string dataFile = "../data/vox1.nrrd";  //string dataFile = "../data/txs.nrrd";
7  real stepSz = 0.1;  //vec3 eye = [25.0, 15.0, 10.0];
8  vec3 eye = [-8.0, 2.0, 2.0];  //vec3 orig = [8.83877,2.5911,7.65275];
9  vec3 orig = [0.0, 3.4036, 3.4036];  //vec3 cVec = [-0.0151831,0.0278357,0.0];
10  vec3 cVec = [0.0, -0.014036, 0.0];      // image width = 2.8072  //vec3 rVec = [0.0074887,0.00408474,-0.0305383];
11  vec3 rVec = [0.0, 0.0, -0.014036];  string dataFile = "../data/vfrhand-nohip.nhdr";
12    vec3 eye = [127.331,-1322.05,272.53];
13    vec3 orig = [122.835,17.7112,188.044];
14    vec3 cVec = [-0.00403611,-0.029826,-0.244066];
15    vec3 rVec = [-0.245595,-0.0112916,0.00544129];
16    
17    real stepSz = 0.5;
18  image(3)[] img = load (dataFile);  image(3)[] img = load (dataFile);
19  field#2(3)[] F = img ⊛ bspln3;  field#2(3)[] F = img ⊛ bspln3;
20  //field#0(3)[] F = img ⊛ tent;  //field#0(3)[] F = img ⊛ tent;
# Line 18  Line 24 
24      int r = row; // for debugging      int r = row; // for debugging
25      int c = col; // for debugging      int c = col; // for debugging
26      vec3 pos = orig + real(row)*rVec + real(col)*cVec;      vec3 pos = orig + real(row)*rVec + real(col)*cVec;
27      vec3 dir = (pos - eye)/|pos - eye|;      vec3 dir = normalize(pos - eye);
28      real t = 0.0;      real t = 0.0;
29      output real maxval = -∞;      output real maxval = -∞;
30    
# Line 29  Line 35 
35            real val = F@pos;            real val = F@pos;
36            maxval = max(val, maxval);            maxval = max(val, maxval);
37          }          }
38          if (t > 20.0)          if (t > 80.0)
39              stabilize;              stabilize;
40          t = t + stepSz;          t = t + stepSz;
41      }      }
# Line 37  Line 43 
43      /* render: output maxval */      /* render: output maxval */
44  }  }
45    
46  initially [ RayCast(r, c) | r in 0..199, c in 0..199 ];  initially [ RayCast(r, c) | r in 0..479, c in 0..639 ];

Legend:
Removed from v.631  
changed lines
  Added in v.776

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