View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0009222ITKpublic2009-06-30 18:152010-11-07 01:58
ReporterLuis Ibanez 
Assigned Tobrian avants 
PriorityhighSeverityminorReproducibilityalways
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0009222: MattesMutualInformation values change with different number of Threads
DescriptionThe values returned by GetValue() and GetValueAndDerivative() are different depending on how many threads are used when running the metric.
Additional InformationThis was identified by Andy Fedorov, during the NAMIC Developers week 2009, and was reported previously as a difficulty for replicating image registration results when running the same code in different computers.
TagsNo tags attached.
Resolution Date
Sprint
Sprint Status
Attached Files

 Relationships

  Notes
(0016799)
Luis Ibanez (manager)
2009-07-01 15:03
edited on: 2009-07-01 15:08

The first suspect was the actual list of points (indexes) selected by the random iterator.

However, I have verified that the set of indexes is the same, regardless of how many threads are set in the Metric.

In the same exercise, by running the existing tests:

itkOptImageToImageMetricsTest01
itkOptImageToImageMetricsTest02
itkOptImageToImageMetricsTest03

I have verified that the values of the derivative change
depending on the number of threads used in the computation.]
(which is an indication of a bug).

(0016800)
Hans Johnson (developer)
2009-07-01 16:54

Luis,

It was also noted during NAMIC that doing a rigid registration where the fixed and moving images are exactly the same image does not result in an identity matrix. It is hypothesized that this is also a problem with the derivatives not being computed correctly.

Perhaps doing a test with exactly the same image as fixed and moving will help you identify the problem more easily.

Hans
(0016801)
Luis Ibanez (manager)
2009-07-01 16:57

Hans,

Thanks for pointing this out.

This new test is actually using two identical images,
but it is not performing a full registration, only
calls to GetValue() and GetValueAndDerivative().

This should still give us some hints on where the
source of the problem may be.

We probably should add a couple of tests with the
situation that you describe. To verify that a
registration against an identical image results
in Identity transforms.


    Thanks


       Luis
(0016802)
Luis Ibanez (manager)
2009-07-01 17:54

The same problem happens for the multi-threaded MeanSquares metric.
That is, the values returned by GetValue() and GetValueAndDerivative() change
depending on the number of threads used.

In MeanSquares, we have verified that the metric value returned by GetValue() is the same that the one returned by GetValueAndDerivative(), as well as verified that the value returned by GetDerivative() is the same as the one returned by GetValueAndDerivative().
(0016803)
Luis Ibanez (manager)
2009-07-01 17:55

a test has been added to the Nightly suite.
(0016804)
Luis Ibanez (manager)
2009-07-01 22:45

After adding a proper Reinitialization of the Seed (for the random pixel iterator), the results are the same in multiple threads when using less than 50,000 samples.

At 50,000 samples, on the other hand, the values of metric and derivative start
to diverge in the low digits. It start looking like a progressive accumulation of errors...
(0022980)
Luis Ibanez (manager)
2010-11-07 01:58

This should be addressed as part of the image registration refactoring in ITKv4

 Issue History
Date Modified Username Field Change
2009-06-30 18:15 Luis Ibanez New Issue
2009-06-30 18:15 Luis Ibanez Status new => assigned
2009-06-30 18:15 Luis Ibanez Assigned To => Luis Ibanez
2009-07-01 15:03 Luis Ibanez Note Added: 0016799
2009-07-01 15:08 Luis Ibanez Note Edited: 0016799
2009-07-01 16:54 Hans Johnson Note Added: 0016800
2009-07-01 16:57 Luis Ibanez Note Added: 0016801
2009-07-01 17:54 Luis Ibanez Note Added: 0016802
2009-07-01 17:55 Luis Ibanez Note Added: 0016803
2009-07-01 17:55 Luis Ibanez Status assigned => confirmed
2009-07-01 17:55 Luis Ibanez Priority normal => high
2009-07-01 22:45 Luis Ibanez Note Added: 0016804
2010-11-07 01:58 Luis Ibanez Status confirmed => assigned
2010-11-07 01:58 Luis Ibanez Assigned To Luis Ibanez => brian avants
2010-11-07 01:58 Luis Ibanez Note Added: 0022980


Copyright © 2000 - 2018 MantisBT Team