oesteban / RegSeg

RegSeg is a simultaneous segmentation and registration method that uses active contours without edges (ACWE) extracted from structural images. The contours evolve through a free-form deformation field supported by the B-spline basis to optimally map the contours onto the data in the target space.
MIT License
12 stars 9 forks source link

Create Unwarping filter #17

Closed oesteban closed 11 years ago

oesteban commented 11 years ago

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?

oesteban commented 11 years ago

Remember inverse transform, to accomplish what @zosso commented in #42

oesteban commented 11 years ago

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

https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CDUQFjAA&url=http%3A%2F%2Fwww.intel-vci.uni-saarland.de%2Fuploads%2Ftx_sibibtex%2F74_01.pdf&ei=agE6UayfJMjUPO2cgaAC&usg=AFQjCNFSvut_IMhadTMHjI5DKUild-i4qQ&sig2=RiyS4KSa7a1wvgU-OGzQBA&bvm=bv.43287494,d.ZWU&cad=rja

oesteban commented 11 years ago

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.