--- trunk/test/tracto.diderot 2010/05/03 03:46:16 58 +++ trunk/test/tracto.diderot 2010/08/06 20:40:57 248 @@ -10,9 +10,10 @@ input real CLmin; // minimum value of CL anisotropy measure input int stepNumMax; // max number of steps allowed, or zero if no limit -image(3)[] img = load (dataFile); +image(3)[3,3] img = load (dataFile); -field#1(3)[3,3] F = convolve (bspln3, img); +//field#1(3)[3,3] F = img ⊛ bspln3; +field#2(3)[3,3] F = img ⊛ bspln3; actor Tracto (vec3 seedPoint, int seedSign) // seedSign == +1 or -1 { @@ -20,7 +21,7 @@ vec3 pos = seedPoint; //// principleEvec : tensor[3,3] -> vec3 //// * : real x vec3 -> vec3 - vec3 guide = seedSign * principleEvec(F@seedPoint); + vec3 guide = real(seedSign) * principleEvec(F@seedPoint); real aniso = 0.0; update @@ -31,7 +32,7 @@ //// CL : tensor[3,3] -> real aniso = CL(ten); // "CL" is a linear anisotropy measure //// < : real x real -> bool - if (aniso < clmin) { + if (aniso < CLmin) { // terminate because anisotropy went too low stabilize; } @@ -39,12 +40,12 @@ vec3 evec = principleEvec(ten); //// dot : vec3 x vec3 -> real //// - : vec3 -> vec3 - if (dot(evec, guide) < 0) { evec = -evec; } // fix eigenvector sign + if (dot(evec, guide) < 0.0) { evec = -evec; } // fix eigenvector sign //// * : real x real -> real //// * : real x vec3 -> vec3 //// + : vec3 x vec3 -> vec3 evec = principleEvec(F @ (pos + 0.5*stepSz*evec)); - if (dot(evec, guide) < 0) { evec = -evec; } // fix eigenvector sign + if (dot(evec, guide) < 0.0) { evec = -evec; } // fix eigenvector sign guide = evec; pos = pos + stepSz*evec; //// + : int x int -> int
Click to toggle
does not end with </html> tag
does not end with </body> tag
The output has ended thus: guide = evec; pos = pos + stepSz*evec; //// + : int x int -> int