MantisBT - ParaView
View Issue Details
0006706ParaView(No Category)public2008-04-02 11:082009-05-13 13:59
Ken Moreland 
Berk Geveci 
normalcrashhave not tried
closedfixed 
 
3.43.4 
0006706: Gradient and Gradient Magnitude filters only work on
The object inspector for the Gradient and Gradient Magnitude filter allows you to select the input scalars by name, but the selection has no effect. These two filters always grab the active scalars on the input image data. This leads to two serious problems.

1. The gradients computed may not correspond to the input the user selected, leading to very misleading results.

2. If the input has no active scalars, the filters will create a new array in the input in an attempt to get them. This leads to garbage in the output and breaks an assumption that the input will not be modified by the filter. The broken assumption often leads to crashes in ParaView in strange places.
The attached file has no active scalars defined in it. If you run either gradient filter, you will get garbage for the gradients (assuming it does not crash in the process). If it does not crash, it is not hard to get ParaView to crash after the fact. Playing with scalar bars or deleting the pipeline objects usually does the trick.
I understand that this behavior is typical of the imaging pipeline objects. We should check to make sure that there are no more filters used by ParaView that exhibit this behavior.
No tags attached.
child of 0006693closed Berk Geveci Add result array name feature to gradient and gradient magnitude filters 
? NoActiveScalars.vti (28,685) 2008-04-02 11:08
https://www.vtk.org/Bug/file/6382/NoActiveScalars.vti
Issue History
2008-04-02 11:08Ken MorelandNew Issue
2008-04-02 11:08Ken MorelandFile Added: NoActiveScalars.vti
2008-04-02 11:09Ken MorelandRelationship addedchild of 0006693
2008-04-02 11:17Ken MorelandNote Added: 0011035
2008-04-02 11:19Ken MorelandNote Added: 0011036
2008-04-10 18:00Ken MorelandCategoryDevelopment => 3.4
2008-04-10 18:00Ken MorelandStatusbacklog => tabled
2008-04-10 18:00Ken MorelandAssigned To => Berk Geveci
2008-08-15 11:31Berk GeveciNote Added: 0013036
2008-08-15 11:31Berk GeveciStatustabled => @20@
2008-08-22 13:06Berk GeveciStatus@20@ => @80@
2008-08-22 13:06Berk GeveciResolutionopen => fixed
2008-08-22 13:06Berk GeveciNote Added: 0013154
2008-09-02 21:14Alan ScottStatus@80@ => closed
2008-09-02 21:14Alan ScottNote Added: 0013261
2009-05-13 13:58Utkarsh AyachitTarget Version => 3.4
2009-05-13 13:59Utkarsh AyachitFixed in Version => 3.4
2011-06-16 13:10Zack GalbreathCategory => (No Category)

Notes
(0011035)
Ken Moreland   
2008-04-02 11:17   
Rather than change the gradient filters themselves, it may be prudent to create a meta-filter that uses the imaging filters internally but uses shallow copies of data objects to convert the ParaView array naming convention to the imaging pipeline active scalars convention.

I can see two potential forms for this filter. One form would be a generic filter that worked on some unspecified image algorithm (in a manner similar to vtkFileSeriesReader). Another form would be a specific filter that used either the image gradient filter or the unstructured gradient filter, depending on the input type.
(0011036)
Ken Moreland   
2008-04-02 11:19   
Is it really necessary to have the Gradient Magnitude filter? The functionality could more-or-less be replaced with the Gradient filter and the Calculator filter to compute the magnitude. Would anyone have any heartburn if Gradient Magnitude went away?
(0013036)
Berk Geveci   
2008-08-15 11:31   
Waiting for feedback from Ken.
(0013154)
Berk Geveci   
2008-08-22 13:06   
Gradient now works on any selected arrays. I deprecated (removed) gradient magnitude based on our decision.
(0013261)
Alan Scott   
2008-09-02 21:14   
Assumed fixed.