[Insight-users] itkGradientDifferenceImageToImageMetric

Lorensen, William E (Research) lorensen at crd.ge.com
Thu Dec 1 11:03:47 EST 2005


As you discovered, this filter is badly broken. I've looked at the code this morning and found a few problems already.

As Karthik suggested, you should log a bug for itk at:
http://www.itk.org/Bug/index.php

Believe it or not, we do look at these.

Bill



-----Original Message-----
From: insight-users-bounces+lorensen=crd.ge.com at itk.org
[mailto:insight-users-bounces+lorensen=crd.ge.com at itk.org]On Behalf Of
Vicente Grau
Sent: Wednesday, November 30, 2005 1:07 PM
To: insight-users at itk.org
Subject: [Insight-users] itkGradientDifferenceImageToImageMetric


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.


_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list