Rank: 92810 based on 0 downloads (last 30 days) and 0 file submitted
photo

christos

E-mail

Personal Profile:

 

Watch this Author's files

 

Comments and Ratings by christos View all
Updated File Comments Rating
24 Nov 2009 B-spline Grid, Image and Point based Registration B-spline registration of two 2D / 3D images or corrsp. points, affine and with smooth b-spline grid. Author: Dirk-Jan Kroon

I ve sent two posts but the first did not show up.
RE: my post on 23 NOV 09

If one of the sub-regions in b-spline registration corresponds to a totally masked out part of the image (hence the mask is not empty but populated only by zeros), then the image_difference in the MI returns an NaN value.

As a workaround you can probably check for this case and simply set the image similarity to 0 for these regions. See previous post for the exact if statement

23 Nov 2009 B-spline Grid, Image and Point based Registration B-spline registration of two 2D / 3D images or corrsp. points, affine and with smooth b-spline grid. Author: Dirk-Jan Kroon

you need to put t=0 if the expression in the if does not stand

if( isempty(Mask) | (~isempty(Mask) & ~isempty(find(Mask~=0) ) ) )

%your code
if(size(U,3)==3),
.....
end
else
t = 0;
end

06 Jul 2009 B-spline Grid, Image and Point based Registration B-spline registration of two 2D / 3D images or corrsp. points, affine and with smooth b-spline grid. Author: Dirk-Jan Kroon

very nice code... there are some issues though

a)
regarding the masks, could you please confirm what their structure should be? Is it just an image that contains 0s and 1s (where 0s correspond to areas to be masked out)

b)
should the images to be registered be the same size? I also see that at some point in register_images.m you resize the moving image to have the same size with static... fair enough... you don't do this for the masks and I think the system complains about this

c)
In image_difference.m

RE: (lines 243-252)
% Remove unmasked pixels
if(~isempty(Mask)),
sizes=size(V);
V=V(:);
V(~Mask)=[];
V=reshape(V,sizes);
U=U(:);
U(~Mask)=[];
U=reshape(U,sizes);
end

I don't understand how is it possible to expect, if you remove the masked pixels, to be able to reshape U or V to the same size prior to the pixel removal? A 32x32 image (vectorized 1024x1). Your remove lets say 5 pixels from the vector - now 1019x1, and then you ask it to be reshaped back to 32x32
(my version at least complains)

could you please elaborate on the usages of masks and if they have been tested?

----

thanks alot for your time and effort and for sharing this with us

Contact us