Image Gradient filter loses origin and spacing information
When you apply the Gradient
filter (vtkImageGradient
under the covers), the resulting image data set does not have its origin and spacing properly set. Instead, they are set to their defaults, which causes the result to potentially be translated and scaled.
To replicate, do the following.
- Open
disk_out_ref.ex2
. Load all variables. Apply. - Add
Resample To Image
filter. Apply. - Add the
Gradient
filter. Apply. - Turn the visibility of the
Resample To Image
filter back on.
You will see that the outline of the Gradient
filter does not match its input. It is much larger, square, and off center. If you look in the information tab, you will see that, unlike its input, its bounds match its extents because the origin and spacing were not set correctly.
This problem was reported on discourse.