Great submission,
I am trying to perform 2D registration of MRI data using mutual information (rigid or affine). However, I receive a reshape error when trying to use the MaskMoving and MaskStatic options.
Thanks
@Tripp, I have found that bug too, I think it suffice to replace M=[] with M=eye(4).
There is however another bug I am afraid. I have not gone deep into the code yet but it seems that, when doing 3D NonRigid registration only 1 direction out of 3 is computed, i.e. the resulting grid only has the estimated deformation in the third component, and components 1 and 2 remain unchanged. Ani hint on how to fix this?
Great submission!
I believe there is a slight bug in the 3D registration if one does non-rigid registration only. I get the following error:
??? Attempted to access M(1,1); index out of bounds because size(M)=[0,0].
Error in ==> make_init_grid at 63
O_trans(:,:,:,1) = mean(1) + M(1,1) * xd + M(1,2) *yd + M(1,3) *zd + M(1,4)* 1;
Error in ==> image_registration>Make_Initial_Grid at 475
O_trans=make_init_grid(Spacing,size(Imoving),M);
Error in ==> image_registration at 219
[O_trans,Spacing,MaxItt]=Make_Initial_Grid(O_trans,Spacing,Options,Imoving,M,IS3D);
If I had to guess, it seems like M (inverse transformation from rigid registration) isn't initialized in the 3D, non-rigid case. I do not get this error when running 2D non-rigid. I also do not get this error when running 3D rigid + non-rigid.
Comment only