[Insight-users] itkGradientDifferenceImageToImageMetric

Vicente Grau vicente at robots.ox.ac.uk
Wed Nov 30 13:07:03 EST 2005


I have been comparing several image-to-image metrics using a 
modification of the program MeanSquaresImageMetric1.cxx. With 
GradientDifferenceImageToImageMetric, I get a constant value, 
independent of the translation between the images (e.g., in case of two 
3D images, 40x60x60 voxels, intensity range 0-255, the value is always 
339204.)
I have only found an example that uses this metric, it is one of the 
tests of itkAlgorithmsTests2.exe. When I run it, I get the result below. 
It seems to me that this result has exactly the same problem: the same 
value 20000 regardless of the translation values (and derivatives equal 
to 0). Is this the expected result for this test? Is the metric working 
well?

------------------------
Available tests:
...
3. itkGradientDifferenceImageToImageMetricTest
...
To run a test, enter the test number: 3

Parameters: [-50, -50], Value: 20000, Derivatives: [0, 0]
Parameters: [-25, -50], Value: 20000, Derivatives: [0, 0]
Parameters: [0, -50], Value: 20000, Derivatives: [0, 0]
Parameters: [25, -50], Value: 20000, Derivatives: [0, 0]
Parameters: [50, -50], Value: 20000, Derivatives: [0, 0]
Parameters: [-50, -25], Value: 20000, Derivatives: [0, 0]
Parameters: [-25, -25], Value: 20000, Derivatives: [0, 0]
Parameters: [0, -25], Value: 20000, Derivatives: [0, 0]
Parameters: [25, -25], Value: 20000, Derivatives: [0, 0]
Parameters: [50, -25], Value: 20000, Derivatives: [0, 0]
Parameters: [-50, 0], Value: 20000, Derivatives: [0, 0]
Parameters: [-25, 0], Value: 20000, Derivatives: [0, 0]
Parameters: [0, 0], Value: 20000, Derivatives: [0, 0]
Parameters: [25, 0], Value: 20000, Derivatives: [0, 0]
Parameters: [50, 0], Value: 20000, Derivatives: [0, 0]
Parameters: [-50, 25], Value: 20000, Derivatives: [0, 0]
Parameters: [-25, 25], Value: 20000, Derivatives: [0, 0]
Parameters: [0, 25], Value: 20000, Derivatives: [0, 0]
Parameters: [25, 25], Value: 20000, Derivatives: [0, 0]
Parameters: [50, 25], Value: 20000, Derivatives: [0, 0]
Parameters: [-50, 50], Value: 20000, Derivatives: [0, 0]
Parameters: [-25, 50], Value: 20000, Derivatives: [0, 0]
Parameters: [0, 50], Value: 20000, Derivatives: [0, 0]
Parameters: [25, 50], Value: 20000, Derivatives: [0, 0]
Parameters: [50, 50], Value: 20000, Derivatives: [0, 0]
GradientDifferenceImageToImageMetric (0198CE00)
  RTTI typeinfo:   class itk::GradientDifferenceImageToImageMetric<class 
itk::Image<double,2>,class itk::Image<double,2> >
  Reference Count: 1
  Modified Time: 50
  Debug: Off
  Observers:
    none
  ComputeGradient: 1
  Moving Image: 0198A938
  Fixed  Image: 0198CAA0
  Gradient Image: 019C85A0
  Transform:    01987800
  Interpolator: 019C82B0
  FixedImageRegion: ImageRegion (0198CE54)
  Dimension: 2
  Index: [0, 0]
  Size: [100, 100]

  Moving Image Mask: 00000000
  Fixed Image Mask: 00000000
  Number of Pixels Counted: 0
Test passed.




More information about the Insight-users mailing list