[Insight-users] PointsetToImageRegistrationMethod
Luis Ibanez
luis.ibanez at kitware.com
Tue, 23 Mar 2004 10:10:55 -0500
Hi David,
Matching Canny edges of the Moving image against
the Distance map of the Fixed image Canny edges
is a great idea.
The only trick is that the MeanSquaresMetric is
not what you can use for such matching. This
metric tries to minimize the difference between
the pixel values of your canny edge map and the
values of the Distance map. Since the canny edges
are bright (high values), and the Distance map values
are zero over the fixed image edges, the optimization
necessarily will climb up in the distance map, looking
for higher values, that unfortunately correspond to
larger distances to the fixed image edges.
You need a metric that will be optimal when the bright
pixels of the moving-image canny-edges will be on the
*zero* values of the distance map.
A possible metric could be to simply compute the sum of
the distance map values that are the images of the moving
image canny edges under the spatial transform.
You can implement this metric in a very efficient way
by creating a PointSet from your Canny edges moving image.
For this purpose you can use the new example:
Insight/Examples/DataRepresentation/Mesh/
ImageToPointSet.cxx
and simply add an if() condition inside the for() loop
in order to generate points only in the pixels corresponding
to edges. Once you get this PointSet, you can create a new
PointSetToImageMetric base on a criterion like the one we
mention above (e.g. sum of distance map values).
Note that you can do even better by taking advantage
of the fact that the DanielssonDistanceMap not only
tells you how far you are from the edges, it also tells
you in what direction to move in order to get closer.
If you use this information you coud feed the Levenberg-
Marquardt optimizer and perform registration at very
high speed. Similar techniques are the ones used for
performing registration in Image Guided Surgery where
you need almost real-time registration.
Regards,
Luis
-----------------------------------
David Macias Verde wrote:
> Hi all:
>
> I'm sorry for this silly question, but I am new to ITK (and also the
> rest of the basic things, as C++, VTK, Qt, which are the tools I'm
> trying to bring together). To me I see a huge field for just an apprentice.
>
> At this time I'm doing rigid registration in the following manner:
>
> FixedImage MovingImage
> || ||
> \/ \/
> itkCannyEdgeDetectorFilteri
> itkCannyEdgeDetectorFilter
> ||
> \/
> itkDanielssonDistanceMapImageFilter
>
> ||
> ||
> ||
> \/
> itkTranslationTransform
> ||
> \/
> itkRegularStepGradientDescentOptimizer
> ||
> \/
> itkMeanSquaresPointSetToImageMetric
> ||
> \/
> itkLinearInterpolateImageFunction
> ||
> \/
> itkPointsetToImageRegistrationMethod
>
> The trouble I get is that the images, far to converge, go the other way
> round. The results of the registration algorithm are:
>
> Result =Translation X = -90.4793
> Translation Y = 103.5
> Iterations = 99
> Metric value = 1.04037e+09
>
> Could anyone give a hint on how I can solved this to cross over such a task?
>
> Thanks in advance,
>
> --
> David Macias Verde <_david.maciasverde at gobiernodecanarias.org_
> <mailto:david.maciasverde at gobiernodecanarias.org>>
> Servicio de Física Médica - Hospital de Gran Canaria Dr. Negrín
>