[Insight-users] "throwing exception at StartRegistration()"
Lydia Ng
lng@insightful.com
Mon, 2 Dec 2002 10:27:26 -0800
Hi Jorn,
> 2. using some kind of a mask so that voxels with grey values below or
> above a certain value will not be used in the mutual=20
> information method.
Currently there is no support for masks in mutual information metric.
As I see it the changes that need to be made are:
a) Instead of choosing samples uniformly from the FixedImageRegion,
you would need to choose the samples uniformly from an arbitrary mask.
b) For each sample chosen, one will need to do an extra check
to see if the mapped point is within masked region.
These changes would require extra computation at per
sample at each iteration. Hence it would be good to keep the current=20
"non-mask" metric and derive a "mask support" metric from it.
I think the code for sampling the region is already isolated
in a method. Transforming and interpolating the mapped point
can easily be bundled into a method. In a "mask support"
subclass - one probably only needs to override these two methods.
So if someone wants to take on the task of=20
implement and test a mask version,
I will help out with rejigging the current metric.
- Lydia
> -----Original Message-----
> From: J. Van Dalen [mailto:j.vandalen@rad.umcn.nl]
> Sent: Monday, December 02, 2002 9:53 AM
> To: Luis Ibanez
> Cc: affable@hd2.dot.net.in; insight-users@public.kitware.com
> Subject: Re: [Insight-users] "throwing exception at=20
> StartRegistration()"
>=20
>=20
>=20
> Hi Luis,
>=20
> Thanks for your help. It turns out that the mutual information=20
> registration is very sensitive to the input parameters (as eg
> the learning rate). I conclude that my registration is very unstable
> due to the dependence of the values of the input parameters.
> Therefore, I was thinking about the following solutions:
>=20
> 1. using multiresolution registration (start with a high=20
> "shrink" factor,
> and iteratively lower it).
>=20
> 2. using some kind of a mask so that voxels with grey values below or
> above a certain value will not be used in the mutual=20
> information method.
>=20
> 3. use an other quantization for greyvalues (now we have 256 possible
> different grey values, but I could think of having less, eg=20
> say that all
> voxels with grey value of 0 to 4 get a new grey value of 4, all voxels
> with grey value of 5 to 9 get a value of 9, etc.)
>=20
> Now, in 2. and 3. you make use of less information than you=20
> actually have.
> However, after performing such a "rough" registration, you can always
> make a new registration, using more information and using the result
> from the rough registration (some kind of an iterative process).
>=20
> Are there ways to perform the points 2. and 3.? I looked in=20
> the Insight
> documentation, but could not find it.
>=20
> Thanks,
> Jorn.
>=20
> On Mon, 2 Dec 2002, Luis Ibanez wrote:
> > Hi Jorn,
> >=20
> > This error happens when the fixed image and moving image
> > are no longer overlapped. This is an indication that the
> > transform is completely off position.
> >=20
> > Typically this happens when the translation component of
> > the transform is larger than the image size. You can verify
> > this by looking at the transform parameters. If you are using
> > an Affine transform in 3D, the last three parameters are
> > translations.
> >=20
> > Here are some options you may want to consider:
> >=20
> > 0) Verify that the origin and spacing of both image
> > are correctly set up. Registration is performed in
> > physical space coordinates, not in pixels. Inconsitent
> > pixel spacing may generate too large translations in
> > the transform.
> >=20
> > 1) Reduce the learning rate of the optimizer in order
> > to force smaller steps.
> >=20
> > 2) Modify the translation scale parameter. This parameter
> > controls how fast the optimizer advance on rotations
> > vs translations.
> >=20
> > 3) Track the evolution of parameters in order to identify
> > when the transform is getting out of range. Use a
> > Command / Observer for this purpose.
> >=20
> > Luis
> >=20
> > =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D
> >=20
> > J. Van Dalen wrote:
> >=20
> > > Dear CSPL,
> > >=20
> > > I try to perform a registration using Mutual information=20
> and I encouter
> > > a similar error as you did encounter a few months ago.
> > >=20
> > >>From the The Insight-users Archives I found:
> > >=20
> > >>I am working on MRI Registration.I have made my own=20
> project using MRI
> > >>Registration example available in ITK examples.It is=20
> working well for
> > >>some MRI images.But,It is throwing exception at=20
> StartRegistration() for
> > >>some imagess.I have hard coded the Parameters which I have to set
> > >>before calling StartRegistration().Plese, help me in solving my
> > >>problem and give me some information on setting parameter=20
> values. Here
> > >>I am enclosing the code and parameters details.I am also=20
> enclosing the
> > >>exception message thrown by startregistration().
> > >>
> > >>//Exception message
> > >>itk::ERROR: MutualInformationImageToImageMetric(003C6D20): All the
> > >>sampled point mapped to outside of the moving image
> > >>
> > >=20
> > > Now, I have exactly the same error as you had that time.=20
> And your code
> > > looks very similar to my code. Did you find a solution to=20
> this problem?
> > > Or, do you know why you had this error?
> > >=20
> > > Hope you can help me,
> > > Thanks and Regards,
> > > Jorn.
>=20
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
>=20
>=20