<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks Luis for your detailed answer. We appreciated it a lot! It
will allow us to move forward. :)<br>
<br>
Will look into these points and post a guide on my blog when I get a
chance.<br>
<br>
Cheers<br>
Shekhar<br>
<br>
On 13/09/2010 4:49 AM, Luis Ibanez wrote:
<blockquote
cite="mid:AANLkTikaSTXzZekzRZd7CgHAcfoV5m2vsh=XBd=a4mbG@mail.gmail.com"
type="cite">Hi Shekhar,<br>
<br>
Thanks for the detailed description of what you are doing.<br>
<br>
Please see comments below.<br>
<br>
-----------------------------------------------------------------------------------<br>
<div class="gmail_quote">
On Mon, Sep 6, 2010 at 10:36 PM, Shekhar Chandra <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:Shekhar.Chandra@monash.edu">Shekhar.Chandra@monash.edu</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
Hi Everyone,<br>
<br>
I'm a VTK user who is new to ITK. In my current project I have
to register a stack or series of Micro CT images, which will
be used to reconstruct some biological samples.<br>
<br>
Via ITK I have worked out how to load the series (using the
ImageSeries class, Multi-page TIFFs or MRC files). Traverse
and filter (if necessary) the slices (using
ImageSliceConstIteratorWithIndex and JoinSeriesImageFilter, as
well as the itkSliceBySliceImageFilter). I put some of this on
my blog for reference for those that are interested.<br>
<<a moz-do-not-send="true"
href="http://l3mmings.blogspot.com/2010/08/slices-stacks-and-itk.html"
target="_blank">http://l3mmings.blogspot.com/2010/08/slices-stacks-and-itk.html</a>><br>
<br>
</blockquote>
<div><br>
<br>
Thanks for posting the code in your blog.<br>
This is very helpful.<br>
<br>
</div>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
The problem I have is that registering the slices give me
barely adequate results. I went about it by using the
Multi-res example and Software Guide.<br>
<br>
</blockquote>
<div><br>
What is the size (in pixels) of these images ?<br>
<br>
Depending on the size, you may or may not need<br>
to do multi-resolution.<br>
<br>
</div>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
I make the first slice the fixed image and treat the next
slice as the moving image. I transform/resample the moving
image after registering it and make it the next fixed image.
The next slice is then the moving image. I realise that the
error in registration propagates using this method. Is this
the best way to register slices?<br>
<br>
</blockquote>
<div><br>
<br>
This is a commonly used method.<br>
You are right in that the registration error will propagate,<br>
and that, therefore, a subsequent correction may be needed.<br>
We probably should go back to this point once we manage<br>
to register your slices (pair-wise).<br>
<br>
</div>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
On one post, it was suggested that one could use a sliding
window (e.g. register slice before and after with fixed
slice), but it was not mentioned how to do this. Has someone
solved this problem or encountered it?<br>
<br>
I know the parameters for registration are data dependent and
have to be found. But when exploring a metric with a slice (as
per Exploring a Metric example), it takes a while to compute
even for -50 to 50 pixel translations for small images
(300x300, few minutes for MeanSquares on a Core2duo with
Optimised Registration methods). Is this normal?<br>
<br>
</blockquote>
<div><br>
No way :-)<br>
<br>
The metric computation between two images of that size<br>
should be should be very fast. In my laptop (a dual core<br>
2.8Ghz) it takes 7 milliseconds to evaluate the matrix with<br>
images of similar size.<br>
<br>
Doing this for a grid of 50x50 positions should take then<br>
about 20 seconds.<br>
<br>
Please make sure that you are compiling ITK for Release<br>
mode, and that both of your cores are being used at <br>
run time. <br>
<br>
BTW: What version of ITK are you using ?<br>
<br>
</div>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
Finally, what is the best way to do very coarse alignment in
ITK? Center of Gravity sounds good, but it has rotations
(because of the CenteredRigid2DTransform) and I do not need
rotations.<br>
<br>
</blockquote>
<div><br>
You could use the CenteredTransformInitializer with <br>
a Translation 2D transform. Then use the resulting<br>
translation parameters to initialize the transform:<br>
CenteredRigid2DTransform that you are using.<br>
<br>
<br>
BTW: You should not use this transform.<br>
Instead, the Rigid2DTransform is a more<br>
modern way of performing this registration.<br>
<br>
The difference is that the CenteredRigid2DTransform<br>
attempts to fine tune the center of rotation at the <br>
same time that it optimizes the translation and rotation.<br>
<br>
The Rigid2DTransform, on the other hand, only<br>
optimizes the Translation and Rotation parameters.<br>
<br>
<br>
</div>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
Searching the web has not yielded any further help. Any
suggestion or advice would be greatly appreciated.<br>
<br>
</blockquote>
<div><br>
<br>
The common suspects of registraiton failure are:<br>
<br>
1) Poor initialization<br>
2) Poor (or no) setting of the Optimizer Parameter Scale.<br>
3) Poor settings of the optimizer step lenght<br>
<br>
---<br>
<br>
The case (1) can be examined by running the <br>
registration for Zero iterations, or by simply <br>
taking the initialized transform and using it<br>
to resample the moving image, without running<br>
the registration at all.<br>
<br>
If the image looks roughly aligned, then you<br>
can exonerate (1). <br>
<br>
----<br>
<br>
The case (2) is quite likely to blame here, since<br>
the Rigid2DTransform combines rotation and <br>
translation parameters.<br>
<br>
The scale for translation is in the range -100,100,<br>
while the scale of ration is in the range -0.5,0.5,<br>
(because the units are Radians).<br>
<br>
It is therefore, crucial to scale this parameters,<br>
as illustrated in many examples.<br>
<br>
Look for the line:<br>
<br>
optimizer->SetScales( optimizerScales );<br>
<br>
----<br>
<br>
The case (3) can be examined by looking at the<br>
output of the array of parameters at every iteration.<br>
You must use a Observer in order to print out this<br>
values. Most of the registration examples show<br>
how to do this.<br>
<br>
If the values of the transform have dramatic <br>
changes between consecutive iterations,<br>
that will be an indication that the optimizer <br>
step length (or equivalent parameters) are <br>
too aggressive.<br>
<br>
<br>
<br>
Regards,<br>
<br>
<br>
Luis<br>
<br>
<br>
------------------------------------------------------------------
<br>
</div>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
Cheers<br>
Shakes<br>
<br>
_____________________________________<br>
Powered by <a moz-do-not-send="true"
href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a moz-do-not-send="true"
href="http://www.kitware.com/opensource/opensource.html"
target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information
visit:<br>
<a moz-do-not-send="true"
href="http://www.kitware.com/products/protraining.html"
target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a moz-do-not-send="true"
href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a moz-do-not-send="true"
href="http://www.itk.org/mailman/listinfo/insight-users"
target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br>
</blockquote>
</div>
<br>
</blockquote>
</body>
</html>