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

SCM Repository

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

View of /branches/pure-cfg/test/zslice-hess.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 734 - (download) (annotate)
Sat Apr 2 10:30:30 2011 UTC (8 years, 8 months ago) by glk
File size: 899 byte(s)
new possible bug
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("../data/zimg112.nrrd");
field#2(3)[] F = img ⊛ bspln3;

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 val = 0.0; 

    update
    {
        if (inside (pos,F)) {
           // HEY (bug?) is this the way to take the trace of the Hessian?
           // currently this causes:
           //   uncaught exception Fail [Fail: sigOf: invalid operator Trace<tensor[3,3]>]
           //   raised at high-il/check-high-il.sml:68.19-68.71
           val = trace(∇∇F@pos);
	}
        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