[Insight-developers] Can someone explain
DiffusionTensor3D::GetRelativeAnisotropy() to me?
Torsten Rohlfing
torsten at synapse.sri.com
Tue Jun 7 13:38:45 EDT 2005
Good morning --
At the risk of looking like a complete idiot, I was wondering whether
someone could explain the implementation of
DiffusionTensor3D::GetRelativeAnisotropy() to me.
The code (purged of numerical safeguards etc) that I don't get is this:
const RealValueType anisotropy = 3.0 * isp - trace * trace;
const RealValueType relativeAnisotropySquared =
static_cast< RealValueType >( anisotropy / ( sqrt( 3.0 ) * trace
) );
const RealValueType relativeAnisotropy =
static_cast< RealValueType >( sqrt( relativeAnisotropySquared ) );
where "isp" is the inner scalar product and "trace" is the tensor trace,
both as returned by the respective class member functions.
My problem is with the definition of "anisotropy" above. I assume that
this is supposed to be the inner product of the anisotropic part of the
tensor, that is, the inner product of (tensor - (trace / 3) *
identity). This is a double sum over the squares of differences between
elements of the original tensor and the corresponding elements of
(trace/3) times the identity tensor.
When I write this down, expand the squared difference in the scalar
product and collapse the three resulting double sums, I get the inner
product of the tensor PLUS the square of the trace MINUS 6 times the
trace. This seems considerably different from what is implemented in
ITK, since the sign of the squared trace is inverted, and the term with
the trace alone is missing entirely.
Could someone give me a hint what I am missing here, or maybe point me
to a place to read up on this?
And if this was as stupid a question as I suspect, feel free to rub it in ;)
Best,
Torsten
--
Torsten Rohlfing, PhD SRI International, Neuroscience Program
Research Scientist 333 Ravenswood Ave, Menlo Park, CA 94025
Phone: ++1 (650) 859-3379 Fax: ++1 (650) 859-2743
torsten at synapse.sri.com http://www.stanford.edu/~rohlfing/
"Though this be madness, yet there is a method in't"
More information about the Insight-developers
mailing list