[Insight-users] DeformableRegistration4 (Correction)

gary lazer gary.lazer at yahoo.com
Sun Dec 18 16:46:15 EST 2005


Correction to my previous email: I think I figured out
the purpose of the multiplication. I'm still confused
though why the floor function is needed.
Thanks,
Gary

--- gary lazer <gary.lazer at yahoo.com> wrote:

> Hi,
> 
> I have a question about a few lines in the example
> DeformableRegistration4.cxx. When setting the
> spacing
> of the bspline grid the spacing is set using:
> 
>     spacing[r] *= floor(
> static_cast<double>(fixedImageSize[r] - 1)  /
>                  
> static_cast<double>(gridSizeOnImage[r] - 1) );
> 
> I'm confused as to why the 'floor' function is used
> and why the right side is multiplied by spacing[r].
> Won't this result in the upper 2 grid nodes
> sometimes falling inside the image region? Shouldn't
> the following be used
> instead:
> 
>     spacing[r] =
> static_cast<double>(fixedImageSize[r]
> - 1)  /
>                  
> static_cast<double>(gridSizeOnImage[r] - 1);
> 
> This way the 2 grid notes at the upper border will
> always fall outside the
> image region. Any help would be appreciated.
> 
> Thanks, Gary
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the Insight-users mailing list