Closed oesteban closed 11 years ago
Remember inverse transform, to accomplish what @zosso commented in #42
From my friend Gert Wollny, I asked him to help me with extracting the global rotational component of a regular vector field (center is supposed to be at [0,0,0]):
C3DFVector rot(0,0,0);
auto g = vectorfield.begin();
for (size_t z = 0; z < m_size.z; ++z)
for (size_t y = 0; y < m_size.y; ++y)
for (size_t x = 0; x < m_size.x; ++x, ++g) {
rot.x += -float(z) * g->y + float(y) * g->z;
rot.y += -float(z) * g->x + float(x) * g->z;
rot.z += -float(y) * g->x + float(x) * g->y;
Vectorfield is a 3D field of 3D vectors <x,y,z>. rot = rotational component of the field Don't remember where I got this from though.
And
Thinking around this, http://www.itk.org/Doxygen/html/classitk_1_1DisplacementFieldTransform.html should be enough for direction invariant data (FA,MD, scalar maps in general). It includes Jacobian computation, so it should be very easy.
For the raw dMRI signal interpolation, we should extend this resampler to be much more complex:
Given that these are 2 very different things, I split them. This issue will retain the responsibility for unwarping the input scalar features. The new issue #73 will take the responsibility for the dMRI signal.
Create a filter that given a dense deformation field applies the transform and modulates the intensity using the jacobian of the transformation.
QUESTION: Should we restrict the transform penalizing the global rotation of the field OR extract this component in order that making possible to rotate the B-matrix?