[Insight-users] how to calculate displacement from B-Spline parameters
pinpress
sb_ji at yahoo.com
Tue Oct 28 23:01:14 EDT 2008
Hi,
I can run Registration example code: DeformableRegistration15.cxx to perform
rigid, affine and then BSPline registration to two 3D image sets
artificially created by scaling the fixed image radially at the center to
generate the moving image. To make my life a little easier, I disabled the
rigid, affine and coarse BSpline registrations by setting their
corresponding # of iterations to 0. So I am only dealing with the result of
the fine BSpline registration with the simple phantom image sets.
The resampled output image does indeed match with the fixed image. However,
I am having trouble to calculate the displacement field. For illustration
purposes, let me denote that both fixed and moving images are of size:
im(10,10,5). The deformation field file was written to a VTK file, and I was
able to read in the binary data, "def", of size:
def(10,10,5,3);
It is clear that the 4D matrix represents displacement vectors in x, y, and
z directions at each 10-by-10-by-5 voxel. So, let me denote displacement
vector along x as dx, which is of size dx(10,10,5). The problem is that only
the first column of each frame in dx is non-zero, while zero everywhere
else. This does not make sense to me, because I would expect displacement in
x and y to be about symmetrical with respect to the center, based on how I
generated the images in the first place.
Then I tried to write the BSPline parameters: finalParameters =
registration->GetLastTransformParameters(); to an ascii file. I was able to
find out that the number of parameters is: (N+2)^3*3, where N is the number
of grid I choose. From here, I can get the parametric matrix corresponding
to x, y, and z, such that "tx" would be of size (N+2)-by-(N+2)-by(N+2). My
problem is that I do not know how to proceed from here to calculate the
displacement vectors at each voxel. Specifically,
1). Where are these BSpline grids located with respect to the image voxels?
2). What formula to use to do interpolation?
3). If I do not use these parameters, how do I get the explicit displacement
vectors? From the deformation VTK file? How then?
Thanks. I appreciate if you can point me to the right direction.
--
View this message in context: http://www.nabble.com/how-to-calculate-displacement-from-B-Spline-parameters-tp20220125p20220125.html
Sent from the ITK - Users mailing list archive at Nabble.com.
More information about the Insight-users
mailing list