[Insight-users] MattesMutualInformation metric: Fixed and moving image desired features

Luis Ibanez luis.ibanez at kitware.com
Sat Nov 7 11:09:31 EST 2009

Hi Oscar,

The process that you are describing is already
quite asymmetric in nature.

In short:

You are not using the same collection of image pixels pairs
when you use the SPECT image as fixed, and when you use the
MR image as fixed.

In particular, the fact that you are using the Threshold functionality
of the MattesMI metric, makes that in practice, the registrations that
you are running are:

           A)  Thresholded SPECT image vs MR image


           B)  Thresholded MR image vs SPECT image

and by "Thresholded" we don't mean a "binary image", but a
collection of pixels who's values are about the threshold value
that you set.

What most likely is happening is that the collection of
selected pixels from the SPECT image is more informative
than the collection of selected pixels from the MR image.

Running a Threshold filter on each one of the images
may help to clarify the mystery, since it will show you what
are the parts of the image that are contributing to the
registration process.

    Please give it a try at generating these intermediate
    images, and let us know what you find,



On Tue, Nov 3, 2009 at 8:10 AM, Oscar Esteban Sanz-Dranguet
<oesteban at die.upm.es> wrote:
> Hi,
> Thanks for your answer :)
> When I said "the registration is more quick and accurate" I didn't mean the
> calculation time of every step, I referred to the whole registration
> process. I must say "it takes a very lower number of iterations".
> The correct question is, why the Mattes metric has its minimum much more
> defined and diferentiated when using SPECT image as fixed?
> Sorry for the previous explanation. Cheers,
> Oscar Esteban
> BIT - UPM (http://www.die.upm.es/im/)
> +34 913 366 827 ext.4248
> Karthik Krishnan escribió:
>> On Tue, Nov 3, 2009 at 7:12 AM, Oscar Esteban Sanz-Dranguet
>> <oesteban at die.upm.es <mailto:oesteban at die.upm.es>> wrote:
>>    Hi,
>>    I'm trying to perform intra-subject rigid registration between MR
>>    & SPECT images. I would like the MR to be the fixed image, BUT
>>    I've found that if I use the SPECT as fixed, the registration is
>>    more quick and accurate. Why does it happen?
>> It should be quicker, using a lower resolution image as the fixed image,
>> for most metrics. The metric is evaluated at each sample point on the fixed
>> image, typically all voxels in the fixed image.
>> Most metrics sample the whole fixed image. With Mattes, contrary to what
>> you report, one would expect the times to be roughly the same (assuming that
>> you have the same number of samples in both cases).
>> The final resampling step though, should be a lot faster using the fixed
>> image as the low res image, since the moving image is resampled to the fixed
>> image grid, ie the iterator walks through every pixel in the fixed image and
>> computes the intensity of the moving voxel that resamples onto this
>> location.
>>    The images are as follows:
>>    - SPECT: 128x128x43,
>>                 3,32237mmx3,32237mmx3,32237
>>                 less than 255 levels of gray
>>    - MR: 224x240x256
>>            0,85mmx0,9mmx0,85mm
>>            512 levels of gray
>>    Image preprocessing:
>>    - I use a IntensityWindowingImageFilter to rescale the intensities
>>    to the range 0,255.
>>    - I use a DiscreteGaussianImageFilter with deviation 2.0 to the
>>    two images, but I've tried using a lot of different values and
>>    combinations. It appears to be the same
>>    - I use ScalarImageToHistogramGenerator to find the first maximum
>>    of the two images histogram. With it, I use the metric's  member
>>    SetFixedImageSamplesIntensityThreshold for the fixed image and I
>>    remove the background of the moving image with
>>    ThresholdImagefilter. The values used for the two thresholds is
>>    the value of the first maximum + 10% of overall frequencies.
>>    - Resampling SPECT to MR's spacing and size improves the
>>    registration, when using MR as fixed and adequate values of
>>    optimizer scales (they are in a very tiny range)
>>    Initialization:
>>    - Using Moments, the SPECT image starts a little lower (10mm) on
>>    the Z axis
>>    Metric:
>>    - 70 bins, 10000 samples
>>    Optimizer:
>>    - SPSA or Gradient Descent. I use a visualization pipeline with
>>    VTK to test that the scales and the step size make sense.
>>    Thanks in advance. Cheers.
>>    --    Oscar Esteban
>>    BIT - UPM (http://www.die.upm.es/im/)
>>    +34 913 366 827 ext.4248
>>    _____________________________________
>>    Powered by www.kitware.com <http://www.kitware.com>
>>    Visit other Kitware open-source projects at
>>    http://www.kitware.com/opensource/opensource.html
>>    Kitware offers ITK Training Courses, for more information visit:
>>    http://www.kitware.com/products/protraining.html
>>    Please keep messages on-topic and check the ITK FAQ at:
>>    http://www.itk.org/Wiki/ITK_FAQ
>>    Follow this link to subscribe/unsubscribe:
>>    http://www.itk.org/mailman/listinfo/insight-users
>> --
>> This message has been scanned for viruses and
>> dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
>> believed to be clean.
> _____________________________________
> Powered by www.kitware.com
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users

More information about the Insight-users mailing list