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

SCM Repository

[diderot] Annotation of /branches/tash/test/zslice-bspln5.diderot
ViewVC logotype

Annotation of /branches/tash/test/zslice-bspln5.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1927 - (view) (download)
Original Path: branches/vis12/test/zslice-bspln5.diderot

1 : glk 1873 // zslice-eig
2 :     //
3 :     // testing eigenvalue support (and sequences)
4 :     //
5 :    
6 :     int dataSize = 11;
7 :     int imgSize = 200;
8 :     vec3 orig = [0.0, 0.0, 5.0];
9 :     vec3 cVec = [0.0, 1.0, 0.0];
10 :     vec3 rVec = [1.0, 0.0, 0.0];
11 : jhr 1927 image(3)[] img = image("../data/zimg11.nrrd");
12 : glk 1873 field#4(3)[] F = img ⊛ bspln5;
13 :     // BUG: 6-sample kernels apparently not supported
14 :     // all the way to code generation
15 :    
16 :     strand RayCast (int row, int col)
17 :     {
18 :     real rr = lerp(-0.5, real(dataSize)-0.5, -0.5, real(row), real(imgSize)-0.5);
19 :     real cc = lerp(-0.5, real(dataSize)-0.5, -0.5, real(col), real(imgSize)-0.5);
20 :     vec3 pos = orig + rr*rVec + cc*cVec;
21 :     output real val = 0.0;
22 :    
23 :     update
24 :     {
25 :     if (inside (pos,F)) {
26 :     tensor[3,3] H = ∇⊗∇F(pos);
27 :     real{3} ev = evals(H);
28 :     val = ev{0} + ev{1} + ev{2};
29 :     }
30 :     stabilize;
31 :     }
32 :     }
33 :    
34 :     initially [ RayCast(r, c) | r in 0..(imgSize-1), c in 0..(imgSize-1) ];

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