[Insight-users] Silly questions about registration
David Holmes
holmesd3@yahoo.com
Fri, 14 Feb 2003 12:23:49 -0800 (PST)
Lydia-
I very much apprciate your argument for
"output-driven" transformations. It certainly is
easier to implement. I guess my orginal view of it
was with regard to a set of points (rather than a
discrete grid of image data) to be mapped from one
space ("moving") to another ("fixed"). The actual
transform which accomplishes this is the not the one
returned. Nevertheless, I understand what you are
doing now. If I need the other mapping, I can just
get the inverse. I would guess that this is clearly
laid out in the software guide and I probably didn't
read it as closely as I should have.
With regards to my other specific problem with
RegularStepGradientOptimizer, I had copied the code
out of the example into my own little test program and
ran it on my own little MR test data. To be clear,
the
second case did return the correct solution.
Nevertheless, I think that I will compile and run the
ITK example specifically as is to see if I have
problems
thanks for the help
david
--- Lydia Ng <lng@insightful.com> wrote:
> David:
>
> In response to your second question - here is what I
> do know:
> Both the ResampleImageFilter and Registration uses
> the "inverse" to the traditional view of image
> transform.
> In both cases we typically go through the fixed
> image space pixel by pixel and at each pixel we need
> to find the corresponding position in the moving
> image. This method of mapping avoid the potential
> problem of holes that can happen with "forward"
> mapping.
>
> For the case of Registration, let F(x,y) = the fixed
> image, and M(x,y) the moving image.
> The aim of registration is to find a transform
> T(x,y) which minimizes the "distance" between
> F(x,y) and M(T(x,y)).
>
> If M(x,y) was originally produce by apply some
> transform T2(x,y) say such that
> M(x,y) = F(T2(x,y)) then the transform which
> minimizes the "distance" between fixed and moving
> image is
> T(x,y) = inverese of T2(x,y).
>
> Does this help? Or am I confusing matters!
>
> Now back to your first question.
>
> Are you using the code in ImageRegistration1.cxx
> directly or are you using your own code?
> Are you using the same images as the software guide
> or your own?
> Looks to me that both traces is giving you the wrong
> solution. A possible problem is that you might need
> to tune your optimization parameters to your images.
> The metric gradient is also a function of the image
> gradient so if your image has higher gradient you
> might take too big a step.
> What happen if you reduce "MaximumStepLength" say by
> half? And Maximize should definitedly be off.
>
> - Lydia
>
>
> -----Original Message-----
> From: David Holmes [mailto:holmesd3@yahoo.com]
> Sent: Thu 2/13/2003 12:56 PM
> To: insight
> Cc:
> Subject: [Insight-users] Silly questions about
> registration
>
>
>
> I'm going over the registration framework for ITK
> and
> running some tests so that I better understand the
> model. I have several silly questions.
>
> (1) Pulling the code from Registration1
> example, I took two images that were the same,
> applied
> translations, and ran the registration. Here is
> how
> it
> progressed:
>
> 0 = 2690.87 : [2.05794, -3.43]
> 1 = 3538.93 : [2.79055, -7.36234]
> 2 = 3945.74 : [1.41266, -11.1175]
> 3 = 4030.27 : [1.45081, -15.1173]
> 4 = 4296.43 : [0.881159, -19.0766]
> 5 = 4622.25 : [-1.29036, -22.4358]
> 6 = 4726.89 : [-3.55759, -25.7312]
> 7 = 5030.82 : [-5.44799, -29.2563]
> 8 = 5368.15 : [-8.17364, -32.1839]
> 9 = 5666.88 : [-10.8422, -35.1636]
> .
> .
> .
>
> As you can see, it looks like it is
> maximizing,
> even though I am using the Means Squared metric.
> So I
> explicitly set the MaximizeOff flag-Same response.
> So,
> for kicks, I tried MaximizeOn(). Here?s what
> I
> got:
>
>
>
> 0 = 2690.87 : [-2.05794, 3.43]
> 1 = 898.249 : [-4.63303, 6.49087]
> 2 = 1243.98 : [-3.05864, 5.25746]
> 3 = 27.0703 : [-2.62099, 3.30593]
> 4 = 720.144 : [-2.93342, 4.25587]
> 5 = 200.952 : [-3.01993, 5.25212]
> 6 = 24.1303 : [-2.99806, 4.7526]
> 7 = 22.6493 : [-2.99862, 5.0026]
> 8 = 0.309667 : [-3.11456, 4.95589]
>
> Is something perhaps backwards there, or I am
> all
> messed up?
>
>
>
> (2) Using the example out of the software
> guide again, this question is about what is
> returned.
> Generally speak, with Analyze, when we provide a
> solution to a registration, we provide the
> solution that will be applied to the "moving" image
> to
> put it into the space of the fixed image. In my
> own
> code using ITK, when I apply a translation of
> [-3,5]
> to an image and then register it, the solution is
> [-3,5]. If I were to apply that to the "moving"
> image, the result would be a translation of
> [-6,10],
> so at least the way that I am used to doing it, I
> would have to take the negative of the solution to
> put
> the moving into the fixed space. I checked the
> software guide and found that this is consistent
> with
> the examples. Once again, am I all screwed up with
> this??
>
> Thanks for the help
>
>
>
> david
>
>
>
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Shopping - Send Flowers for Valentine's Day
> http://shopping.yahoo.com
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
>
>
http://public.kitware.com/mailman/listinfo/insight-users
>
>
> "{"?n±êì?¨¥?x%?ËH?È
?Û¬z»)¹¹brHÁªÞr?¡¶Ú?þ???'$?Üç(?ù??Y??ùb²Ø§~?â?È
?Û¬z»
__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com