[Fwd: Re: [Insight-users] PointsetToImageRegistrationMethod]
David Macias Verde
dmacver at gobiernodecanarias.org
Tue, 23 Mar 2004 20:04:58 +0000
--=-U6XCDyOF+6vhjHRCjy1E
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Dear Luis:
Thank you very much for your wise help.=20
I know it is the second time I ask you for it, but I sincerely cannot
find Insight/Examples/DataRepresentation/Mesh/ImageToPointSet.cxx
anywhere. Could you please tell where to go and get it? I've downloaded
again the whole distribution but it's not in.
Regards,
David Mac=EDas
-----Forwarded Message-----
> From: Luis Ibanez <luis.ibanez at kitware.com>
> To: dmacver at gobiernodecanarias.org
> Cc: ITK Users <insight-users at public.kitware.com>
> Subject: Re: [Insight-users] PointsetToImageRegistrationMethod
> Date: Tue, 23 Mar 2004 10:10:55 -0500
>=20
>=20
> Hi David,
>=20
> Matching Canny edges of the Moving image against
> the Distance map of the Fixed image Canny edges
> is a great idea.
>=20
> 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.
>=20
> 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.
>=20
> 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.
>=20
> 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:
>=20
> Insight/Examples/DataRepresentation/Mesh/
> ImageToPointSet.cxx
>=20
> 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).
>=20
> 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.
>=20
>=20
> Regards,
>=20
>=20
> Luis
>=20
>=20
> -----------------------------------
> David Macias Verde wrote:
> > Hi all:
> >=20
> > I'm sorry for this silly question, but I am new to ITK (and also the=20
> > rest of the basic things, as C++, VTK, Qt, which are the tools I'm=20
> > trying to bring together). To me I see a huge field for just an apprent=
ice.
> >=20
> > At this time I'm doing rigid registration in the following manner:
> >=20
> > FixedImage MovingImage
> > || ||
> > \/ \/=20
> > itkCannyEdgeDetectorFilteri =20
> > itkCannyEdgeDetectorFilter
> > || =20
> > \/ =20
> > itkDanielssonDistanceMapImageFilter
> >=20
> > ||
> > ||
> > ||
> > \/
> > itkTranslationTransform
> > ||
> > \/
> > itkRegularStepGradientDescentOptimizer
> > ||
> > \/
> > itkMeanSquaresPointSetToImageMetric
> > ||
> > \/
> > itkLinearInterpolateImageFunction
> > ||
> > \/
> > itkPointsetToImageRegistrationMethod
> >=20
> > The trouble I get is that the images, far to converge, go the other way=
=20
> > round. The results of the registration algorithm are:
> >=20
> > Result =3DTranslation X =3D -90.4793
> > Translation Y =3D 103.5
> > Iterations =3D 99
> > Metric value =3D 1.04037e+09
> >=20
> > Could anyone give a hint on how I can solved this to cross over such a =
task?
> >=20
> > Thanks in advance,
> >=20
> > --=20
> > David Macias Verde <_david.maciasverde at gobiernodecanarias.org_=20
> > <mailto:david.maciasverde at gobiernodecanarias.org>>
> > Servicio de F=EDsica M=E9dica - Hospital de Gran Canaria Dr. Negr=EDn
> >=20
>=20
>=20
--=20
David Macias Verde <david.maciasverde at gobiernodecanarias.org>
Servicio de F=EDsica M=E9dica - Hospital de Gran Canaria Dr. Negr=EDn
--=-U6XCDyOF+6vhjHRCjy1E
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.0.9">
</HEAD>
<BODY>
Dear Luis:<BR>
<BR>
Thank you very much for your wise help. <BR>
<BR>
I know it is the second time I ask you for it, but I sincerely cannot find Insight/Examples/DataRepresentation/Mesh/ImageToPointSet.cxx anywhere. Could you please tell where to go and get it? I've downloaded again the whole distribution but it's not in.<BR>
<BR>
Regards,<BR>
<BR>
David Macías<BR>
<BR>
<BR>
<BR>
<BR>
-----Forwarded Message-----
<BLOCKQUOTE TYPE=CITE>
<PRE><FONT COLOR="#737373"><B><I>From:</B> Luis Ibanez <luis.ibanez at kitware.com>
<B>To:</B> dmacver at gobiernodecanarias.org
<B>Cc:</B> ITK Users <insight-users at public.kitware.com>
<B>Subject:</B> Re: [Insight-users] PointsetToImageRegistrationMethod
<B>Date:</B> 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
>
</I></FONT></PRE>
</BLOCKQUOTE>
<PRE><TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
-- <BR>
David Macias Verde <<A HREF="mailto:david.maciasverde at gobiernodecanarias.org"><U>david.maciasverde at gobiernodecanarias.org</U></A>><BR>
Servicio de Física Médica - Hospital de Gran Canaria Dr. Negrín
</TD>
</TR>
</TABLE>
</PRE>
</BODY>
</HTML>
--=-U6XCDyOF+6vhjHRCjy1E--