[Insight-users] B-Splines registration with fixed points

Albert Gubern Mérida agubernmerida at gmail.com
Wed Jul 27 06:31:11 EDT 2011


Hi Marius,

You were right. It was about the division of zero. I have run elastix using
the version of the svn and I works without -nan. Now just waiting to see if
the registration approach improve my older results.

Thanks a lot!

Albert

2011/7/27 <M.Staring at lumc.nl>

>  Hi Albert,****
>
> ** **
>
> I just committed a bugfix to the svn repository that solves a couple of
> division by zero problems.****
>
> ** **
>
> You can try it by checking out the latest svn:****
>
> ** **
>
>                 https://svn.bigr.nl/elastix/trunkpublic/****
>
> ** **
>
> using elastixguest as the username and password.****
>
> ** **
>
> Regards,****
>
> ** **
>
> Marius****
>
> ** **
>
> *From:* Staring, M. (LKEB)
> *Sent:* dinsdag 26 juli 2011 13:59
> *To:* 'Albert Gubern Mérida'
>
> *Cc:* insight-users at itk.org
> *Subject:* RE: [Insight-users] B-Splines registration with fixed points***
> *
>
>  ** **
>
> Hi Albert,****
>
> ** **
>
> It looks like we are not checking for division by zero or something like
> that, so probably a bug.****
>
> (The modified pointset does not have a distance of zero at the start
> already, and I think your fixed and moving image have identical spacing etc)
> ****
>
> ** **
>
> Can you also give me your fixed and moving image, so I can reproduce this?
> ****
>
> ** **
>
> Cheers,****
>
> ** **
>
> Marius****
>
> ** **
>
> *From:* krekbert at gmail.com [mailto:krekbert at gmail.com] *On Behalf Of *Albert
> Gubern Mérida
>
> *Sent:* dinsdag 26 juli 2011 11:38
> *To:* Staring, M. (LKEB)
> *Cc:* insight-users at itk.org
> *Subject:* Re: [Insight-users] B-Splines registration with fixed points***
> *
>
> ** **
>
> Hi Marius,
>
> I was using version 4.3. I have just upgraded to 4.4 i have already tried
> what you told me. Here an overview what I do:****
>
> ** **
>
> 1. I obtain the sternum points from the fixed and moving image.****
>
> 2. I apply a translation in y direction to the moving image. Then both
> pectoral/sternums are aligned. I do that "manually" not using elastix. ***
> *
>
> 3. I apply the registration code using similar elastix parameter file as
> the one you sent to me to penalize deviation away from the sternum points.
> Because the moving input images is already translated, the sternum points is
> the same as the one in the fixed image. So, the text file which contains the
> list of points are the same for the fixed and moving images. However, doing
> that I get the following output ( I attach the log file called
> elastix_same_points.log. Note in it that moving_points.txt and
> fixed_points.txt contains exactly the same points):****
>
>
> ##########################################################################################################################################
> ****
>
> ** **
>
>   Sampling gradients ...****
>
>   Progress: 100%  Sampling the gradients took 1 Minutes, 24 Seconds****
>
> Automatic parameter estimation took 1 Minutes, 25 Seconds****
>
> 1:ItNr  2:Metric           3a:Time           3b:StepSize
> 4:||Gradient||    Metric0            Metric1            Time[ms]
> ||Gradient0||     ||Gradient1||****
>
> 0          -0.938266        0.000000         1097.045756   -nan
> -0.938266        0.000000         92520  0.001563            -nan****
>
> 1          -nan     0.000000         1097.045756   -nan     0.000000
> -nan     720      0.000000         -nan****
>
> 2          -nan     0.000000         1097.045756   -nan     0.000000
> -nan     720      0.000000         -nan****
>
> 3          -nan     0.000000         1097.045756   -nan     0.000000
> -nan     720      0.000000         -nan****
>
> 4          -nan     0.000000         1097.045756   -nan     0.000000
> -nan     720      0.000000         -nan****
>
> 5          -nan     0.000000         1097.045756   -nan     0.000000
> -nan     720      0.000000         -nan****
>
> 6          -nan     0.000000         1097.045756   -nan     0.000000
> -nan     720      0.000000         -nan****
>
> 7          -nan     0.000000         1097.045756   -nan     0.000000
> -nan     710      0.000000         -nan****
>
> ** **
>
>
> ########################################################################################################################################################
> ****
>
> ** **
>
> I have tried the same but slightly modifying the moving points list (
> decreasing 1 unit of y_direction ). Then I don't get the -nan output and the
> registration finishes (I haven't done enough tests to decide if it does what
> I need). I also attach the log file called elastix_modified_points.log
>
> Btw, any idea why I get the -nan output? Shall I, instead of doing the
> "manual" registration, initialize the b-splines registration with the y
> translation? ****
>
> ** **
>
> Albert****
>
> 2011/7/25 <M.Staring at lumc.nl>****
>
> Hi Albert,****
>
>  ****
>
> It is available from elastix version 4.4, so if you are running that
> version you are good.****
>
> Parameters should be similar to the attached file.****
>
>  ****
>
> Regards,****
>
>  ****
>
> Marius****
>
>  ****
>
> *From:* krekbert at gmail.com [mailto:krekbert at gmail.com] *On Behalf Of *Albert
> Gubern Mérida
> *Sent:* maandag 25 juli 2011 16:21
> *To:* Staring, M. (LKEB)
> *Cc:* insight-users at itk.org
> *Subject:* Re: [Insight-users] B-Splines registration with fixed points***
> *
>
>  ****
>
> Hi Marius,
>
> Thanks a lot. It seems to be what I exactly need. Anyway, is this
> registration available to run using the binary elastix (what I have been
> using at the moment)? If not, which components or/and testing files should I
> use to implement it? ****
>
>  ****
>
> Thanks again, and sorry for my ignorance.****
>
>  ****
>
> Albert****
>
> 2011/7/25 <M.Staring at lumc.nl>****
>
> Hi Albert,****
>
>  ****
>
> If you have the coordinates of the sternum in both fixed and moving image
> you can add a term to the registration framework that penalizes deviation
> away from alignment of that point (or multiple points). We have done
> something similar:****
>
>  ****
>
> http://elastix.isi.uu.nl/marius/publications/2011_c_MICCAIb.html****
>
>  ****
>
> code of which can be found in elastix, which you can use freely.****
>
>  ****
>
> But it all depends on whether you have corresponding pointsets.****
>
>  ****
>
> Marius****
>
>  ****
>
> *From:* insight-users-bounces at itk.org [mailto:
> insight-users-bounces at itk.org] *On Behalf Of *Albert Gubern Mérida
> *Sent:* maandag 25 juli 2011 15:41
> *To:* insight-users at itk.org
> *Subject:* [Insight-users] B-Splines registration with fixed points****
>
>  ****
>
> Hi all,****
>
>  ****
>
> I am currently working in Breast MRI registration between different
> patients, especially interested in the alignment of body area (thorax +
> pectoral muscles). The first step of my registration consist of a
> translation to align the sternum, which gives a good initial alignment of
> the pectoral muscles. In the following link you can see an example of one
> slice with the sternum indicated with a white cross:
> http://imageshack.us/photo/my-images/220/breastmristernum.png/. After the
> translation step with the pectorals already "rigidly" aligned I apply
> non-rigid b-splines registration to the whole volumes. It works well in some
> cases, but in others, especially of course when the differences are high
> between fixed and moving images, the non-rigid registration move the sternum
> point and the pectorals are not aligned anymore. ****
>
>  ****
>
> I have thought that not allowing the non-registration the move of the
> sternum point and the ones close to it could be a good solution for such
> problem. However, I have taken a look to the classes and the mailing list
> but I have not found any direct/easy example to how to do that. ****
>
>  ****
>
> Could anyone give me some advice? Does a easy way to do it exist or I
> should modify the classes involved in the registration framework? Which ones
> should I take a look? ****
>
>  ****
>
> Thanks in advance,****
>
>  ****
>
> Albert****
>
>  ****
>
> ** **
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110727/9c205513/attachment.htm>


More information about the Insight-users mailing list