19 #include "itkNumericTraits.h"
21 #include <vxl_version.h>
22 #if VXL_VERSION_DATE_FULL > 20040406
23 # include <vnl/vnl_cross.h>
24 # define cross_3d vnl_cross_3d
40 referenceMetrics.Fill(c);
43 externalForce.Fill(0);
44 internalForce.Fill(0);
51 neighborIndices.Fill((
unsigned long) NumericTraits<unsigned long>::max());
69 b = this->neighbors[2] - this->neighbors[0];
70 c = this->neighbors[1] - this->neighbors[0];
81 circleRadius = tmp.
GetNorm()/(cXbSquaredNorm);
82 tmp[0] /= (cXbSquaredNorm);
83 tmp[1] /= (cXbSquaredNorm);
84 tmp[2] /= (cXbSquaredNorm);
85 circleCenter = this->neighbors[0] + tmp;
90 d = pos - this->neighbors[0];
98 double val = 2 * (c[0]*(b[1]*d[2]-b[2]*d[1]) -
99 c[1]*( b[0]*d[2]-b[2]*d[0] ) +
100 c[2]*( b[0]*d[1]-b[1]*d[0] ));
109 sphereRadius = sphereTmp.
GetNorm()/val;
111 if (sphereRadius < 0)
113 sphereRadius = -1 * sphereRadius;