Incorrect results from vtkImageEuclideanDistance when ConsiderAnisotropy = true
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
This occurs when using vtkImageEuclideanDistance and requesting that the image spacing be used in the computation of the distance (ConsiderAnisotropy = true).
In vtkImageEuclideanDistance (specifically vtkImageEuclideanDistanceExecuteSaito), the spacing variable that it uses to compute the distances is being assigned incorrect values during two of the three iterations.
For the first two iterations, the spacing for the distance calculation is being set to "1". For the third iteration, the spacing is correctly set based on the spacing of the input image. For example, if the input image spacing is [0.2, 0.2, 0.2] the spacing used for the calculation will be [1.0, 1.0, 0.2]. Inserting debugging code to output information around line 215 (for the spacing variable) and around line 586 (for the image data and information) highlights the issue.
I've tested this with 5.10.1, 6.3.0 and 7.0.0. It occurs in both 6.3.0 and 7.0.0 but not in 5.10.1.
I'm attaching an archive of debugging output, python script, sample data, and visualization of the results.