multigrid_rc_nogui.m

19 views
Skip to first unread message

Ammar Durghalli

unread,
Jun 23, 2011, 12:27:59 AM6/23/11
to dirart
I'm trying to understand why in many places the motion fields are
devided by 2. this contradicts the publication on which the algorithm
is based. For example:

lines 246-252:

mvy_this_step =
move3dimage(mvy_this_step,mvy1/2,mvx1/2,mvz1/2,'linear') + mvy1;
mvx_this_step =
move3dimage(mvx_this_step,mvy1/2,mvx1/2,mvz1/2,'linear') + mvx1;
mvz_this_step =
move3dimage(mvz_this_step,mvy1/2,mvx1/2,mvz1/2,'linear') + mvz1;

imvy_this_step = move3dimage(imvy_this_step,-mvy1/2,-mvx1/2,-
mvz1/2,'linear') - mvy1;
imvx_this_step = move3dimage(imvx_this_step,-mvy1/2,-mvx1/2,-
mvz1/2,'linear') - mvx1;
imvz_this_step = move3dimage(imvz_this_step,-mvy1/2,-mvx1/2,-
mvz1/2,'linear') - mvz1;

also lines 274-275: (which also contradict the rule for composition of
motion fields)

i1vx = move3dimage(single(im1), (mvy + mvy_this_step)/2, (mvx +
mvx_this_step)/2, (mvz + mvz_this_step)/2,'linear');

i2vx = move3dimage(single(im2),(imvy + imvy_this_step)/2,(imvx +
imvx_this_step)/2,(imvz + imvz_this_step)/2,'linear');

same thing is in lines 327-333

your answer is greatly appreciated

A.Durghalli

Yang, Deshan

unread,
Jun 23, 2011, 8:40:03 AM6/23/11
to dir...@googlegroups.com

I cannot remember the details, probably because I liked to take a smaller steps or I liked to tried to fix something else in this way and forgot the update the code back. I believe that the code works, but could be more efficient if the DVFs are not divided by 2. Please give it a try by not dividing by 2.

 
The materials in this message are private and may contain Protected Healthcare Information. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

Ammar Durghalli

unread,
Jun 23, 2011, 5:09:11 PM6/23/11
to dirart
Thanks....
Although when double-sampling the images and the DVFs (when
going to higher resolution level), should the DVF's be halved before
deforming images (as in lines 135 & 144)?
> The materials in this message are private and may contain Protected Healthcare Information. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.- Hide quoted text -
>
> - Show quoted text -

Yang, Deshan

unread,
Jun 23, 2011, 5:21:34 PM6/23/11
to dir...@googlegroups.com

DVF should be doubled instead of halved. DVF is measured in number of the pixels. When going to the next higher resolution stage, the number of pixels is doubled, so DVF should be double-sampled and also multiplied by 2.

Ammar Durghalli

unread,
Jun 23, 2011, 5:51:07 PM6/23/11
to dirart
Oh..yes..I see that in the function (recalculate_mvs.m), the DVF is
already multiplied by 2. Thanks!
Reply all
Reply to author
Forward
0 new messages