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

SCM Repository

[diderot] View of /branches/pure-cfg/test/zslice2.diderot
ViewVC logotype

View of /branches/pure-cfg/test/zslice2.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 647 - (download) (annotate)
Thu Mar 17 21:23:47 2011 UTC (8 years, 6 months ago) by jhr
File size: 962 byte(s)
  fix bug in test program
// vr-MIP-test.diderot
//
// test version of maximum intensity projection in Diderot
//

string dataFile = "../data/zimg112.nrrd";
int dataSize = 11;
int imgSize = 200;
vec3 orig = [0.0, 0.0, 5.0];
vec3 cVec = [0.0, 1.0, 0.0];
vec3 rVec = [1.0, 0.0, 0.0];
image(3)[] img = load (dataFile);
//field#2(3)[] F = img ⊛ bspln3;
//field#2(3)[] F = img ⊛ ctmr;
field#0(3)[] F = img ⊛ tent;

strand RayCast (int row, int col)
{
    real rr = real(dataSize)*(real(row)+0.5)/real(imgSize) - 0.5;
    real cc = real(dataSize)*(real(col)+0.5)/real(imgSize) - 0.5;
    vec3 pos = orig + rr*rVec + cc*cVec;
    output real maxval = -∞; 

    update
    {
        if (inside (pos,F)) {
          maxval = F@pos;
	}
        if (1 > 0)
          stabilize;
    }

    /* render: output maxval */
}

initially [ RayCast(r, c) | r in 0..(imgSize-1), c in 0..(imgSize-1) ];

// HEY output should be a single blob in the center of the image;
// an image of the bspln3 kernel

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