MantisBT - ITK
View Issue Details
0005081ITKpublic2007-05-23 11:582010-11-07 00:47
Frank Miller 
Luis Ibanez 
normalmajoralways
closedfixed 
 
 
backlog
0005081: Derivative of ImageToImageMetrics in OrientedImage case
The ImageToImageMetrics do not calculate their derivative properly with respect to physical coordinates. This is only the case when the moving image has an orientation matrix that is not the identity. As a consequence, registration is impossible when using images of type OrientedImage.

A simple solution is to replace the gradient of the moving image with the gradient mapped by the direction matrix in each of the ImageToImageMetrics that provide a derivative.

However, perhaps a better solution would be to change the CentralDifferenceImageFunction (and others?) so that the gradient is oriented properly.

I have attached a patch that implements the simple solution in the following metrics.

  MeanSquaresImageToImageMetric
  MutualInformationImageToImageMetric
  MattesMutualInformationImageToImageMetric
No tags attached.
diff fix.diff (3,533) 1969-12-31 19:00
https://public.kitware.com/Bug/file/1012/fix.diff
Issue History
2007-10-03 08:24Luis IbanezAssigned ToJim Miller => Luis Ibanez
2007-10-03 08:30Luis IbanezNote Added: 0009365
2007-10-03 08:30Luis IbanezStatusassigned => acknowledged
2007-10-03 08:55Luis IbanezNote Added: 0009366
2008-02-01 13:36Luis IbanezNote Added: 0010366
2008-08-11 17:35Rupert BrooksNote Added: 0012986
2008-08-11 17:36Rupert BrooksNote Deleted: 0012986
2010-11-07 00:47Luis IbanezSprint Status => backlog
2010-11-07 00:47Luis IbanezNote Added: 0022966
2010-11-07 00:47Luis IbanezStatusacknowledged => closed
2010-11-07 00:47Luis IbanezResolutionopen => fixed

Notes
(0009365)
Luis Ibanez   
2007-10-03 08:30   
We have discussed this problem at various tcons and we have converged to the following solution

1) Add to itk::Image a method for converting IndexGradients to PhysicalSpaceGradients. These method will apply the rotation indicated by the direction cosines

2) Add boolean flags to the classes that compute Gradients
   (e.g. CentralDifferences, GradientRecursiveGaussian, GradientFilter)
   to enable the use (or not) of the image direction in the gradient
   computation. The flags will be off by default (for backwards-compatibility).
   When enabled the flags will invoke the method in the image class (1) for
   converting index gradients to physical space gradients. In this way we will
   prevent users of normal images to have to pay for computations that they dont
   need.

3) In the ImageMetrics, turn on the use of the boolean flags in the helper
   classes (2) used for computing gradients. In this way, registration will
   be computed consistently.

4) Add a CMake variable to enable the use of all the above, and in that
   manner preserve backward-compatibility by offering by default the
   wrong behaviour.
(0009366)
Luis Ibanez   
2007-10-03 08:55   
A page describing this approach
http://www.itk.org/Wiki/Proposals:Oriented_Image_Registration [^]

has been added to the proposals Wiki page:
http://www.itk.org/Wiki/ITK_Oversight_Committee#Proposals [^]
(0010366)
Luis Ibanez   
2008-02-01 13:36   
The reason for not moving the TransformIndexToPhysicalPoint family of methods to the ImageBase class is that it will require them to be virtual and templated methods simultaneously.
(0022966)
Luis Ibanez   
2010-11-07 00:47   
This has now been fixed.

The Metrics now instruct the derivative calculator helper classes to take the orientation of the image into account.