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

SCM Repository

[diderot] Annotation of /branches/pure-cfg/test/zslice0.diderot
ViewVC logotype

Annotation of /branches/pure-cfg/test/zslice0.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 653 - (view) (download)

1 : glk 593 // vr-MIP-test.diderot
2 :     //
3 :     // test version of maximum intensity projection in Diderot
4 :     //
5 :    
6 :     string dataFile = "../data/zimg.nrrd";
7 :     int dataSize = 9;
8 :     int imgSize = 200;
9 :     vec3 orig = [0.0, 0.0, 4.0];
10 :     vec3 cVec = [0.0, 1.0, 0.0];
11 :     vec3 rVec = [1.0, 0.0, 0.0];
12 :     image(3)[] img = load (dataFile);
13 :     field#2(3)[] F = img ⊛ bspln3;
14 :    
15 :     strand RayCast (int row, int col)
16 :     {
17 :     // HEY why doesn't rr or cc ever go negative?
18 :     real rr = real(dataSize)*(real(row)+0.5)/real(imgSize) - 0.5;
19 :     real cc = real(dataSize)*(real(col)+0.5)/real(imgSize) - 0.5;
20 :     vec3 pos = orig + rr*rVec + cc*cVec;
21 :     output real maxval = -∞;
22 :    
23 :     update
24 :     {
25 :     maxval = rr;
26 : jhr 653 stabilize;
27 : glk 593 }
28 :    
29 :     /* render: output maxval */
30 :     }
31 :    
32 : glk 594 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