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

SCM Repository

[diderot] View of /branches/lamont/test/zslice-hess.diderot
ViewVC logotype

View of /branches/lamont/test/zslice-hess.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1958 - (download) (annotate)
Tue Jul 10 13:01:03 2012 UTC (7 years, 1 month ago) by jhr
Original Path: branches/vis12/test/zslice-hess.diderot
File size: 846 byte(s)
  Fleshing out various features, such as ":" and 3rd-order tensor support
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 = image("../data/zimg11.nrrd");
field#2(3)[] F = img ⊛ bspln3;

strand RayCast (int row, int col)
{
    real rr = lerp(-0.5, real(dataSize)-0.5, -0.5, real(row), real(imgSize)-0.5);
    real cc = lerp(-0.5, real(dataSize)-0.5, -0.5, real(col), real(imgSize)-0.5);
    vec3 pos = orig + rr*rVec + cc*cVec;
    output tensor[3,3] H = zeros[3,3];
    real x = 0.0;

    update
    {
        if (inside (pos,F)) {
	    H = ∇⊗∇F(pos);
            x = H[2,1];
	    // val = trace(∇⊗∇F(pos));
            // can compare with following; tests subscripting
	    // val = H[0,0] + H[1,1] + H[2,2];
	}
        stabilize;
    }
}

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