User:Ramirez: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
No edit summary
No edit summary
Line 20: Line 20:
== Tuning Parameters ==
== Tuning Parameters ==


<b><u>itk::RegularStepGradientDescentOptimizer->SetScales()</u></b>
 
<b><u>Optimizer->SetScales()</u></b>
 


The rule of thumb is to figure out how much each one of those
The rule of thumb is to figure out how much each one of those
Line 26: Line 28:
that range to [-1:1].
that range to [-1:1].


For example,


if you are doing 2D rigid you will have a 2D transform with
 
<u>In the case that you know the anticipated range of translations and rotations,</u>
 
 
"if you are doing 2D rigid you will have a 2D transform with
three parameters:
three parameters:


Line 45: Line 50:
Of course, those will be just "good values to start with".
Of course, those will be just "good values to start with".
You will still need to refine them according to the behavior
You will still need to refine them according to the behavior
of the optimizer.
of the optimizer."


http://public.kitware.com/pipermail/insight-users/2005-April/012896.html
http://public.kitware.com/pipermail/insight-users/2005-April/012896.html
<u>In the case that you do not know the anticipated range of translations and rotations,</u>
"the recommendation for the scaling of translation parameters versus
rotation parameter is to use a factor proportional to the diagonal
length of the image.
For your case the, you have 100 pixels with 1 mm / pixel, therefore the
physical extent of your image is
        100mm  X  100mm  X 100mm
The diagonal the image bounding box is
          sqrt(3) * 100 mm
which is about
              173.2
and extra factor of 10X is usually useful, so you should probably try a
factor of
    1.0 / ( 10 x 173.2 )  =  1.0 / 1732.0
You could use this same factor for the three components
of the translation or you could estimate independent
factor for each component in the way it is done in the
VolView plugin.
Note that this factors are not expected to be computed precisely. Their
purpose is simply to bring the rotational and translational parameters
to a similar numerical scale.
By default, they are quite disproportionate since rotation
are in radians, therefore in a range about -1:1, while translations are
in millimeters, and for an image of 100mm you probably can expect
translations as large as 50mm."
http://public.kitware.com/pipermail/insight-users/2004-July/009558.html
In short,
"for an 3D AffineTransform, you get 12 parameters: the
first 9 are the coefficients of the matrix (representing
rotation, scale and shearing) the last 3 are the components
of a translation vector.  You want then to provide an
array of 12 values with the first 9 being =1.0 and the last
three being on the range of 1.0 / the image size (in millimeters)."
http://public.kitware.com/pipermail/insight-users/2002-October/001400.html





Revision as of 14:24, 31 December 2005

Image Registration Components

Image Similarity Metrics


Transforms

Optimizers

Interpolators

Tuning Parameters

Optimizer->SetScales()


The rule of thumb is to figure out how much each one of those parameters will change for your registration, and then rescale that range to [-1:1].


In the case that you know the anticipated range of translations and rotations,


"if you are doing 2D rigid you will have a 2D transform with three parameters:

     Tx  translation in millimeters along X
     Ty  translation in millimeters along Y
     R   rotation in radians

and you anticipate that your images need a correction of the order of 10 to 50 millimeters in translation and 0.01 to 0.1 radians in rotation, then you should put scales:

     scale[0] = 1/50;     scale for Tx
     scale[1] = 1/50;     scale for Ty
     scale[2] = 1/0.1;    scale for Rotation

Of course, those will be just "good values to start with". You will still need to refine them according to the behavior of the optimizer."

http://public.kitware.com/pipermail/insight-users/2005-April/012896.html


In the case that you do not know the anticipated range of translations and rotations,


"the recommendation for the scaling of translation parameters versus rotation parameter is to use a factor proportional to the diagonal length of the image.

For your case the, you have 100 pixels with 1 mm / pixel, therefore the physical extent of your image is

       100mm  X  100mm  X 100mm

The diagonal the image bounding box is

         sqrt(3) * 100 mm

which is about

             173.2

and extra factor of 10X is usually useful, so you should probably try a factor of

    1.0 / ( 10 x 173.2 )  =  1.0 / 1732.0

You could use this same factor for the three components of the translation or you could estimate independent factor for each component in the way it is done in the VolView plugin.

Note that this factors are not expected to be computed precisely. Their purpose is simply to bring the rotational and translational parameters to a similar numerical scale.

By default, they are quite disproportionate since rotation are in radians, therefore in a range about -1:1, while translations are in millimeters, and for an image of 100mm you probably can expect translations as large as 50mm."

http://public.kitware.com/pipermail/insight-users/2004-July/009558.html


In short,


"for an 3D AffineTransform, you get 12 parameters: the first 9 are the coefficients of the matrix (representing rotation, scale and shearing) the last 3 are the components of a translation vector. You want then to provide an array of 12 values with the first 9 being =1.0 and the last three being on the range of 1.0 / the image size (in millimeters)."

http://public.kitware.com/pipermail/insight-users/2002-October/001400.html


Use Cases

CT-MRI Brain Registration

PET-CT Registration



ITK: [Welcome | Site Map]